How to add a guest account without a password?

Method 1

user@ubuntu:~$ sudo adduser guest
user@ubuntu:~$ sudo passwd -d guest

This will add a user called "guest", then delete her password. You can log in from both the standard getty login prompt and graphical login managers like GDM. This works for me on Ubuntu 10.10.

However, apparently this doesn't work for some people using Ubuntu. Thus:

Method 2

  1. Make a user.

  2. Open /etc/shadow: gksudo gedit /etc/shadow

  3. Find the line that starts with the user you just made. Notice the line has multiple fields separated by colons.

  4. Change the second field to: U6aMy0wojraho. In my case:

    guest:$6$m4CpcgBw$i9XLGaUNToClOJ1X5Grug/COUjlkhoPv1:15048:0:99999:7:::

    becomes:

     guest:U6aMy0wojraho:15048:0:99999:7:::
    
  5. Save the file, log out, and try your new password-less account.

The origin of this method is from the Ubuntu livecd. The default user (ubuntu) requires no login password. If you look at /etc/shadow on the livecd, U6aMy0wojraho is the encrypted form of the magic password used. I explain this to emphasize this is not a general linux solution, but something specifically Ubuntu.


There will be a guest account by default.Try clicking your username at the top-right corner and activate "Guest Session" under there. Also see the posts below,

Passwordless Guest Account

Creating a Guest Account


Create a new user, without administration access, then click in: "No passwd at login". This may solve your problem, but you can log in, and at your name (at right up): Guest-session.

Tags:

Accounts