- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem with /etc/password
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
Forums
Discussions
Discussions
Discussions
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
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
08-20-2002 01:36 PM
08-20-2002 01:36 PM
Problem with /etc/password
I am not able log into HP machine because I changed the login shell for root from /bin/sh to /bin/ksh in /etc/password file. Now I m not able to login in to the machine. I get the following message. Please help me to recover.
Local flow control on
Telnet TERMINAL-SPEED option ON
HP-UX ozzie B.11.00 U 9000/800 (ta)
login: root
Password:
Please wait...checking for disk quotas
No shell
Connection closed by foreign host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 01:39 PM
08-20-2002 01:39 PM
Re: Problem with /etc/password
You will need to boot from your recovery media and mount / as /root and edit /root/etc/passwd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 02:37 PM
08-20-2002 02:37 PM
Re: Problem with /etc/password
Do you have another user at UID 0?
If so, you can repair that way by logging in as an alternate admin.
If your not sure, log in as a regular user and more /etc/passwd to see if there is another user at UID 0. If so, your on your way to being in.
Note - Be very careful and mindful of multiple admin accounts as they can lead to trouble.
Good luck,
Kel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 03:40 PM
08-20-2002 03:40 PM
Re: Problem with /etc/password
One other thing to try IF you have another HP-UX system with access to a root account
1) Login to the other system as or become root
2) ftp to the original system - as root
ftp> cd /etc
ftp> lcd /etc
ftp> rename passwd passwd.bad
ftp> bin
ftp> put passwd
Then try to login to the original system. If you get in edit the passwd.bad BACK to proper shell, rename the "temp" passwd file to passwd.tmp & the original back to passwd.
It's a good idea to keep a safe backup copy of the passwd & group files somewhere on the system & cron it to copy it out at least once a week - even more if the file changes frequently.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 04:15 PM
08-20-2002 04:15 PM
Re: Problem with /etc/password
(2) boot (power on)
(3) interrupt boot cycle and boot from your normal boot device BUT say "Y" to interact with ISL
(4) then enter
hpux -is
(5) then when in single user mode
fsck
mount -a
(6) then fix /etc/passwd
then reboot
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2002 05:51 PM
08-20-2002 05:51 PM
Re: Problem with /etc/password
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:38 AM
08-21-2002 08:38 AM
Re: Problem with /etc/password
Thanks for all ur replys. I tried all the option
Mr Stephenson,
I did bootup from recovery media
but and we to the maintenance shell, but u cannot mount any thing in maitenance shell.
Hi Kelli,
Unfortuantely, I didn't have any user with UID 0.
Hi Jeff,
I tried ftp, but login would fail as soon as u type root as a user.
Hi Harry,
Your solution was right on the money. I followed exactly and got the problems fix.
Hi Sridhar,
Only the root shell was wrong, therefore the system would never come to single user mode unless and until we bring it up to single user mode. I was able to loggin as a different log
Thanks u all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 06:32 PM
08-21-2002 06:32 PM
Re: Problem with /etc/password
Something to remember, any time you make a change to the root entry of the password file make sure to su to root and make sure it works.
That way if it doesn't, your still logged in as root and can fix the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:39 PM
08-21-2002 08:39 PM
Re: Problem with /etc/password
hv you tried "switch user" , i mean login as another user & do an
$ su
Kapil Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2002 08:42 PM
08-21-2002 08:42 PM
Re: Problem with /etc/password
mv /bin/ksh /bin/ksh.old (backup)
ln /bin/sh /bin/ksh
once u r able to login remove the link & restore actual /bin/ksh from the back up copy
Kapil Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:09 AM
08-22-2002 10:09 AM
Re: Problem with /etc/password
We didn't realise that we made a typogrphical mistake in the passwd file. Once we logged out, we were not able to login. It is true that we should not edit /etc/passwd file.
Kapil,
ur theory sounds very good that we should use link. Unfortunately, I don't think the ln command is available in a single user mode. But I would confirm it,
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:18 AM
08-22-2002 10:18 AM
Re: Problem with /etc/password
If you do require to for a reason edit the /etc/passwd file then use vipw this will lock the password file to stop any discrepencies.
To check the passwd for for inconsistency use
pwck
Can't remember whether /usr is mounted in single user mode (don't think it is)
Just mount it (if not) then you can use ln command.
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:27 AM
08-22-2002 10:27 AM
Re: Problem with /etc/password
To be safe that this does not occur in the future, make sure all the legitimate shells are included in the /etc/shells file. Do a man on "shells" to get more info. Sometimes a shell you think is legitimate may not be included in /etc/shells, and if it does not exist, you will may run into this problem. And finally it always helps to make sure that the shell you have assigned to any user does indeed exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 12:29 PM
08-22-2002 12:29 PM
Re: Problem with /etc/password
Maybe this link can help. This is the recovery procedure for 10.20, but the same sort of guidelines can be followed for 11.0. The cd to be used under 11.0 would be the core install cd.
http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000047869320
The doc id is OZBEKBRC00000581
Also try this pdf from the cookbook,
http://us-support2.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/SystemRecovery.pdf
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 12:45 PM
08-22-2002 12:45 PM
Re: Problem with /etc/password
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 06:55 AM
08-23-2002 06:55 AM
Re: Problem with /etc/password
I got to learn a lot from all ur suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2002 10:11 AM
09-12-2002 10:11 AM
Re: Problem with /etc/password
Just a reminder to give points out to those who answered your questions. It only takes a moment, and helps make the forums more useful to everyone.
Sean