Operating System - HP-UX
1838498 Members
3239 Online
110126 Solutions
New Discussion

i dont have ROOT user on HP-UX

 
SOLVED
Go to solution
Lakshmikanth Baddam
Frequent Advisor

i dont have ROOT user on HP-UX

Hi guys,

I dont have ROOT user under my
cd /home

how can i get that now i am using..
#su -
to become root user and how to set password to user ID ROOT
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: i dont have ROOT user on HP-UX

You don't want root's home directory under /home because /home will not be mounted in single-user mode. By default root's home directory is / although generally a better option is to create a directory like /root on the / filesystem and let /root be root's home directory.

In any event, if you have lost root's password then you will need to bring the machine up in single-user mode by interrupting the boot process at the console and entering "boot pri" and responding "Y" to "Interact with IPL/ISL?" At that point you enter "hpux -is" and that will bring up up with only / mounted as root.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor
Solution

Re: i dont have ROOT user on HP-UX

By default root's home directory is '/'.

If you want to change it, you must edit the /etc/passwd file, create the home directory where ever you want it to be, and then copy root's dot files (.profile, .ssh, etc.) to the new location.

To set the password, one you log in you just execute:

# passwd

Patrick Wallek
Honored Contributor

Re: i dont have ROOT user on HP-UX

I have to disagree with Clay here.

I have root's home directory set to /home on all of my systems. I can still boot up in single-user mode with no problem. I have never had anything bad happen because of it. If I need something from the home directory, I'll mount /home.

If I screw up and create a big file in root's home directory, I would much rather fill up /home than /.
Mancboy
Valued Contributor

Re: i dont have ROOT user on HP-UX

log on as a normal user

su to root (not su -)

edit /etc/passwd and change the home area to be "/" and not "/home"

also ensure that your shell is "/sbin/sh".

Some clever soul where I now work changed the shell to be bash and the home to /home/root - not a great mix for single user mode.
inventsekar_1
Respected Contributor

Re: i dont have ROOT user on HP-UX

*as a root, simply run "cd"..when running cd alone it will go to its home directory.

*more /etc/passwd --> u can see the root user home directory. if u want to change it to a directory, use usermod -d option. read about it thru man usermod.

Be Tomorrow, Today.
Lakshmikanth Baddam
Frequent Advisor

Re: i dont have ROOT user on HP-UX

thnx to all
DCE
Honored Contributor

Re: i dont have ROOT user on HP-UX


I disagree with Clay and Patrick. I suggest you make a /root directory and make sure it owned by root, tnen change the permissions to 700 so only root has access to it. That way you have access to all of roots' files in single user mode, and no one else can browse/copy them
Lakshmikanth Baddam
Frequent Advisor

Re: i dont have ROOT user on HP-UX

can any one give the steps instead of giving me the link or URL.

I need the steps to perform before installing ServiceGuard. like adding some IP (heart beat)to /etc/hosts or any thing as such what is this heartbeat Ip how can i chk it or get them.