- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- single user mode - changing root passwd
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
тАО08-15-2007 06:49 PM
тАО08-15-2007 06:49 PM
I played with SSH, RSH, Rlogin, inetd, and bash shell . Suddenly, i am not able to login to the box as a root user (physically, and remotely). I am not understanding what went wrong.
I have copied the /etc/nsswitch.hpdefault to /etc/nsswitch.conf and modified /etc/nsswitch.conf with "files" as staring options for "hosts" and "networks". Does this actions caused this problem ?
Can anyone tell me, how to go single user mode in HP-Ux so that i can change the root passwd?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 06:56 PM
тАО08-15-2007 06:56 PM
Re: single user mode - changing root passwd
at the IPL> prompt type 'hpux -is'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 07:10 PM
тАО08-15-2007 07:10 PM
Re: single user mode - changing root passwd
You can't change the default shell in root to bash in /etc/passwd. Well actually you can but your system will stop working, so don't do that.
All hpux machines have a 10 second prompt that permits you to interupt boot at console.
bo
# Answer Y to interact question.
hpux -is
Just as a pointer, -lm will take you into logical volume maintenance mode which is useful for lvm problems in the future.
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
тАО08-15-2007 07:11 PM
тАО08-15-2007 07:11 PM
Re: single user mode - changing root passwd
1.Reboot the system.
2.Interrupt the autoboot process when it asks to do so.
3.In main menu give "bo pri"
4.Press "Y" to interact with IPL
5.In ISL prompt give "hpux -is" to boot the system into single user mode
6.System will boot into single user mode.
7.Then you can use passwd command to change the password
8.The steps may not work for Trusted systems.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 07:16 PM
тАО08-15-2007 07:16 PM
Re: single user mode - changing root passwd
Please select a boot option
HP-UX Primary Boot: 0/1/1/1.2.0
EFI Shell [Built-in]
Boot option maintenance menu
Security/Password Menu
Press Any Key to interrupt Autoboot
AUTO ==> boot :IINSTALL
Seconds left till autoboot - 9
>> Interrupt the auto-boot sequence by pressing the SPACE bar.
HP-UX Single user mode:
HPUX> boot vmunix -is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 07:21 PM
тАО08-15-2007 07:21 PM
Re: single user mode - changing root passwd
Shashi,
I encourage you to learn from our knowledge based, system boot handbook.
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01037092-1
hope this help
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:33 PM
тАО08-15-2007 08:33 PM
Re: single user mode - changing root passwd
I have gone to the single user mode, changed the password for root, and changed the shell of root from "/usr/local/bin/bash" to "/sbin/sh", rebooted the box, but still root not able to login.
Once again went to single user mode, added a normal user, rebooted the box, but still even a normal user also not able to login.
What is this behaviour in HP-Ux ?
I am not understanding, which one is the cause for this problem .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:40 PM
тАО08-15-2007 08:40 PM
Re: single user mode - changing root passwd
Could you paste the error you are getting when you login?
Thanks
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:42 PM
тАО08-15-2007 08:42 PM
Re: single user mode - changing root passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:46 PM
тАО08-15-2007 08:46 PM
Re: single user mode - changing root passwd
Are you able to change the password in single user mode?
Are you able login through console?
If /etc/securetty is present, check the content or move the file and try to login.
Thanks.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:48 PM
тАО08-15-2007 08:48 PM
Re: single user mode - changing root passwd
Shashi,
1) Are you in trusted system mode ?
if you can go to single user mode.
2) /usr/lbin/tsconvert -r
3) change root password
4) init 3 (to multi user mode)
5) login again.
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:52 PM
тАО08-15-2007 08:52 PM
Re: single user mode - changing root passwd
/etc/securetty file is present, and this file conatils an entry "console"
I have deleted that entry, then i executed "login" command , and given my root credentials, but still it fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:56 PM
тАО08-15-2007 08:56 PM
Re: single user mode - changing root passwd
I am running the system in trusted mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 08:58 PM
тАО08-15-2007 08:58 PM
Re: single user mode - changing root passwd
In HP-Ux , which log file contains the all login attemts ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:01 PM
тАО08-15-2007 09:01 PM
Re: single user mode - changing root passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:04 PM
тАО08-15-2007 09:04 PM
Re: single user mode - changing root passwd
logged in as root, boot the system into single user mode, fsck the file
systems if necessary and reset the root password:
# mount -a
# /usr/sam/lbin/usermod.sam -F -p "" root
Note: The system should be kept in a secure place and only users with
appropriate privileges should have access to the system to boot it
into single user mode.
Initialize the system into multi user mode, login as root and choose a correct
root password. Remain logged in as root and verify that the new password works.
Note: If boot authentication has been configured, the root password also
needs to be supplied to login to single user mode. The above solution
will not work in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:10 PM
тАО08-15-2007 09:10 PM
Re: single user mode - changing root passwd
# /usr/lbin/modprpw -m
usrpick=NO,syspnpw=NO,rstrpw=NO,nullpw=NO,syschpw=NO,sysltpw=NO [username]
#
For example:
# /usr/lbin/modprpw -m
usrpick=NO,syspnpw=NO,rstrpw=NO,nullpw=NO,syschpw=NO,sysltpw=NO cmcd
#
Logged in as cmcd:
$ passwd
Changing password for cmcd
Old password:
Last successful password change for cmcd888: Wed Sep 15 16:18:05 2004
Last unsuccessful password change for cmcd888: NEVER
passwd: not allowed to run passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:31 PM
тАО08-15-2007 09:31 PM
Re: single user mode - changing root passwd
Hi Shashi,
Try move the file /etc/securetty instead of remove the "console" entry.
#mv /etc/securetty /etc/securetty.old
I am not sure how you are login into the system. If that file contain the entry "console", then you will be able to login as root through serial console only.
Thanks.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:35 PM
тАО08-15-2007 09:35 PM
Re: single user mode - changing root passwd
/usr/lbin/modprpw -- doesn't help.
I think, above two are for trusted systems.
i have moved the /etc/securetty file to /etc/securetty.bak
But, still, no user (root, as well as my normal users) not able to login (physically - console, as well as remotely).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:50 PM
тАО08-15-2007 09:50 PM
Re: single user mode - changing root passwd
--
I played with SSH, RSH, Rlogin, inetd, and bash shell
--
Did you change the /etc/inetd.conf file, could you remove the changes or cp a backup file back?
If /usr is mounted could you run pwck?
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 09:54 PM
тАО08-15-2007 09:54 PM
Re: single user mode - changing root passwd
It seems something strange with /etc/pam.conf
Check the file permission and ownership of this file. ownership shoud be root:sys and permission should be 444
If it doesn't work try move this file to some other name. Then copy the templete from /usr/newconfig/etc/pam.conf
#mv /etc/pam.conf /etc/pam.conf.old
#cp /usr/newconfig/etc/pam.conf /etc/pam.conf
Again check the permission and ownership and try login
Thanks
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2007 10:10 PM
тАО08-15-2007 10:10 PM
Solutionpwck
grpck
There seems to be an inconsistency in the /etc/passwd or group files.
Or the changes to nsswitch.conf are causing problems.
You need to review all changes that were done to implement the bash shell and think about backing them out.
Try the passwd command in single user mode.
If it fails see what is written to the syslog file. mount /var and /usr before trying the command.
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
тАО08-15-2007 11:45 PM
тАО08-15-2007 11:45 PM
Re: single user mode - changing root passwd
But, i am not understanding, how nsswitch effects the login problem?
My nsswitch.conf looks like bellow, this file is copied from /etc/nswitch.hp_defaults, and i have done few modifications.
passwd: compat
group: compat
hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]
ipnodes: dns [NOTFOUND=return] files
networks: files nis [NOTFOUND=return]
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files
I have removed "files" word at end, and added in the begining of "hosts" and "networks" options.
How this line caused this problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2007 12:37 AM
тАО08-16-2007 12:37 AM
Re: single user mode - changing root passwd
/etc/nsswitch.conf can tell your system how to authenticate users.
With the wrong options, you could have asked root to authenticate against a windows ads primary domain controller. root isn't going to like that very much.
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
тАО08-16-2007 04:26 PM
тАО08-16-2007 04:26 PM