Create an user with empty password
sudo useradd test-user-0
echo test-user-0:U6aMy0wojraho | sudo chpasswd -e
su test-user-0
The password prompt still shows unfortunately.
But if you just hit enter without typing anything, and it logins as the user test-user-0
.
The -e
flags tells chpasswd
that the password is already encrypted, and U6aMy0wojraho
is the hash of the empty string.
Tested on Ubuntu 18.04.
Terminal autologin with getty -a
On the terminal at least, you don't need to create an user without a password to allow someone to not type their passwords every time.
I was able to do this on BusyBox by modifying inittab
: How to login automatically without typing the root username or password in Buildroot BusyBox init?
So I believe that it should not be very hard to adapt that technique by modifying Ubuntu 18.04's systemd init system scripts to setup a getty -a <user>
terminal as mentioned in that answer, although I haven't tried to do it myself.
su git
as root where you don't have to provide a password.chmod
andchown
.