02-13-2009
passwd command from another server
I made a mistake in a command and zero'd out the useradd and group add commands. Instead of restoring from backups, I copied the same files from another Linux server with the same OS. Everything worked fine, so you should be able to do the same.
It was very frustrating troubleshooting that one since I didn't notice the issue until I went through and tried to add some users on a later day. The command seemed to work because I got no errors, but nothing would appear in the /etc/passwd or group files.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
While playing with my LINUX machine i accidently deleted a file name called /etc/passwd . Even though the system is booted am unable to get the login prompt. Is there any remedy for this problem.:( (5 Replies)
Discussion started by: cyno
5 Replies
2. Shell Programming and Scripting
Hi All,
I just mistakingly deleted some files using rm command.Is there a way to get it back?i work on Solaris 10
Thanks,
Kumar (1 Reply)
Discussion started by: kumarsaravana_s
1 Replies
3. Solaris
Hi Folks ,
Would be grateful if someone could help me out in one of the question that came to my mind . If the /etc/passwd file has been deleted and the system has been rebooted . Then i dont think that any user would be able to login and the system will be useless . Whats the best solution for... (5 Replies)
Discussion started by: gera_sachin125
5 Replies
4. Shell Programming and Scripting
I have a file like below
4 0 /work/ram/jagan/irt_XXrules.dat
4 0 /work/ram/jagan/irt_NNrules.dat
4 0 /work/ram/jagan/irt_MMrules.dat
4 0 /work/ram/jagan/irt_ZZrules.dat
My output should be
4 0 XXrules
4 0 NNrules
4 0 MMrules
4 0 ZZrules (3 Replies)
Discussion started by: suresh3566
3 Replies
5. UNIX for Dummies Questions & Answers
Solaris 10/Korn
Hi unix experts!,
Is it possible to output the actual file names to a file as they are being deleted via the rm command?
Context:
Im executing the shell script at the command line and directing the output to an output file eg purgescript.ksh > output.lst
within the... (3 Replies)
Discussion started by: satnamx
3 Replies
6. Solaris
Hi all..
I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode.
But, I forgot to enable the abort key-sequence which I earlier disabled.
Stuck!
One of my gurus told I had to... (9 Replies)
Discussion started by: satish51392111
9 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have deleted a file and commited in CVS.
So, is there any CVS command to revert back that deleted file with existing log messages.
--Thanks in advance
Madhu (1 Reply)
Discussion started by: madhuti
1 Replies
8. Shell Programming and Scripting
Hi,
I've been searching around for solution, hope that some gurus here can help.
I'm using some commands in my shell script and I'd like to protect these command to be moved to another directory. For instance, cp currently in /bin/cp. If I move it to /bin/cpxxx, my script will not be able to... (3 Replies)
Discussion started by: gklntn
3 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I accidentally deleted a important folder using rm command.
Can i recover that folder.
I don't have any backup mechanism.
Please suggest.... its very urgant..Plz (1 Reply)
Discussion started by: vijay.gandra
1 Replies
10. UNIX for Dummies Questions & Answers
Hi
I was accessing our linux test server via putty and By mistake i deleted /etc/passwd file.....
It is allowing me to login..... So could anyone please help me out in this issue....
Please, it is urgent (6 Replies)
Discussion started by: rahul547
6 Replies
pwconv(1M) System Administration Commands pwconv(1M)
NAME
pwconv - installs and updates /etc/shadow with information from /etc/passwd
SYNOPSIS
pwconv
DESCRIPTION
The pwconv command creates and updates /etc/shadow with information from /etc/passwd.
pwconv relies on a special value of 'x' in the password field of /etc/passwd. This value of 'x' indicates that the password for the user is
already in /etc/shadow and should not be modified.
If the /etc/shadow file does not exist, this command will create /etc/shadow with information from /etc/passwd. The command populates
/etc/shadow with the user's login name, password, and password aging information. If password aging information does not exist in
/etc/passwd for a given user, none will be added to /etc/shadow. However, the last changed information will always be updated.
If the /etc/shadow file does exist, the following tasks will be performed:
Entries that are in the /etc/passwd file and not in the /etc/shadow file will be added to the /etc/shadow file.
Entries that are in the /etc/shadow file and not in the /etc/passwd file will be removed from /etc/shadow.
Password attributes (for example, password and aging information) that exist in an /etc/passwd entry will be moved to the corre-
sponding entry in /etc/shadow.
The pwconv command can only be used by the super-user.
FILES
/etc/opasswd
/etc/oshadow
/etc/passwd
/etc/shadow
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
passwd(1), passmgmt(1M), usermod(1M), passwd(4), attributes(5)
DIAGNOSTICS
pwconv exits with one of the following values:
0 SUCCESS.
1 Permission denied.
2 Invalid command syntax.
3 Unexpected failure. Conversion not done.
4 Unexpected failure. Password file(s) missing.
5 Password file(s) busy. Try again later.
6 Bad entry in /etc/shadow file.
SunOS 5.10 9 Mar 1993 pwconv(1M)