2

Something strange is happening here. When I open a terminal, it is completely empty. No user@hostname nor the current working directory.

empty terminal

It may be worth noting that I'm working of of an external hdd wich has a complete install of eOS on it. So it's not a live usb.

And even more important, it only happens to one of the two users I have on the install. The one I made first, opens the terminal just fine, including the expected green text and the ability to type in it. The second one just shows what you see in the image. And I can't type in it. Furthermore, if I type ctrl+alt+{F1;...;F9} I don't get a login either.

Does anyone know what happend here? And how I could fix it?

Thanks, Sander

2

What a strange problem. I'm not sure if such a thing is possible, but perhaps your user does not have a shell associated with it (for whatever reason).

The first port of call should be to check whether there is a shell listed in the /etc/passwd file, which you can do by running cat /etc/passwd | grep YOURUSER. The output should be something like this:

mike:x:1000:1000:Mike Wild,,,:/home/mike:/bin/bash

Be warned that the second field ('x') might contain your password hash, so don't post that part here if that's the case!

If you are missing the shell entry at the end, then you can run sudo chsh -s /bin/bash YOURUSER to set it back to bash. However this assumes that the second user you have is in sudoers.

  • Indeed, a missing shell was the culprit. So problem solved. thank you. However, I assumed the useradd command defaults to bash if you don't specify a shell. Is that not the case? – Sander Jan 20 '17 at 13:14
  • According to the man page: "The default is to leave this field blank, which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by default.". So perhaps check the contents of /etc/default/useradd - on my system it reads `*SHELL=/bin/sh*. – Mike Wild Jan 20 '17 at 13:17
  • mine does says the same, without the star. I guess it will stay a mystery. – Sander Jan 20 '17 at 13:43
  • Sorry, the asterisk was a formatting typo (won't let me correct it unfortunately). – Mike Wild Jan 20 '17 at 14:23
0

While clicking around on the site, if found this. That made me check my passwd file. Turns out that the second user had no shell assigned to him. I always assumed that useradd defaults to bash if no shell is specified with the -s switch. Is that not the case?

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.