- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: root has no shell
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
03-29-2005 04:31 AM
03-29-2005 04:31 AM
Is there any way I can change the root password entry without having to bring down the server. This is a production server.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:39 AM
03-29-2005 04:39 AM
Solutionroot:x:0:3::/:/sbin/sh
Then you could restore it - else you will have to boot to single user mode....
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:39 AM
03-29-2005 04:39 AM
Re: root has no shell
or login as normal user and then run su , without (-)
If this does not work then you have boot server in single user mode and modify /etc/passwd file.
run vipw to see if passwd file is OK.
Goodluck
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:41 AM
03-29-2005 04:41 AM
Re: root has no shell
Also see if "sudo" is available. It is possible the previous admin had setup some tools for non-root users.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:42 AM
03-29-2005 04:42 AM
Re: root has no shell
is ksh found in this path?!
try /usr/bin/ksh (default path for ksh in HP)
or
/sbin/sh (but you will logon in shell sh)
and what is your OS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:45 AM
03-29-2005 04:45 AM
Re: root has no shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 04:54 AM
03-29-2005 04:54 AM
Re: root has no shell
Can't do that, makes the system unstable.
Boot to single user mode.
Interupt at the 10 second prompt after a hard boot, at the console
bo pri
Y (Yes, Interact)
hpux -is
after it boots
mount /var
mount /usr
vi /etc/passwd
Fix it.
NEVER let anyone change the root shell again.
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
03-29-2005 05:30 AM
03-29-2005 05:30 AM
Re: root has no shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 05:34 AM
03-29-2005 05:34 AM
Re: root has no shell
ln -s /sbin/sh /sbin/ksh
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 02:37 PM
03-29-2005 02:37 PM
Re: root has no shell
Try using su root (not su - root) to login. This may give you the current shell but with root privilege. This situation is one of the many reasons that you need to install and use sudo in order to fix problems without having to login as root.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 03:50 PM
03-29-2005 03:50 PM
Re: root has no shell
This, of course assumes you got back in. I had the same thing happen to me. There was another user with UID 0 so I was able to get back in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 12:42 AM
03-30-2005 12:42 AM
Re: root has no shell
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2005 02:27 AM
03-30-2005 02:27 AM
Re: root has no shell
If this was done to allow ftp access for root, then this would be the ideal way of fixing it -
#########################################
ftp-get /bin/sh (binary!)
cd /sbin
ftp-put sh with remote name ksh (binary!)
chmod 755 ksh
login, chsh to /bin/sh, test login again, rm /sbin/ksh
put root back into /etc/ftpusers to block login.
Anyone will be pleased to help You find another solution for the issue that would have led to this shell-switch.
###########
and if it was not done for that reason, and You don't get in via ftp then yes, reboot and change shells, but before booting up again ensure there are *tested* backups of the system.
I'd get very suspicious in that situation You're in and would probably use diagnostics to make copies of the disks in vg00 or something like that, before running the startup scripts.
If the system comes up fine, at least get the 'rkhunter' perl script and hp-ux bastille and search for backdoors and rootkits.
the shell change might have been a mistake or a very weird way of saying 'learn to be careful with the box from the beginning' or the point where You have to suspect a classical internal attack and call in authorities.