Managing user accounts

Creating new accounts and changing passwords is by far the most common administrative work. In most commonly used OSes it is quite easy to do so, but reference is always handy:

Windows

(XP, Vista, 7, Server 2003, Server 2008)

GUI method is probably one of the easiest in the IT world.

First, right click ‘Computer‘ and choose ‘Manage

Computer - Manage in Windows Server 2008
Computer - Manage in Windows Server 2008

Then find ‘Configuration‘ and ‘Local Users and Groups‘ (System Tools -> Users and Groups prior to Windows Server 2008)

Users and Groups in Windows Server 2008
Users and Groups in Windows Server 2008

At last, right click ‘Users‘ and choose ‘Add new‘. Fill in the form and confirm by clicking ‘Create

Creating an account in Windows Server 2008
Creating an account in Windows Server 2008

Please note that you can check ‘User must change password next login‘ to force the user to change password at the first login attempt.

To change user password, find that user in the list, right click and choose ‘Reset password

CLI  way

It is also possible to create user accounts using the command line:

net user username * /add /active:yes

Please note that if you omit the ‘*’ sign, system will not ask you for a password.

You can also change password in a less secure way by entering:

net user username password

To deactivate an account you can also type:

net user username /active:no

Linux

Red Hat, Suse, Ubuntu, Debian, etc.

The easiest way to create new user account in linux is the command line

adduser username

Once you run this command you will be prompted for new password, then system asks for user details, such as full name, room number, phone number, etc. Once all information have been entered, system asks for confirmation.

Creating an account in Linux
Creating an account in Linux

To force user to change password at the first login, you can use ‘chage’ command:

chage -d0 username

Changing password is very easy:

passwd username

You will be prompted twice for new password.

Removing user account is also easy:

userdel [-r] username

Please note that using -r parameter will also remove all user files from /home directory.

Solaris

9, 10, Opensolaris

Solaris is not much different from Linux, however adding an account is a little more difficult, because one needs to know the exact syntax of the useradd command:

useradd -d /export/home/newuser -m -s /bin/bash -c "New User" newuser

Above command will create account ‘newuser‘ with home directory /export/home/newuser, bash shell and full name ‘New user

Please remember, that pasword needs to be set manually:

passwd username
Creating an account in Solaris
Creating an account in Solaris

To force a password change it is not possible to use chage command. Instead, passwd has been given appropriate options:

passwd username -x -1

Password change and account removal are identical to Linux.

This site uses Akismet to reduce spam. Learn how your comment data is processed.