LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   su works but sudo doesn't work. (https://www.linuxquestions.org/questions/ubuntu-63/su-works-but-sudo-doesnt-work-437854/)

magnum81 04-22-2006 08:04 PM

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.

Freemor 04-22-2006 10:30 PM

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
Freemor

Tinkster 04-22-2006 10:52 PM

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.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...d.php?t=437852

This thread has been reported for closure


All times are GMT -5. The time now is 10:19 PM.