1

I am a new Ubuntu user. I know my password to login on my Ubuntu laptop and from what I have read, the users own login password is also the password for any sudo commands in Terminal. However, when I try to use this password for sudo commands, it tells me authentication failure. What am I doing wrong?

  • Are you an admin user? Only admins are allowed to use sudo. Can you therefore please show the output of the groups command from your account? – Byte Commander Dec 24 '16 at 16:47
  • perry@perry-Lenovo-B570:~$ groups perry adm cdrom sudo dip plugdev lpadmin sambashare – Perry Dec 24 '16 at 16:54
  • AFAIK the default message from sudo for a simple incorrect password is "Sorry, try again." - an "authentication failure" sounds like something different (such as a read-only filesystem, or misconfigured PAM). Can you give us some context here? when did this start to happen? – steeldriver Dec 24 '16 at 17:04
  • Okay, so your account is indeed an admin account. Can you please edit your question and add the full, exact output of e.g. sudo id? – Byte Commander Dec 24 '16 at 17:08
2

1) Check if you use the sudo a good way for example :

sudo ls

2) check if you are in the sudo group

id | grep sudo

3) check the log file to have more info

tail /var/log/auth.log

4) to add the user in the sudo group

sudo adduser <username> sudo
  • @Perry if this answer has solved your issue, please accept it by clicking on the checkmark next to it – grooveplex Dec 24 '16 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.