Operating System - HP-UX
1825766 Members
2172 Online
109687 Solutions
New Discussion

Re: How do I change root password

 
David_246
Trusted Contributor

How do I change root password

Hi,

We have implemented a tool so yu don't need to know the actual root-password anymore. This makes we generate a new root-password every month, write it down and put it in a safe.

But, what if we make a typo ? Of course you don't as you double check twice, but just in case. How do I reset my root-password ?

I know I have to boot of cdrom, mount the root-disk. But we have LVM !! how do I mount in the correct disk, make sure that when I boot after the change, my boot-disk (mirrored) are still fine to boot?

Can anyone help ?


Best Regs David
@yourservice
9 REPLIES 9
Jerome Baron
Respected Contributor

Re: How do I change root password

to reset passwd :
boot in single user mode (interrupt boot and hpux -is)
your are in superuser mode use passwd to set a new password.

Regards,
Jerome
Armin Feller
Honored Contributor

Re: How do I change root password

Hi,

do following:

?? switch off/on the system
?? break bootprocess [Esc]
?? boot to ISL
>boot pri isl
interact with IPL? YES
?? boot into SingleUser
ISL> hpux -is
?? re-set the root password
# passwd
new password:
repeat new password:
?? the reboot the system
# cd /
# shutdown -r 0

Best regards ...
Armin
David_246
Trusted Contributor

Re: How do I change root password

Hi Jerome,

I am sorry, but we have a secured system. So the root-password is needed to login to single user mode :(
So we have to login using a CDROM

Regs David
@yourservice
Eugeny Brychkov
Honored Contributor

Re: How do I change root password

David,
CD disk you're talking about is support/recovery CD (maybe OS installation CD). You boot from it, then follow recommendations displayed and choosing right options.
PDC: bo alt (if alt is CD-ROMs path)
interact isl - no
menu will be displayed, you choose 'recover system', then you're exiting recovery shell, issue commands to mount root disks (they will be displayed) and then editing passwrd file or issuing 'passwd' command.
I would recommend you to try to do all these on non-production sytem first :o)
Eugeny
Ravi_8
Honored Contributor

Re: How do I change root password

Hi,

Do you know the old password? If so just use the passwd command.

If not, vi the /tcb/auth/files/r/root file

remove the hash code between = and : , i.e..
:u_pwd=fBX819fJCbb2w::u_pwd=:
Then use the passwd command.

Becareful editing that file.
never give up
Armin Feller
Honored Contributor

Re: How do I change root password

Hi,

if the procedure of "Eugeny Brychkov" does not work, try to unconvert the trused system first by:

# /etc/tsconvert -r
# cd /.secure
# rm -r *
# cd /
# rmdir .secure

and then use the command:

# passwd

Regards ...
Armin
Trond Haugen
Honored Contributor

Re: How do I change root password

You CAN boot in single user modeif you disable secure mode first. To do that you'll have to disconnect the boot disks first.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Andre Lemon
Regular Advisor

Re: How do I change root password

Maybe you want to consider having a second username with
root capabilities and you can logon using that id, then use
SAM to change the 'root' userid password. Of course
you would keep this userid
and password information
restricted to the System Admin.

Andre'
Anil C. Sedha
Trusted Contributor

Re: How do I change root password

Very simple..

Use "sudo". Very easy to setup too.

What it will do is that everytime you run a command with root access use the command with sudo. In the list of sudoers, you can list your name and specify the type of access that you want to have or provide.

This way you can allow limited root access also to other users at work.

You can change your root password also, since you use only your id's password to run sudo.

-Anil
If you need to learn, now is the best opportunity