How to add a guest account without a password?
Solution 1
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,
Solution 2
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
-
Make a user.
-
Open /etc/shadow:
gksudo gedit /etc/shadow
-
Find the line that starts with the user you just made. Notice the line has multiple fields separated by colons.
-
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:::
-
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.
Solution 3
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.
Related videos on Youtube
vrcmr
Updated on September 17, 2022Comments
-
vrcmr over 1 year
Sometimes I have friends in my house that want use my computer. How can they use a guest account without typing a password?
-
Admin almost 5 yearsThe answers are out of date.
-
-
STX_user3581226 almost 8 yearsthis can be done with single command:
useradd -m -p U6aMy0wojraho guest
-
karel almost 5 years@ThorSummoner Just for the record the "obligatory" remark is more or less true in Stack Overflow where it is common practice that answers with links to code without embedded are code are deleted. It was explained to me that this is because of concerns that this code may be intellectual property. However links to Ubuntu forums posts are permanent and the content isn't going anywhere soon, so there doesn't seem to be any reason to delete these posts because of concerns that the linked content will disappear. I also don't downvote such posts. If I didn't like the post I'd delete vote it instead.
-
6005 almost 5 yearsOut of date for 18.04.
-
Frank Nocke about 3 years...or for an existing user with
echo test-user-0:U6aMy0wojraho | sudo chpasswd -e
source