usermod — Modify a user account

Summary

The usermod command modifies the system account files to reflect the
changes that are specified, like Home dir, password, etc. on the
command line

Example

# usermod -d /home2/usr1 usr1 – Create the new home Dir for usr1 in
                          /home2 & Move old Dir contents to this Dir.

# usermod -e 2009-04-30 usr1 – From 30/4/2005 the usr1 acc will be
                                disabled.

# usermod -f 6 usr1 – After passwd expires, system will allow the
        user to login for 6 days with a warning to change his passwd.

# usermod -g prof usr1 – Set usr1′s initial group as prof.

# usermod -p $1$d8 usr1 – Set the new passwd for the usr1

# usermod -s /bin/bash usr1 – Set Bash as the default login shell for
                               the usr1.

# usermod -L usr1 – Lock a user’s password.

# usermod -U usr1 – Unlock a user’s password.

Share
Tagged with:
 



useradd – Create a new user.

Summary

useradd creates a new user with specified options like username, home
dir, group details, password, etc …

Example

# useradd usr1 — Add new user usr1 with default settings.

# useradd usr1 -d /home2/usr1 – Create the new user’s home dir in
                                 /home2

# useradd usr1 -e 2009-04-30 — From 30/4/2009 the user acc will be
                                disabled.

# useradd usr1 -f 6 – After passwd expires, system will allow the
                       user to login for 6 days with a warning to
                       change his passwd.

# useradd usr1 -g staff -G student,lect, prof – Set his initial group
                 as staff and sublimentry group as office, lect, prof.

# useradd usr1 -p $1$d8 — Create the usr1 with the given encrypted
                           password. For No passwd, acc disabled.

# useradd usr1 -s /bin/csh – Set C Shell as the default login
                              shell for the usr1.

Share
Tagged with:
 

man (Linux command)

On April 20, 2009, in linux, linux commands, by mahesh
0


man – Format and display the ‘MAN’ual pages.

Summary

Most of the commands are comes with a specially formatted manual,
which explains “how to use the command, option list, etc..”.
‘man’ command is used to view those manual page.

Man pages are sorted in categories, as mentioned below:

1. Executable programs / Shell commands
2. System calls
3. Library calls
4. Special files
5. Config file formats and conventions
6. Games
7. Miscellaneous
8. System administration commands
9. Non-standard

Examples

$ man man  #Display the manual page of the man command

$ man ls  #Display the manual page of the ls command

$ man printf  #Display printf command man page.

Share
Tagged with: