Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-22-2005, 12:01 PM   #1
LQ Newbie
Registered: Nov 2005
Location: Chennai
Distribution: RHEL4 , Slackware 10.2
Posts: 17

Rep: Reputation: 0
Question how passwd(1) for normal user changes /etc/shadow?

Hello every one,
My instructor throw me a question.
As a normal user one cannot append or edit something in /etc/passwd or /etc/shadow files as they have 400 permision code.But for a normal user the usage of passwd(1) command changes his password which means that this edits the /etc/shadow file.How and what is passwd(1) doing when it cannot have even read permission for /etc/shadow.

Please bare me im a newbie.and help me solve this.
Old 12-22-2005, 12:06 PM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
We really frown on answering homework questions here. However, I will help point you in the right direction.

ls -la /bin/passwd outputs:
-rws--x--x  1 root root 29992 Nov  7 08:29 /bin/passwd
The key here are the permissions "-rws--x--x" and the owner of the file "root". So lookup the linux permission model and it'll answer your question. Keep in mine the s in rws is not a typo.

I'd recommend reading the man page for chmod. In general, always start your research with the man pages...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
passwd shadow problem rblampain Linux - Distributions 2 10-04-2005 12:00 AM
Moving /etc/passwd and /etc/shadow john8675309 Linux - Software 1 01-24-2005 08:44 PM
It is ok if i unshadow the /etc/passwd and /etc/shadow Paxmaster Linux - Software 1 01-12-2005 10:07 PM
mismatch with /etc/passwd and /etc/shadow AngryKeebler Linux - General 1 07-23-2004 03:42 PM
/etc/passwd or /etc/shadow? tiger7007 Linux - Security 2 03-21-2004 04:41 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration