Computing.Net > Forums > Linux > change root passsword with passwd

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

change root passsword with passwd

Reply to Message Icon

Name: bedford
Date: January 12, 2005 at 17:33:44 Pacific
OS: RH ent 2.1
CPU/Ram: p4
Comment:

I know my root password. I want to change it. Can I simply use the passwd command?



Sponsored Link
Ads by Google

Response Number 1
Name: Jake2
Date: January 12, 2005 at 21:03:07 Pacific
Reply:

You could change your root password with passwd even if you didn't know your current password.


0

Response Number 2
Name: linux_lover
Date: January 13, 2005 at 00:15:27 Pacific
Reply:

One interesting question here ....

As per my knowledge, /etc/passwd file or /etc/shadow files are owned by root having read permission to owner only.

I am not a root and still i can write to these files (when i change my password using passwd command, it updates the shadow file).

Now i wonder how can i write to this file without being a superuser ?? Is it not against the permissions ??

Any pointers ???


0

Response Number 3
Name: Jake2
Date: January 13, 2005 at 00:48:38 Pacific
Reply:

The permissions for /etc/passwd are 644 (owner root read/write, everyone else read-only) and for /etc/shadow, 600 (root read/write, no premission for anyone else) because only /etc/shadow stores hashes, so it doesn't matter that everyone can read /etc/passwd.

passwd works for normal users because it's owned by root and has the suid bit set, thus no matter who runs it, it always runs as root. suid root programs have been the source of many security holes on UNIX systems, but since passwd is a very simple program, there's little chance anyone will ever expoit it.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Rhel es Problem in yup.conf (fedo...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: change root passsword with passwd

Linux Login incorrect message www.computing.net/answers/linux/linux-login-incorrect-message/7928.html

Linux login...? Root incorrect? www.computing.net/answers/linux/linux-login-root-incorrect/29151.html

forget password in Red Hat Linux 7.1 www.computing.net/answers/linux/forget-password-in-red-hat-linux-71/8957.html