nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

passwd reset

This is a discussion on passwd reset within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi, Can anybody tell me...The passwd file is not writeable by world users and groups. How does a user then ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 02-13-2008, 02:42 AM
Member
User
 
Join Date: Jan 2008
My distro: Debian/Redhat
Posts: 39
Rep Power: 0
pansarevai is on a distinguished road
Default passwd reset

Hi,

Can anybody tell me...The passwd file is not writeable by world users and groups. How does a user then manage too change his password .

Thnx in advance..
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-13-2008, 09:17 AM
agn agn is offline
Member
User
 
Join Date: Feb 2008
My distro: OpenBSD/FreeBSD/Debian/Fedora/RHEL
Posts: 69
Rep Power: 1
agn is on a distinguished road
Default

Code:
$ ls -l /usr/bin/passwd
-rwsr-xr-x 1 root root 28480 2007-02-27 13:23 /usr/bin/passwd
passwd(1) is setuid root (notice the "s"). So when a user executes it, its run as if its run by root.

[1] `man chmod`
[2] setuid - Wikipedia, the free encyclopedia

Last edited by agn; 02-13-2008 at 09:23 AM..
Reply With Quote
  #3 (permalink)  
Old 02-14-2008, 01:28 AM
Member
User
 
Join Date: Jan 2008
My distro: Debian/Redhat
Posts: 39
Rep Power: 0
pansarevai is on a distinguished road
Default

Hi,

From which os and version did u got this? Bcause I check and found this result.
-rw-r--r-- 1 root root 1564 Feb 12 15:49 /etc/passwd
-rw-r----- 1 root shadow 1123 Feb 12 15:49 /etc/shadow
And almost all os of linux shows same here.
Reply With Quote
  #4 (permalink)  
Old 02-14-2008, 09:27 AM
agn agn is offline
Member
User
 
Join Date: Feb 2008
My distro: OpenBSD/FreeBSD/Debian/Fedora/RHEL
Posts: 69
Rep Power: 1
agn is on a distinguished road
Default

/usr/bin/passwd is the command. The files you're referring to are password databases. Its the passwd(1) command that writes into /etc/passwd, which has the required permissions to do so because of setuid.

Code:
$ ls -l /usr/bin/passwd
-rwsr-xr-x 1 root root 28480 2007-02-27 13:23 /usr/bin/passwd
$ file $_
/usr/bin/passwd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped
$ ls -l /etc/passwd
-rw-r--r-- 1 root root 2324 2008-02-06 10:52 /etc/passwd
$ file $_
/etc/passwd: ASCII text
Hope this clears the confusion.
Reply With Quote
  #5 (permalink)  
Old 03-24-2008, 10:39 PM
Member
User
 
Join Date: Mar 2008
My distro: Debian, Slackware, LFS
Posts: 83
Rep Power: 1
Tux-Idiot is on a distinguished road
Post

man passwd
man shadow
man vipw
man vigr
man pwconv
man pwunconv
man grpconv
man grpunconv
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
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

Similar Threads

Thread Thread Starter Forum Replies Last Post
Passwd bubloob_13 Getting started tutorials 2 03-24-2008 11:04 PM
Redhat Users vsftpd FTP Passwd Reset Problem bubloob_13 CentOS / RHEL / Fedora 1 11-05-2007 09:03 PM
how to reset root and user passwords - new install forlornhope Linux software 2 07-05-2007 01:51 AM
can not find the username in /etc/passwd file subrata1in Getting started tutorials 5 03-27-2007 12:45 PM
passwd command on debian ac007 Linux software 1 12-28-2005 01:15 AM


All times are GMT +5.5. The time now is 03:24 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36