Hi - permission of /etc/shadow is -r--------. when a user changes his / her password.
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi - permission of /etc/shadow is -r--------. when a user changes his / her password.
Hi - permission of /etc/shadow is -r--------. when a user changes his / her password, how /etc/shadow password is updated? Is it due to GID / UID set on this file? Also, /etc/shadow file is a soft link, which is the actual file? Is it /etc/passwd?
Any user can execute passwd and subsequently update /etc/shadow, because the passwd executable has Set User ID (SUID) set, which essentially means that the program runs with the permissions of its owner, no matter which user calls it. You can see the permissions of the executable:
Thanks Droyden and Marios. I had been told that /etc/shadow is a symbolic link of an another file. That's confirmed that it is not a softlink, but is a hard link to any file? Thanks again !!
The number after the permissions is the number of hardlinks that point to the same file or directory. All files have at least 1 hardlink, which is the file itself. All directories have at least 2 hardlinks, which are . and ..
@ Linux_Kidd - I was told that /etc/shadow file is a symbolic file , in interview with company Redhat. Which file is it linked to? That's what I am trying to figure out. I presumed it must /etc/passwd but it doesn't has any symbolic link.
ls -lt /etc/shadow
-r-------- 1 root root 6243 Feb 4 08:08 /etc/shadow
ls -l /etc/passwd
-rw-r--r-- 1 root root 14992 Feb 4 08:08 /etc/passwd
If there a explict symbolic link on a file, file permission's 1st bit would be 'l' representing it is a symbolic link
and the count would be greater than 2. (Please correct me if i am wrong)
something like:-
lrwxrwxrwx 1 bediaman bediaman 4 Feb 7 00:20 test1 -> test
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.