Sudo doesn't accept the root password?

New to Debian (Or Linux in general)? Ask your questions here!

Sudo doesn't accept the root password?

Postby kcredden » 2010-02-08 00:23

Hey folks. I'm moving from Ubuntu to Debian 5.2. But ran into an odd problem. Every time I use sudo in the terminal, it doesn't accept the root's password. But I know that's the right password. It just pauses for a sec or 2, then says 'sorry try again'

HOwever, if I type in my account's password, it gives: kcredden is not in the sudoers file. This incident will be reported.

Help???

- Kc
kcredden
 
Posts: 6
Joined: 2010-02-08 00:17

Re: Sudo doesn't accept the root password?

Postby dilberts_left_nut » 2010-02-08 00:27

Don't you find it a PITA typing 'sudo' all the time?
Yes, you must use YOUR password not root's.
You must also add your user to the sudoers file if you want to use it.

Better option is:
Code: Select all
su
<root password>
issue commands as root
exit
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5089
Joined: 2009-10-05 07:54
Location: enzed

Re: Sudo doesn't accept the root password?

Postby Zero » 2010-02-08 05:51

sudo is not for roots password (for that you issue "su"), it's to temporarily give root privilege to your user (provided you're added to the sudoers file anyway). Completely different things, and a common misunderstanding by those who've grown used to Ubuntu's way of doing things. Don't worry, you'll get used to it, it's a slight, yet major difference. The fun is in the learning. Cheers. :)
User avatar
Zero
 
Posts: 162
Joined: 2007-12-12 10:42
Location: Western Australia

Re: Sudo doesn't accept the root password?

Postby gradinaruvasile » 2010-02-08 07:50

There are some instances where you do need the root user's password: example is users-admin (the graphical users/group administration tool). You launch it as a normal user, but if you want to change something, you must authenticate by clicking on the shield icon. The problem is that in Debian (in Ubuntu it was working with the users password) - at least my systems -3 pcs - i had to supply the root users password (my password didnt work). I had to set a password for the root user aswell and now its working - the alternative is to launch the program with sudo.
User avatar
gradinaruvasile
 
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania

Re: Sudo doesn't accept the root password?

Postby Telemachus » 2010-02-08 12:28

kcredden wrote:Hey folks. I'm moving from Ubuntu to Debian 5.2. But ran into an odd problem. Every time I use sudo in the terminal, it doesn't accept the root's password. But I know that's the right password. It just pauses for a sec or 2, then says 'sorry try again'

HOwever, if I type in my account's password, it gives: kcredden is not in the sudoers file. This incident will be reported.

Debian handles su/sudo differently than Ubuntu. By default, on a Debian system, you should use su to get root privileges. (On a default Ubuntu system, last time I checked, you used sudo with the regular user's password for the same.)

Type su, then give the root user's password. Then do whatever commands that require elevated privileges. Then enter exit to close that session and go back to being a regular user.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4677
Joined: 2006-12-25 15:53

Re: Sudo doesn't accept the root password?

Postby pentode » 2010-02-09 18:37

By default, on a Debian system, you should use su to get root privileges.


For a single user, su works out well, but sudo is available in Debian standard installation and works just fine, after you set up the sudoers file.

A few minutes spent reading man sudo would pobably clear up questions regarding which password is used. This question seems to come up fairly frequently.
pentode
 
Posts: 173
Joined: 2007-05-04 22:48

Re: Sudo doesn't accept the root password?

Postby Telemachus » 2010-02-09 20:32

pentode wrote:
By default, on a Debian system, you should use su to get root privileges.


For a single user, su works out well, but sudo is available in Debian standard installation and works just fine, after you set up the sudoers file.

I suppose it depends on what you mean by a standard installation. On the installations that I (standardly) do, sudo isn't even installed. But my standard installation is probably distinctly non-standard. So, that was my mistake. Sorry.

I don't particularly object to sudo, and I use it for some things. In my experience, however, it is more common (is that better than "standard"?) for Debian users to use su to get root privileges. I didn't mean much more than that.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4677
Joined: 2006-12-25 15:53

Re: Sudo doesn't accept the root password?

Postby milomak » 2010-02-10 08:54

I think it is fair to say that sudo is more an Ubuntu thing when compared to the other major districution. This is anecdotal evidence based on the fact that almost all other distros will have you use su and then issue commands as root.

That is not to say those distros do not have sudo. But they do not use it in the same way. And this is probably due to the fact that unlike other distros, Ubuntu does not create a root user by default.
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: Lenovo ideapad Y700-15ISK - Sid, Win10, Solus
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 2081
Joined: 2009-06-09 22:20


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable