Kari,

Since you are having trouble with sudo, my guess is that none of above
mentioned methods doing through sudo, etc. is going to work.

If 'sudo -i' or enabling root login works, that is great.  Otherwise,
you need to boot the system into single user mode, which by default I
believe do not require root password (at least that is the case in Red
Hat land).   Here is a link to boot into single user, or recovery mode
for Ubuntu:

http://www.cyberciti.biz/faq/howto-boot-ubuntu-linux-rescue-mode/

Once you are there you can edit your /etc/sudoers file or enable root
login.   Here is a suggestion of some general best practice,

  - Make sure you back up your critical data first before you do
anything.
  - Read thru the instructions carefully (and practice it on another
system if possible)
  - Device a plan of attack and think through the steps you are going
to do before doing anything there.   Test your steps on a spare system
if possible.

A root user in single user mode is almost your last line of defense
before wiping out and rebuild.  You have all the power to alter the
system.  When you mess up the system, it can be in a unrecoverable
state if you are not careful.  I don't think anyone who replies here
has a system in the state you described, or know why and hence can
duplicate the problem you have.   So proceed with great care.

If you are not totally sure, discuss your plan of attack here.
Hopefully I'll be at where I have a Ubuntu box to play with and to
verify your steps to be of some real help (I am at work, and all of
our servers are RHEL/CentOS) and desktops are Fedora.   Sorry, Ubuntu
fans.  As hot as it is for Linux home users, and as much as I like it,
Ubuntu hasn't quite make it into work place yet.

Hope this helps!

Guan Hsu


On Jul 15, 11:11 pm, Paul Tader <[email protected]> wrote:
> ..and/or can you send us the output from the command:
>
> $ sudo -l
>
> On 07/15/2010 06:16 PM, Jeremiah Bess wrote:
>
>
>
> > Can you run cat on the "/etc/sudoers" file?
>
> > Jeremiah E. Bess
> > Network Ninja, Penguin Geek, Father of four
>
> > On Thu, Jul 15, 2010 at 16:47, Kari Matthews <[email protected]
> > <mailto:[email protected]>> wrote:
>
> >     Okay, let's see.
>
> >     I can't do this b/c I can't sudo anything.  Or am I wrong?  I have
> >     not yet touched the server b/c I want to make sure I know what I'm
> >     doing before I get into this.
>
> >     How would you guess I fell off the sudo list?
>
> >     On Thu, Jul 15, 2010 at 4:40 PM, Jeremiah Bess
> >     <[email protected] <mailto:[email protected]>> wrote:
>
> >         Ubuntu did things differently, and there is no set root
> >         password, and the account is locked. This method should work to
> >         enable the root account. You can disable it as well. Here is
> >         some info I just dug up on it:
>
> >        
> > https://help.ubuntu.com/community/RootSudo#Enabling%20the%20root%20ac...
>
> >         Jeremiah E. Bess
> >         Network Ninja, Penguin Geek, Father of four
>
> >         On Thu, Jul 15, 2010 at 15:36, Kari Matthews <[email protected]
> >         <mailto:[email protected]>> wrote:
>
> >             Thank you!  I've googled a ton and didn't come up with this,
> >             so your directions are helpful.
>
> >             I am wondering, though, how something like this happens.
>
> >             Also, it's a Ubuntu machine (10.04) -- is there a root
> >             password?  The only password I ever created was my own when
> >             I installed.  I assumed there was no root password.
>
> >             Thanks again.
>
> >             ~kari
>
> >             On Thu, Jul 15, 2010 at 4:33 PM, Jeremiah Bess
> >             <[email protected] <mailto:[email protected]>>
> >             wrote:
>
> >                 Don't be afraid, it's really easy to fix this. It will
> >                 require a reboot, but unless you already have data
> >                 corruption, you won't lose anything. I am assuming you
> >                 do not have the password for root. If you do, ignore
> >                 this, and login as root.
>
> >                 Boot to a LiveCD, and mount the hard drive. Open the
> >                 /etc/shadow file, and find an root account. The first
> >                 field (fields are separated by a colon) is the username,
> >                 root. The second is the encrypted password for that
> >                 account. Delete the password portion (leave the colons).
> >                 Save the file, and reboot back to the hard drive. Now
> >                 the password will be blank for the root account. Now
> >                 that you are in, edit the /etc/sudoers file with the
> >                 visudo command.
>
> >                 Jeremiah E. Bess
> >                 Network Ninja, Penguin Geek, Father of four
>
> >                 On Thu, Jul 15, 2010 at 15:27, Kari Matthews
> >                 <[email protected] <mailto:[email protected]>> wrote:
>
> >                     I am admin'ing a file server that has an odd problem.
>
> >                     I am the admin account on the server and have all
> >                     admin privileges ... except that now it says I'm not
> >                     on the list of sudoers.  There are a few other
> >                     accounts on the server, but no one remembers the
> >                     passwords I gave them.
>
> >                     What can I do to administer this machine now?  How
> >                     can I add myself back to the list of sudoers if I
> >                     can't sudo to get to anything?
>
> >                     How do I get the data off of here and keep it intact?
>
> >                     I am scared to reboot the machine for fear that they
> >                     will somehow manage to not have access.
>
> >                     Ideas?
>
> >                     ~kari
>
> >                     --
> >                     You received this message because you are subscribed
> >                     to the Linux Users Group.
> >                     To post a message, send email to
> >                     [email protected]
> >                     <mailto:[email protected]>
> >                     To unsubscribe, send email to
> >                     [email protected]
> >                     <mailto:[email protected]>
> >                     For more options, visit our group at
> >                    http://groups.google.com/group/linuxusersgroup
>
> >                 --
> >                 You received this message because you are subscribed to
> >                 the Linux Users Group.
> >                 To post a message, send email to
> >                 [email protected]
> >                 <mailto:[email protected]>
> >                 To unsubscribe, send email to
> >                 [email protected]
> >                 <mailto:[email protected]>
> >                 For more options, visit our group at
> >                http://groups.google.com/group/linuxusersgroup
>
> >             --
> >             You received this message because you are subscribed to the
> >             Linux Users Group.
> >             To post a message, send email to
> >             [email protected]
> >             <mailto:[email protected]>
> >             To unsubscribe, send email to
> >             [email protected]
> >             <mailto:[email protected]>
> >             For more options, visit our group at
> >            http://groups.google.com/group/linuxusersgroup
>
> >         --
> >         You received this message because you are subscribed to the
> >         Linux Users Group.
> >         To post a message, send email to
> >         [email protected]
> >         <mailto:[email protected]>
> >         To unsubscribe, send email to
> >         [email protected]
> >         <mailto:[email protected]>
> >         For more options, visit our group at
> >        http://groups.google.com/group/linuxusersgroup
>
> >     --
> >     You received this message because you are subscribed to the Linux
> >     Users Group.
> >     To post a message, send email to [email protected]
> >     <mailto:[email protected]>
> >     To unsubscribe, send email to
> >     [email protected]
> >     <mailto:[email protected]>
> >     For more options, visit our group at
> >    http://groups.google.com/group/linuxusersgroup
>
> > --
> > You received this message because you are subscribed to the Linux Users
> > Group.
> > To post a message, send email to [email protected]
> > To unsubscribe, send email to [email protected]
> > For more options, visit our group at
> >http://groups.google.com/group/linuxusersgroup

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to