Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


Closed Thread
  Search this Thread
Old 04-22-2006, 08:04 PM   #1
LQ Newbie
Registered: Apr 2006
Posts: 13

Rep: Reputation: 0
su works but sudo doesn't work.

When I run "su" and enter the password I get access to a root terminal, but I can't "sudo" a command using the same password that I used to "su". So I su'ed to root and "passwd root" and entered a new username and password, then exited the su'ed session, but "sudo" still doesn't work. I have ubuntu.
Old 04-22-2006, 10:30 PM   #2
Registered: Aug 2005
Location: New Brunswick
Distribution: Trisquel
Posts: 70
Blog Entries: 8

Rep: Reputation: 15
I think this might just be some minor confusion on the password to use.

for su you use the password of the user you are switching to.

for sudo you use the password of the current user.

You also have to make sure that you user you are trying to sudo from has the ability to run things as root (i.e. is in the sudoers file and/or has 'executing system administration tasks' checked in their privileges)

From the sounds of it your problem is the former.. use your current password to sudo. This lets you give people the ability to run certain "administrator" tasks without needing to have them know the root password. the tasks they can preform can be limited by editing the sudoers file. 'man sudoers' at the command line will give you a rundown on that.

Hope this helps

Last edited by Freemor; 04-22-2006 at 10:33 PM.
Old 04-22-2006, 10:52 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

This thread has been reported for closure

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
su to root works sudo doesn't magnum81 Linux - Security 4 04-22-2006 08:29 PM
sudo does not work powah Linux - Security 1 12-06-2005 04:49 PM
Permissions in Debian - sudo works, su doesn't (etch/64Studio) greennick Linux - Software 0 09-12-2005 03:04 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 > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:56 PM.

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