LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-01-2006, 03:07 PM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
HELP! Delete myself from the admin group - UBUNTU


UPDATE: **I found a website about RECOVERY MODE. Will try that**
http://psychocats.net/ubuntu/sudo

I was trying to add myself to a certain group, so I issued the command in Ubuntu:

Quote:
sudo useradd -G newgroup
Now when I do:
Quote:
groups myusername
I am ONLY in the group "newgroup". I LOST MY SUDO PRIVILEGES!!! How do I get this back? there is NO root account in Ubuntu. Any ideas? I did this on a WORK computer and I am the only system admin on it. If I can't get in, then I can't retrieve the files!!!! HELP!!

Last edited by Micro420; 11-01-2006 at 03:10 PM.
 
Old 11-01-2006, 03:19 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Boot into the single user mode (runlevel 2, if I'm right?) and alter /etc/group --> add yourself into the group sudoers (I hope it wasn't "sudo"..nope, I think it's "sudoers"), save and reboot. And next time remember to set bootloader password so nobody else can do this
 
Old 11-01-2006, 05:45 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Micro420
there is NO root account in Ubuntu.
The one and only flaw in Ubuntu.....

But---it is easy to fix. Once you get your sudo powers back, do this:
sudo passwd root
You'll be prompted for your password, and then to enter the new root password.

Interestingly, Distros based on Ubuntu have not propagated this silliness.
 
Old 11-01-2006, 06:33 PM   #4
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Problem fixed, guys! Booting into the RECOVERY MODE at the GRUB menu worked. I just inputted my root password, which I created during the Ubuntu installation. I added myself back to the admin group and all is fine. The only annoyance is that I had to drive over to the site and physically reboot the machine.

I am going to pass on creating a "root" account. I've seen my server trying to get hacked so many times. The most common attempt is the user "root". I'm fine with sudo and consider it an extra layer of security rather than a nuisance.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain Admin group crab_com Linux - Networking 2 03-20-2006 06:15 AM
User and Group Admin: How to tell Who is in What group? Akhran Linux - Newbie 1 11-12-2005 11:16 PM
Apache DocumentRoot and Admin Group permissions Niels@debian Linux - Software 0 10-27-2004 12:34 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
delete a group with command line feetyouwell Linux - Software 1 01-27-2004 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration