02-28-2005
Passwd edit
Thx for the reply, but this is where my problems start.
Firstly i try a tape recovery,once it gets to a point where i can select the files to recover it fails ie
ERROR : Tar: blocksize =0;broken pipe
ERROR: File: /usr/ccs not found
ERROR: file: /usr/obam not found and it carries on with further errors
Secondly i try a DVD recovery and boot from the DVD,but when i try to load files and dependencies, it tells me the file system is full.
That is I try to edit the passwd file , vi isnt loaded, so I add the file to the list and it trys to add the files to the system so i can edit the passwd file.But returns an error that the file system is full, so basically i am $##@@ right now.
So i was thinking of another tool that i could use to edit the passwd file ?
![EEK! Smilie](https://www.unix.com/images/smilies/eek.gif)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Newbie question:
How can I detect a corrupted file from a script (ksh)?
Thank you,
Martin (6 Replies)
Discussion started by: starless
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am new to UNIX, and have recently installed Suse 9.3. I have been experimenting with all of the commands and have somehow managed to modify the default shell of the root user to an invalid file. Consequently I cannot su to the root user as I receive the 'no such file or directory' error... (2 Replies)
Discussion started by: Tony Montana
2 Replies
3. HP-UX
Hello!
Do you know the meaning of...
"crw-rw---- 1 informix informix 64 0x020001 Jan 21 2004 rifxroot"
I don't know what the first "c" means. Furthermor, if I try to copy this file (rifxroot) it appears a message:
"cp: cannot open rifxroot: No such device or address"
I don't... (1 Reply)
Discussion started by: kaugrs
1 Replies
4. UNIX for Dummies Questions & Answers
Preparing for a move to a new server, I needed to offload about somewhat over a gigabyte of newsfeeds that my website collects, and that I had been saving on the server. I tarred them and zipped them into about a dozen smaller files of about 150Mb each. All seemed well. I downloaded them onto my... (3 Replies)
Discussion started by: JohnTinker
3 Replies
5. Red Hat
I accidentally changed root shell from /bin/bash to bash in /etc/password, then logged out from root. Now I can't login as root and got "No shell" error, although I have root password. "su -f -s /bin/bash" command does NOT work. There is no GUI interface for this system.
My question: Do I have... (7 Replies)
Discussion started by: aixlover
7 Replies
6. Solaris
Hi All
I work on solaris 8, 9 and 10 platforms and have encountered an error which is my wtmpx files appear to be corrupted as all entries contain the date 1970 (the birth of unix).
Now this is obviously not the case, so my query is:
1 - Can the existing wtmpx files be manipulated to... (6 Replies)
Discussion started by: drestarr96
6 Replies
7. Red Hat
Hi,
Unexpectedly i entered wrong entries in .bash_profile for my user which has administrative permissions. So, i am getting errors for every command. I dont have backup file also, so any body can help me how to recover it.
Regards,
Mastan (7 Replies)
Discussion started by: mastansaheb
7 Replies
8. UNIX for Dummies Questions & Answers
I have a legacy Solaris 8 machine. Someone has overwitten the passwd utility so I now can't change passwords.
Is there somwhere I can download a copy? I do have the installation CDs as well.
Thanks (1 Reply)
Discussion started by: hawess
1 Replies
9. UNIX for Dummies Questions & Answers
Hi Folks,
While transferring file from FTP software like Filezilla the files gets corrupted.
Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies
10. UNIX for Advanced & Expert Users
did a big mistake, changing root entry of /etc/passwd to
root:x:0:0:root:/root:/usr/bin/tmux split-window -v \; attach
as expected, now I can't login as root anymore. sudo ed /etc/passwd etc. doesn't work.
Any idea?
Use code tags to increase readability and follow the rules. (4 Replies)
Discussion started by: dodona
4 Replies
LEARN ABOUT OSF1
mkpasswd
mkpasswd(8) System Manager's Manual mkpasswd(8)
NAME
mkpasswd - Creates a version of the basic user database organized for efficient searches
SYNOPSIS
/usr/sbin/mkpasswd [-v] [-s size] passwdfile
DESCRIPTION
The mkpasswd command creates an auxiliary version of the basic user database in a form organized for efficient searches by the getpwuid
subroutine and the getpwnam subroutine. The mkpasswd command reads the user attributes in the /etc/passwd file and creates a hashed pass-
word database in the /etc/passwd.dir and /etc/passwd.pag files (see ndbm(3) reference page).
If you specify a file other than /etc/passwd, the command reads the user attributes in that file and creates a hashed password database in
the passwdfile.dir and passwdfile.pag files. It is important to know that the password file you designate must be in password file format
(see the passwd(4) reference page).
Note that if you use the vipw command to edit a password file, you do not need to use the mkpasswd command. This is because the vipw com-
mand automatically invokes the mkpasswd command which in turn creates the /etc/passwd.dir and /etc/passwd.pag files.
Only the root user should have execute access to the mkpasswd command.
Files accessed: File /etc/passwd /etc/passwd.pag /etc/passwd.dir passwdfile passwdfile.pag passwdfile.dir
The mkpasswd command may fail with a errno value of EFBIG if the password file is large (30,000 entries or more). This failure can be
avoided by using the -s option to set a larger page block size for the hashed database.
FLAGS
Specifies that each stored entry be listed on standard output Specifies the page block size to use in creating the hashed password data-
base. The size argument is a value from 1 to 32, representing page block sizes from 1024 to 32768, respectively. The default page block
size is 1024.
EXAMPLES
If you have not used vipw to edit the /etc/passwd and wish to generate a hashed password database, enter the following: /usr/sbin/mkpasswd
-v /etc/passwd An auxiliary version of the basic user database (/etc/passwd.dir and /etc/passwd.pag files) is created with a hashing algo-
rithm.
To create a hashed password database with a page block size of 8192, enter the following: /usr/sbin/makepasswd -s 8 /etc/passwd
SECURITY NOTE
If enhanced security is running on your system, the passwords are stored in the extended attributes database. See the Security guide for
more information about passwords in the enhanced security environment.
RETURN VALUES
The mkpasswd command exits with a nonzero exit code if any errors are detected.
ERRORS
If the mkpasswd request is not successful, the following error message is displayed: The passwdfile.dir and passwdfile.pag files already
exist from a previous execution of the same mkpasswd command.
FILES
Specifies the command path
RELATED INFORMATION
Commands: adduser(8), passwd(1), passwd(4), vipw(8)
Functions: getpwent(3), ndbm(3)
Manuals: Security delim off
mkpasswd(8)