Unix Technical Forum

Sudoers file and system shutdown problem

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 07:28 PM
gary.cobden@nhs.net
 
Posts: n/a
Default Sudoers file and system shutdown problem

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 07:28 PM
Alex van Denzel
 
Posts: n/a
Default Re: Sudoers file and system shutdown problem

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 07:28 PM
all mail refused
 
Posts: n/a
Default Re: Sudoers file and system shutdown problem

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 07:28 PM
Alan D Johnson
 
Posts: n/a
Default Re: Sudoers file and system shutdown problem

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 07:28 PM
Ulrich Windl
 
Posts: n/a
Default Re: Sudoers file and system shutdown problem

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com