1833760 Members
2287 Online
110063 Solutions
New Discussion

passwd

 
SOLVED
Go to solution
Indrajit Bhagat
Regular Advisor

passwd

We have default read-read-read permission on /etc/passwd.

# pwd
/etc
# ll passwd
-r--r--r-- 1 root sys 3234 Aug 13 19:48 passwd


Then how an individual user or root is able to change the passwd.
4 REPLIES 4
Dennis Handly
Acclaimed Contributor
Solution

Re: passwd

Because passwd(1) is setuid and root can do anything.
Dennis Handly
Acclaimed Contributor

Re: passwd

This is a duplicate of your April thread and will be deleted. Please reply in the following thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1218933
Vishu
Trusted Contributor

Re: passwd

hi,
what you are asking is passwd(4), but passwd(1) is havind setuid, so root permissions will change the things for you.
SKR_1
Trusted Contributor

Re: passwd

root is the owner of the file , root is also an super user, so it can do any permissions.

Also any user is the owner of some file, it can set any permissions to that file.

Thanks

SKR