@@ -4,8 +4,8 @@ documentation_complete: true
44title : ' Ensure root account access is controlled'
55
66description : |-
7- There are a number of methods to access the root account directly.
8- Without a password set any user would be able to gain access and
7+ There are a number of methods to access the root account directly.
8+ Without a password set any user would be able to gain access and
99 thus control over the entire system.
1010
1111rationale : |-
@@ -14,22 +14,35 @@ rationale: |-
1414severity : medium
1515
1616platform : system_with_kernel
17-
17+ {{%- if product != "ubuntu2204" %}}
1818ocil_clause : ' root password is not set or is not locked'
1919
2020ocil : |-
2121 Run the following command to verify that either the root user's
2222 password is set or the root user's account is locked:
2323 <pre># passwd -S root | awk '$2 ~ /^(P|L)/ {print "User: \"" $1 "\" Password is status: " $2}'</pre>
24- Verify the output is either:
24+ Verify the output is either:
2525 User: "root" Password is status: P
2626 - OR -
2727 User: "root" Password is status: L
2828 Note:
2929 - P - Password is set
3030 - L - Password is locked
31-
3231
3332warnings :
3433 - general : This rule doesn't come with a remediation, as the exact requirement allows root to either have a password or be locked.
35-
34+ {{%- else %}}
35+ ocil_clause : ' root password is not set'
36+
37+ ocil : |-
38+ Run the following command to verify that the password is set for root:
39+ <pre># passwd -S root | awk '$2 ~ /^P/ {print "User: \"" $1 "\" Password is status: " $2}'</pre>
40+ Verify the output is: User: "root" Password is status: P
41+ Note:
42+ - P - Password is set
43+
44+ warnings :
45+ - general : This rule doesn't come with a remediation, as the exact requirement allows root to have a password.
46+ {{% endif %}}
47+
48+
0 commit comments