0

I'm trying to use su command to change my identity on ubuntu 18.04
But from neither regular user to sudoer user or sudoer to regular user it doesnt work!
I get

su: Authentication failure

The sudo works and i can login to my users using ssh (ssh user@127.0.0.1) but cannot use su

What is the problem?


my cammand is simply this:

from user bob:

su alice
Ariyan
  • 494
  • 3
  • 9
  • 28
  • Providing your actual command may help us to understand, it works for me fine.I suspect it's how you're using it, thus providing your command would help us understand why you're getting the failure message. (what parameter 'user' are you using, have you enabled 'root' if that's what you want to use) – guiverc Mar 11 '20 at 23:34
  • Does this answer your question? [su command + authentication failure](https://askubuntu.com/questions/34329/su-command-authentication-failure) – user535733 Mar 11 '20 at 23:36
  • @guiverc i'm simply using su with user name; please check my edit on question – Ariyan Mar 11 '20 at 23:43
  • @user535733 it is about being root but i have problem with regular users – Ariyan Mar 11 '20 at 23:46
  • @steeldriver thanks, be my guest to correct. – user535733 Mar 12 '20 at 02:52
  • A couple of possible causes I've seen are (1) missing setuid bit on the su executable (check with `ls -l /bin/su`) and (2) misconfigured `/etc/pam.d/su` file – steeldriver Mar 12 '20 at 03:00

1 Answers1

0

You could try:

  • sudo passwd alice to renew password

Or, as a workaround:

  • sudo su - alice
  • sudo -i then su alice

When switching from root password isn't asked.

Gryu
  • 7,279
  • 9
  • 31
  • 52