> Managing Users

Adding a new user to the system is as simple as

zap create-user myname

The only required argument is the username of the new user. If you want to customize the properties of the account then you can use the following arguments, which are similar to the same arguments of the useradd command:

A full example might be:

zap create-user -c "Smell tester" -d /var/smell -u 456 -s /bin/zsh smell

Once you've created a user account, you'll need to set a passwd, with the command

passwd myname

If the account is being accessed remotely over ssh, it's better to set up the .ssh/authorized_keys file to allow login using their ssh key, in which case you should remove the password from the account so that only the ssh key grants access, with

passwd -N myname

To delete a user account:

zap delete-user myname

If you want the user's home directory to be deleted as well, then use the -r flag, like so:

zap delete-user -r myname

Index | Previous Section | Next Section


tribblix@gmail.com :: GitHub :: Privacy