This is a discussion on Sudoers file and system shutdown problem within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Help please I have today messed up my sudoers file which means no users can sudo in to our ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Help please I have today messed up my sudoers file which means no users can sudo in to our system. I therefore need to do a restore of the file - no problems, I have a backup. Now comes the problem. The system is secure, and nobody seems to know the root password. The system will not let me su - to log in as root How do I run the Shutdown process, as I need to log in as root to run this? Many thanks Gary |
| |||
| gary.cobden@nhs.net wrote: > The system is secure, and nobody seems to know the root password. > How do I run the Shutdown process, as I need to log in as root to run > this? Are you sure the single-user boot is unprotected? -- Alex. |
| |||
| On 2005-09-30, gary.cobden@nhs.net <gary.cobden@nhs.net> wrote: > I have today messed up my sudoers file which means no users can sudo in > to our system. This is why right way to change the sudoers file is using visudo. (And batch changes should use "visudo -c" on the temp tile before renaming it.) > The system is secure, and nobody seems to know the root password. How do you know it's secure ? -- Elvis Notargiacomo master AT barefaced DOT cheek http://www.notatla.org.uk/goen/ Powergen write "Why not stay with us" - let me count the ways! |
| |||
| gary.cobden@nhs.net wrote: > Help please > > I have today messed up my sudoers file which means no users can sudo in > to our system. > > I therefore need to do a restore of the file - no problems, I have a > backup. > > Now comes the problem. > > The system is secure, and nobody seems to know the root password. > > The system will not let me su - to log in as root > > How do I run the Shutdown process, as I need to log in as root to run > this? > > Many thanks > > Gary > is there a /etc/shutdown.allow file on the system? if it has no names then only root can reboot, if there are other names then they can shutdown too. If the system is set in secure mode then you will need to power off the system, disconnect the primary and secondary boot disk then power it up, once it is done with self test it will fail boot and reset secure mode. Then power down again, reconnect disks and then interuppt the IPL and you can then go to single user mode and change root's passwd. |
| ||||
| gary.cobden@nhs.net writes: > Help please > > I have today messed up my sudoers file which means no users can sudo in > to our system. > > I therefore need to do a restore of the file - no problems, I have a > backup. > > Now comes the problem. > > The system is secure, and nobody seems to know the root password. If you are using HP's Data Protector, you could restore /etc/passwd of any system to the target system without knowing the root password (for the restore). If you (temporarily) restore a password file where you know the root's password, you could log in. When in doubt, prepare an empty root password on some machine, backup, and restore it to the target machine. Log in as root, then restore the last good password file to the target and change the root's password. For the future maybe install an authorized SSH key for root login without knowing a password... Hope it helps. Regards, Ulrich > > The system will not let me su - to log in as root > > How do I run the Shutdown process, as I need to log in as root to run > this? > > Many thanks > > Gary |