- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/passwd is corrupted...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 10:56 PM
тАО04-26-2005 10:56 PM
Couldn't you please help recover file passwd?
He is corrupted. I copied the same file from the same station in /home/userlogin. How replace corrupted file in /etc?
Thanx in advance, Oleg.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 10:59 PM
тАО04-26-2005 10:59 PM
Re: /etc/passwd is corrupted...
Do you still have a login session ?
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:01 PM
тАО04-26-2005 11:01 PM
Re: /etc/passwd is corrupted...
Give a try with the command pwchk. I don't think it will repair corrupted files.
From your post, it looks like you have the backup copy in /home/userlogin.
cp /etc/passwd /etc/passwd.orig
cp /home/userlogin/passwd /etc/passwd
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:05 PM
тАО04-26-2005 11:05 PM
Re: /etc/passwd is corrupted...
I have one login session without root's rights.
Oleg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:08 PM
тАО04-26-2005 11:08 PM
Re: /etc/passwd is corrupted...
copy the saved passwd file back to the /etc directory
# cp /home/userlogin/passwd /etc/passwd
# pwck
to check if this password file is good.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:10 PM
тАО04-26-2005 11:10 PM
Re: /etc/passwd is corrupted...
Boot
Probably via power switch
interupt at the 10 second prompt
BO
Y Interact
hpux -is
You can then do this:
mount /var
mount /tmp
You should then be able to read a backup tape and restore the damaged files in /etc
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 02:44 AM
тАО04-27-2005 02:44 AM
Re: /etc/passwd is corrupted...
As guided by Steven you can come to single user mode. Here you do not require to enter old root passwd. It will come to # prompt straight away. Here you can play with your file and even set a new root passwd.
You can copy sample passwd file from /usr/newconfig/etc directory. But by doing so you will have to update it for all users which were there on system. This can be done if your existing passwd file can give you the information of atleast the existing user accounts. Another good thing to do will be copy sample file, update root account, reboot to multiuser mode and then restore file from backup.( With 2-3 session having logged in as root)
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 03:49 PM
тАО04-27-2005 03:49 PM
Re: /etc/passwd is corrupted...
I have only one login without root's rights and I can't copy "normal" passwd from /home/username to /etc becouse for /etc username haven't permissions.Please tell me can I copy passwd from /home/username to /etc in Single User Mode? (no from tape)
Oleg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 03:53 PM
тАО04-27-2005 03:53 PM
Re: /etc/passwd is corrupted...
Once you boot into the single user mode and follow the steps outlined by Steve, you will be logged in as root and will have enough permissions to copy the password file.
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 04:02 PM
тАО04-27-2005 04:02 PM
Re: /etc/passwd is corrupted...
You really need to have backups of this file regularly.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 05:07 PM
тАО04-27-2005 05:07 PM
Re: /etc/passwd is corrupted...
And now I have question about security: If some bad guy will want to change of accounts of some station he could do it if will have "phisical" access to station and keyboard?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 05:18 PM
тАО04-27-2005 05:18 PM
SolutionRegards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 05:30 PM
тАО04-27-2005 05:30 PM
Re: /etc/passwd is corrupted...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 05:30 PM
тАО04-27-2005 05:30 PM
Re: /etc/passwd is corrupted...
The unit needs to be in a locked office if its powerful and access can be used to damage other Unix systems.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 04:23 PM
тАО04-28-2005 04:23 PM
Re: /etc/passwd is corrupted...
Thanx in advance. Oleg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 04:34 PM
тАО04-28-2005 04:34 PM
Re: /etc/passwd is corrupted...
then you can edit the /etc/passwd file and remove the encrypted password entry in one of the fields to enable root login.
Then you can manipulate all other users.
What;s the feedback on the single user mode login!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 04:51 PM
тАО04-28-2005 04:51 PM
Re: /etc/passwd is corrupted...
Interupt the boot throug the console at the 10 second prompt
bo
Y Interact
hpux -is
You will now boot single user mode.
Is your system in trusted mode??
To check this
do a ls -l /tcb/files/auth/r
if any files like root are there, then your system could be in trusted mode.
# mount -a
# usr/lbin/tsconvert -r
this untrusts the system
do # passwd root
Changes the password
# /usr/lbin/tsconvert -rto put the system trusted.
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 05:42 PM
тАО04-28-2005 05:42 PM
Re: /etc/passwd is corrupted...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 05:48 PM
тАО04-28-2005 05:48 PM
Re: /etc/passwd is corrupted...
The password in the password field are encrypted and can't be edited to include the password of your choice. But you can always null it and the user will have a null password.
eg:
abc:&63936^HDUDh/hc:101
to
abc::101
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2005 06:10 PM
тАО04-28-2005 06:10 PM
Re: /etc/passwd is corrupted...
#man 4 passwd
to find out the manual pages for the file