LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-01-2007, 08:16 AM   #1
slack_dude
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Slackware 11.0
Posts: 6

Rep: Reputation: 0
sudo doesn't work anymore


Hello,
unfortunately for some reason the sudo command doesn't work anymore on my ubuntu (7.04) machine. It's not displaying any output no matter which command I try to run. Also, the root account which I enabled a couple of weeks ago doesn't let me log in. It just says "Authentication failure". I tried resetting it from the Live-CD - no change. And finally, when I try to change some systems settings from the gui menus, after I enter my password it first says "Wrong password" and then after the second try "the communication with su failed" (or rather the german equivalent to that).
So I pretty much haven't got any control over my system right now which is rather annoying.
Any ideas?

Cheers,
Chris
 
Old 08-01-2007, 09:23 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You can reset the root password by booting with a rescue cd then mounting the root partition via chroot; then run the passwd command.
 
Old 08-01-2007, 09:28 AM   #3
obnascar
Member
 
Registered: Aug 2005
Location: Wisconsin USA
Posts: 185

Rep: Reputation: 30
I had the same problem one time and never did find a fix for it. I did a re install of Ubuntu.
 
Old 08-01-2007, 09:37 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
For sudo to work on Ubuntu:
1) make sure your user belongs to the 'sudo' group (cat /etc/group)
2) make sure your user is configured correctly in /etc/sudoers Sometimes it's configured so that users in a specific group, like wheel, are entitled to sudo and therefore you would have to add yourself there (I don't think this is how it goes on Ubuntu). Belonging to group 'sudo' entitles to use the command, but unless sudoers is configured, there are no permissions to run anything with it.

After those two I can't think of much else. Root password is an odd thing. I'd search for rootkits or something, just in case, to make sure the system is not compromised. Ubuntu is not too well secured after installation, unless it's hardened a bit - any other distribution isn't either, for that matter.

To reset root password:
1) reboot your computer, and when GRUB loads, get to the menu (usually pressing ESC is what you're asked to do, to display GRUB menu, unless it isn't by default)
2) select (with arrow keys) the kernel you usually boot, if it's not selected (highlighted)
3) Press button 'e' to edit commands before booting, select the 'kernel' line and press 'e' again (information at the bottom tells this)
4) add the word 'single' to the kernel line; this modification tells to boot into single-user mode (maintenance)
5) boot that kernel by pressing 'b'
6) once booted, you should be logged in as root (THIS is why you should set a bootloader password, get it?)
7) run 'passwd' and set some password for root
8) reboot your machine the usual way
 
Old 08-01-2007, 10:33 AM   #5
slack_dude
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: Slackware 11.0
Posts: 6

Original Poster
Rep: Reputation: 0
thanks b0uncer, I've solved the problem now. Somehow I had managed to kick myself out of the "admin" group, so I couldn't sudo anymore.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
How does sudo work? xlq Linux - General 7 05-25-2007 03:12 AM
sudo does not work powah Linux - Security 1 12-06-2005 04:49 PM
sudo doesn't work oomfoofoo Debian 3 08-13-2005 07:34 AM
sudo doesn't work mla Linux - Software 1 10-01-2003 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:39 PM.

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