1

I am connected to an Ubuntu 14 via ssh with user "nuri". I am trying to change the user with "su" command and no success. Below i enter the password for deneme2 correctly and check whoami. Afterwards I enter a wrong password. I am new at ubuntu. Is this supposed to behave like this since I am connected with ssh or something amiss?

nuri@XXX:~$ whoami
nuri
nuri@XXX:~$ su deneme2
Password: 
nuri@XXX:~$ whoami
nuri
nuri@XXX:~$ su deneme2
Password: 
su: Authentication failure
0
8

My guess would be that the account you're changing to doesn't allow logins. If you have access from the nuri account, list the users in /etc/passwd and look for the login shell that deneme2 is using.

grep ^deneme2: /etc/passwd

It should end with something like /bin/bash. I'm guessing it says /bin/false or something similar. If you have admin access you can change the shell with the passwd command. I'm guessing, though, that you don't if this is the case. You'll need to talk to the system administrator.

3
  • Unfortunately I am the admin. I am trying to set up a git server on an Ubuntu 14 without any prior knowledge of linux. And I found the problem. While adding user "deneme2", I thought --system flag is necessary for adding new users to the system. And as you can guess I created deneme2 as a system user. So, yes you are right it appears "deneme2" has no login rights and this is the problem. – Nuri Tasdemir Aug 28 '14 at 2:41
  • Assuming the system was set up correctly you should be able to just use the command 'useradd' along with a username. If you want help on what all the flags do, type 'man useradd' at the command line. Were you able to get the user account set up correctly? – Rick Chatham Aug 28 '14 at 2:59
  • 2
    @NuriTasdemir Though sudo chsh -s /bin/bash deneme2 will let deneme2 log in (see man chsh), you may be best off removing it with deluser and remaking it, since as detailed in man adduser, there are some other differences between system users (made with --system) and regular users: UID from a different range, group membership, and no files copied from /etc/skel (these are files like .profile and .bashrc). – Eliah Kagan Aug 28 '14 at 3:01

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.