LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-17-2005, 12:42 AM   #1
sunil_thaha
LQ Newbie
 
Registered: Jan 2005
Location: Palakkad
Distribution: Redhat 9.0, Fc3
Posts: 2

Rep: Reputation: Disabled
passwd not Editable


Hi guys, I am New to Linux

My doubt is

if a user is not entitled to edit a passwd file in the /etc/passwd

how come? the passwd command edits the File. (i.e) How can a command like passwd
change the passed of the user for which the user does not have write permission ?
 
Old 01-17-2005, 01:01 AM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
passwords are no longer stored in /etc/passwd

they are now stored in /etc/shadow

but regardless, passwd is a special script that allows a user to set his password, idk how it works to edit that file, but i bet it has something to do with it having root access or something
 
Old 01-17-2005, 01:16 AM   #3
sunil_thaha
LQ Newbie
 
Registered: Jan 2005
Location: Palakkad
Distribution: Redhat 9.0, Fc3
Posts: 2

Original Poster
Rep: Reputation: Disabled
The passwd is a binary file.
And It has a stick bit the Permission is as follows

-r-s--x--x 1 root root 16336 Feb 14 2003 /usr/bin/passwd

Do you know how a script can have the root privilege assigned to it ?
 
Old 01-17-2005, 01:21 AM   #4
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
no, sticky bit is the only way a piece of software can be run as root without necessarally knowing the root password

--adam
 
Old 01-17-2005, 02:04 AM   #5
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Only through the passwd command can normal users modify (and it's restricted) the /etc/shadow file.
 
  


Reply


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
KMenu not updating/editable joosep MEPIS 4 06-29-2005 07:35 PM
php: display timestamp in editable dropdown box? opioid Programming 5 07-28-2004 05:33 PM
about passwd jnzhang Linux - General 7 07-08-2003 05:32 PM
/etc/passwd help debdas Linux - General 3 05-09-2003 02:28 PM
can't passwd leihsun Linux - General 17 06-19-2002 06:37 AM


All times are GMT -5. The time now is 09:24 AM.

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