LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-16-2005, 11:42 PM   #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, 12: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, 12: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, 12: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, 01:04 AM   #5
student04
Member
 
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:47 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
Open Source Consulting | Domain Registration