[linux-help] Re: passwd files...
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
/usr/bin/passwd is the program that you run to change your password,
which is probably stored in /etc/shadow. /etc/passwd is the password
file, which doesn't contain passwords if you have /etc/shadow.
The 's' tells you that the setuid bit is set. Since /usr/bin/passwd
is owned by root, when you run it its effective user id is root,
which gives it permission to change /etc/shadow (or /etc/passwd).
This is reasonable, because /usr/bin/passwd has been written to
implement its own security; i.e., even though it runs as root, it
doesn't allow you to do anything that you shouldn't be able to do.
You might try running some commands like:
file /etc/passwd /usr/bin/passwd
man 1 passwd
man 5 passwd
Also, man 1 ls will explain the permissions encoding for ls(1).
"Lrs v.d.Ast" wrote:
>
> I notice on my Linux box two different passwd files:
> /etc/passwd
> -rw-r--r-- 1 root root 923 May 24 19:56 passwd
>
> /usr/bin/passwd:
> -r-s--x--x 1 root root 12244 Feb 7 16:20 passwd
>
> What are they doing? I know the "s" has something to do with sticky bit
> stuff. Can someone explain?
>
> Lrs v.d.Ast
>
> -- This is the linux-help@xxxxxxxxx list. To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
--
/*
* Tom Hull * thull@xxxxxxxxxxx * http://www.ocston.org/~thull/
*/
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|