How To Add & Delete User On Ubuntu 12.04
How To Add & Delete User On Ubuntu 12.04
Ubuntu developers made a conscientious decision to disable the administrative root account
by default in all Ubuntu installations. This does not mean that the root account has been
deleted or that it may not be accessed. It merely has been given a password which matches
no possible encrypted value, therefore may not log in directly by itself.
Instead, users are encouraged to make use of a tool by the name of sudo to carry out
system administrative duties. Sudo allows an authorized user to temporarily elevate their
privileges using their own password instead of having to know the password belonging to
the root account. This simple yet effective methodology provides accountability for all user
actions, and gives the administrator granular control over which actions a user can perform
with said privileges.
1. If for some reason you wish to enable the root account, simply give it a password:
2. sudo passwd
Sudo will prompt you for your password, and then ask you to supply a new password
for root as shown below:
2. ls -ld /home/username
The following output shows that the directory /home/username has world readable
permissions:
drwxr-xr-x 2 username username 4096 2007-10-02 20:03 username
3. You can remove the world readable permissions using the following syntax:
6. ls -ld /home/username
The results below show that world readable permissions have been removed:
Password Policy
A strong password policy is one of the most important aspects of your security posture.
Many successful security breaches involve simple brute force and dictionary attacks against
weak passwords. If you intend to offer any form of remote access involving your local
password system, make sure you adequately address minimum password complexity
requirements, maximum password lifetimes, and frequent audits of your authentication
systems.
If you would like to adjust the minimum length to 8 characters, change the appropriate
variable to min=8. The modification is outlined below.
Basic password entropy checks and minimum length rules do not apply to the administrator
using sudo level commands to setup a new user.
Password Expiration
When creating user accounts, you should make it a policy to have a minimum and maximum
password age forcing users to change their passwords when they expire.
1. To easily view the current status of a user account, use the following syntax: