LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2020, 04:14 PM   #1
torronto
LQ Newbie
 
Registered: Dec 2020
Distribution: Ubuntu
Posts: 28

Rep: Reputation: Disabled
Angry Sudo password not working


Here's what i get after trying to authenticate:

Code:
sudo pacman -Syy
[sudo] password for usr: 
Sorry, try again.
[sudo] password for usr:

Code:
su
<root_passwd>

passwd usr
<password>        ##same as old

exit

usr@linux: sudo su
[sudo] password for usr: 
<password>
Sorry, try again.
I tried changing the password as root, seems like that wasn't the issue. The only thing that comes to mind at this point is a broken sudo.


UPDATE: Everything went back to normal after logging out and back in again but i'm still curious what could be causing issues like this and how can this be prevented for the future.

Last edited by torronto; 12-12-2020 at 07:18 PM.
 
Old 12-12-2020, 04:48 PM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,604

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547

Sudo uses the password of the current user account (in your example, "usr"), not the root user's password.

 
1 members found this post helpful.
Old 12-12-2020, 07:05 PM   #3
torronto
LQ Newbie
 
Registered: Dec 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
Sudo uses the password of the current user account (in your example, "usr"), not the root user's password.

Of course.
What i'm saying here is i tried to do a pacman update and it telling me i got the wrong password. Then i logged in as root and changed the password for "usr" just to make sure and i still get the same issue. That's why i brought up broken sudo because that's the first obvious thing that comes to mind.

Last edited by torronto; 12-12-2020 at 07:20 PM.
 
Old 12-12-2020, 07:36 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,329
Blog Entries: 28

Rep: Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143Reputation: 6143
Since you are using pacman, I'm guessing you are using Arch.

The creepy sudo fetish is primarily a *buntu thing. Have you checked to see whether Arch enables sudo out-of-the-box?

Few distros outside the *buntu-verse do, though recent observations lead me to fear that this plague of pointlessness is spreading.

Last edited by frankbell; 12-12-2020 at 07:39 PM.
 
Old 12-12-2020, 08:05 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by torronto View Post
UPDATE: Everything went back to normal after logging out and back in again but i'm still curious what could be causing issues like this and how can this be prevented for the future.
Perhaps sudo was not configured for usr. One possible scenario: sudo might be configured for a certain group only. You add usr to that group, but to make the new group effective, usr has to log in again. I am sure there are other possible scenarios.
 
Old 12-13-2020, 03:10 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
You shouldn't be using -Syy. Use -Syu. There's a good reason for this, it is documented somewhere on Arch wiki.
Or maybe Manjaro is different in that respect, who knows.
 
1 members found this post helpful.
Old 12-13-2020, 08:09 AM   #7
torronto
LQ Newbie
 
Registered: Dec 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
You shouldn't be using -Syy. Use -Syu. There's a good reason for this, it is documented somewhere on Arch wiki.
Or maybe Manjaro is different in that respect, who knows.
Yes, i know. That was a just a random command to prove the point.
 
Old 12-13-2020, 08:10 AM   #8
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,604

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
Quote:
Originally Posted by torronto View Post
Of course.
What i'm saying here is i tried to do a pacman update and it telling me i got the wrong password. Then i logged in as root and changed the password for "usr" just to make sure and i still get the same issue. That's why i brought up broken sudo because that's the first obvious thing that comes to mind.
This description and the level of detail you've now added to the first post should have been what you posted to start with (along with whether sudo/pacman have worked before or if this is the first time on that system) - then you avoid time being wasted with obvious answers.

 
Old 12-13-2020, 07:26 PM   #9
torronto
LQ Newbie
 
Registered: Dec 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
This description and the level of detail you've now added to the first post should have been what you posted to start with (along with whether sudo/pacman have worked before or if this is the first time on that system) - then you avoid time being wasted with obvious answers.

Agreed. But also excuse me for being very new to LQ in general and i would appreciate you sharing some useful docs or site resources to help me.
 
Old 12-13-2020, 09:58 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by torronto View Post
Agreed. But also excuse me for being very new to LQ in general and i would appreciate you sharing some useful docs or site resources to help me.
The Welcome to LQ paragraph in the site's FAQs.

Eric Raymond's classic on how to ask questions. Perhaps a bit long, but thorough.

Something similar but shorter from the LQ site founder.
 
1 members found this post helpful.
Old 12-14-2020, 06:33 AM   #11
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,604

Rep: Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547Reputation: 2547
Quote:
Originally Posted by torronto View Post
Agreed. But also excuse me for being very new to LQ in general and i would appreciate you sharing some useful docs or site resources to help me.
See the links berndbausch provided.

Also, a useful technique is to write your question, then read it as if someone else is asking you that question - how would you respond, what questions would you ask, etc?

Go back and update/re-write the question to take those things into account, and repeat the process a couple of times.

Often this can be enough to solve issues in itself (and generally helps train your analytical skills), but even when that doesn't happen, it should still tend towards a question that is more likely to receive helpful replies sooner.

 
1 members found this post helpful.
  


Reply

Tags
sudo



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
[SOLVED] sudo password different from non-sudo password edrom Linux - Newbie 2 04-20-2012 03:00 PM
sudo password not same as root password - ubuntu 11.04. hence can't access partitions daudiam Linux - Newbie 1 09-03-2011 11:02 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
my sudo password is not the root password newbiesforever Linux - General 7 01-02-2010 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:23 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