Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 22-12-2005, 11:37 PM   #1 (permalink)
Broken In
 
sknowonweb's Avatar
 
Join Date: Nov 2005
Location: CHENNAI
Posts: 134
Default how passwd bypasses permisssion for /etc/shadow in linux


Hello every one,
My instructor throw me a question in linux.
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 files password field entry.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.
sknowonweb is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-12-2005, 12:14 AM   #2 (permalink)
Alpha Geek
 
__Virus__'s Avatar
 
Join Date: Sep 2005
Location: Hyderabad
Posts: 560
Default

:according to my thought:

When a user changes his password from say think-digit from digit-think, the OS does recognize that the user has permission to edit part of the file and without user intervention the file will be edited. Remember the user must the permission to change his password.
__Virus__ is offline  
Old 23-12-2005, 06:30 AM   #3 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

I think it has to do something with PAM(pluggable--) i saw a file /etc/pam.d/passwd..perhaps i need to study about pam .... also should examine SUID and SGID...
praka123 is offline  
Old 23-12-2005, 09:18 AM   #4 (permalink)
Alpha Geek
 
Join Date: Dec 2003
Posts: 780
Default

Code:
$ ls -l /usr/bin/passwd
-rws--x--x  1 root bin 37880 2004-06-22 00:50 /usr/bin/passwd*
As you can see, the program passwd runs with suid, and therefore runs with root priviledges. Check this for more info -

http://www.linuxgeek.net/index.pl/suid
__________________
Hardware - Celeron 266 MHz, 128MB RAM, Intel i740 8MB RAM
Software - Slackware Linux 10.1; Archlinux 0.7; Windows 98 SE
Humanware - GS/CS C++ L+++ w b+++ DI+ D+ e
ujjwal is offline  
Old 28-12-2005, 06:26 PM   #5 (permalink)
Alpha Geek
 
__Virus__'s Avatar
 
Join Date: Sep 2005
Location: Hyderabad
Posts: 560
Default

Quote:
Originally Posted by ujjwal
Check this for more info -

http://www.linuxgeek.net/index.pl/suid
Thanks ujjwal that was indeed good site which by now cleared it.
__Virus__ is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by icebags
- by clinton
- by topgear
- by trublu

Advertisement




All times are GMT +5.5. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2