The default permissions for /etc/shadow are:
root@986e440df792:/home/kitchen# ll /etc/shadow
-rw-r----- 1 root shadow 683 May 23 15:43 /etc/shadow
see https://help.ubuntu.com/community/FilePermissions
[root@b5704779e84f kitchen]# ll /etc/shadow
---------- 1 root root 670 Mar 23 17:20 /etc/shadow
see https://www.stigviewer.com/stig/red_hat_enterprise_linux_6/2013-02-05/finding/RHEL-06-000035
The Deutsche Telekom security assesment process (which this hardening project loosely follows) proposes:
Passwords must be stored only as hashes (bcrypt, scrypt), never in clear text. Files containing password hashes must be protected against unauthorized access.
Motivation: Passwords are in need of protection that only account owners or authorized persons may know and change. This measure is designed to ensure that unauthorized persons cannot gain knowledge of these passwords or have the chance to change them.
Implementation example: For system passwords, the file /etc/shadow shall be used in Linux. For other operating systems, the respectiveequivalent file shall be used, which is only readable for the root and only contains the hashes of the systempasswords.
In my opinion we should follow the operating-system standards here.
On rhel-based systems the os-standards are even safer than the standards in this repo.
The default permissions for
/etc/shadoware:see https://help.ubuntu.com/community/FilePermissions
see https://www.stigviewer.com/stig/red_hat_enterprise_linux_6/2013-02-05/finding/RHEL-06-000035
The Deutsche Telekom security assesment process (which this hardening project loosely follows) proposes:
In my opinion we should follow the operating-system standards here.
On rhel-based systems the os-standards are even safer than the standards in this repo.