LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-14-2011, 10:24 PM   #1
linuxravindra414
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Rep: Reputation: 0
Problem with /etc/passwd and /etc/passwd- files


hi all..
we know that /etc/passwd - is a replica of /etc/passwd file and acts as a backup in any damage done to /etc/passwd file..
i have observed a strange thing in RHEL 5.4....
for example... if /etc/passwd has 100 accounts.. then /etc/passwd - is having only 99 accounts....
when i add 101 useraccount with "useradd" then /etc/passwd has 101 accounts and /etc/passwd is having the 100th account of /etc/passwd - ..
when i delete /etc/passwd and recover it with /etc/passwd - from runlevel 1 the lastly created user is not having his account after recovery.. what is the solution?
this is same case even with /etc/shadow and /etc/shadow -
thanks in advance...

Last edited by linuxravindra414; 01-15-2011 at 12:45 AM. Reason: gramitical error
 
Old 01-15-2011, 04:46 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,

The dash files (passwd-, shadow-, gshadow- and group-) are backups of the previous version, not the current version. I.e.: If you add a user (or make some other change) the original (without the changes) is saved as a dash file.

Hope this helps.
 
2 members found this post helpful.
Old 01-15-2011, 05:17 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Quote:
Originally Posted by linuxravindra414 View Post
what is the solution?
Make copies of both the file itself and its backup file.
 
1 members found this post helpful.
  


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
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 04:20 AM
/etc/group and /etc passwd files ygloo VectorLinux 3 09-21-2006 07:23 PM
restoring passwd/group files jhaiduce Fedora 1 10-20-2004 10:05 AM
splitting up the passwd and shadow files Burgin Linux - General 1 07-26-2004 09:39 PM
synchronized passwd files? Calamus Linux - Networking 1 01-07-2003 06:38 AM


All times are GMT -5. The time now is 03:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration