I was wondering if it is possible to log into a tty session (not the GUI) as a guest?

As far as my observation goes the guest session provided at login are served by lightdm which dynamically creates those guest accounts (correct me if I'm wrong) but how would that be done in a tty login because it requires a login and a password ?


No, you can't and I will try to explain you why. There are two things that prevents you to login to tty as guest:

  1. The default shell for guest accounts is set to /bin/false. You can check this with the following command (the shell is set on the last field on each line):

    grep guest /etc/passwd

    /bin/false is just a binary that immediately exits, returning false, when its called, so when someone who has false as shell logs in, they're immediately logged out when false exits.

  2. The password for any guest account is disabled by default and this is absolutely normally: if you invite someone in your house, you don't give him your house keys.

    Because of this nobody can't login normally[1] in any interactive login[2] shell. You can check this with the following command (the password is set on the second field on each line):

    grep guest /etc/shadow

[1] I said normally, because you can switch from a real user to a user with the password disabled using sudo su user_with_no_passwd (like in real life: when someone knocks on your door, you open him with your keys).

[2] tty1-6 wast (and I suppose it will be) all the time an interactive login shell. And this world - login - it suggest me that I must to have a password to get over it (like in real life: when you see a lock, you need a key to open it).

Now, if you still want to login to tty as guest, follow the instructions from the below ttyrecord image:


And now you can go in tty and login as guest... a guest with password... which means that it is not anymore a guest...

  • 3
    Just a tip, you don't have to pipe cat into grep when dealing with files. For example your first command above could be written grep guest /etc/passwd. – Oli Aug 27 '13 at 12:13
  • The only reason I aint commenting on this that my /etc/passwd seems to be different then the one in this gif. And I doubt it has a guest-xyz user in it altogether. Will check and follow-up. PS: sorry for the late response. – Bleeding Fingers Feb 10 '14 at 12:59
  • @BleedingFingers You will see guest accounts in your /etc/passwd only if one ore more people are logged as guest in the GUI. See also: Why there are many guest accounts on my system?. Anyway, consider that my answer is until the horizontal line. – Radu Rădeanu Feb 10 '14 at 15:34

To achieve what you want, I would suggest doing it the "old fashioned" way. Simply create a new user name GuestUser. Give them limited permissions, and you can optionally give them a password or not. If you want GuestUser to have no password, you will probably have to modify PAM authentication a bit to allow passwordless logins. Good luck :)

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.