How to add a new user on Ubuntu server 12.04 and add a desktop environment if desired.

Adding a new user on Ubuntu server is very simple. The useradd command may be used in a script to create multiple users very easily.

sudo useradd $username -m -s /bin/bash -G users

Then you will need to set a password for the new user. This command will suffice.

~# echo 'jim:password1' | chpasswd -c SHA256

This will give the new user an encrypted password and they are ready to go.

if you wish to install a desktop environment on your server, type this command.

~# apt-get install xubuntu-desktop

This will install the Xfce4 desktop environment. This is not too demanding, good for a virtualised environment such as a Xen client OS or on an older machine. And now you know how to add users and set passwords on an Ubuntu server installation! Have a lot of fun with Linux, it is a very good alternative to Windows on a server.

No comments have been made. Use this form to start the conversation :)

Leave a Reply