Thursday, 10 September 2020

More fun with adding users on Ubuntu

 Following my earlier post: -

TIL passwd on Ubuntu no longer supports the stdin option 

I found a better way ...

groupadd wasadmins

adduser --quiet --disabled-password --ingroup wasadmins -shell /bin/bash --home /home/wasadmin --gecos "wasadmin" wasadmin

echo "wasadmin:passw0rd!" | chpasswd

The main benefit of this is that, unlike useradd, the adduser command sets up the new user's profile, by copying from /etc/skel etc.

Nice!

No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...