Utility Commnads date : displays current date and to change date(root login) date 10202155 2015 (MMDDhhmm YYYY) : displays calendar of current month to view calendar of another month cal 12 2015 bc: textual calculator [Ctrl-D to ]. : displays name of the uname -r : displays the version of the operating system uname –n : displays the hostname of your system man : displays the documentation of practically every on the system. It displays the first page and pauses. To quit, press q, e.g. man uname : displays a short description of the command e.g. apropos uname whatis: displays brief information of the command e.g. whatis uname : lists all the users who are logged on to the system. who –r : displays the run-levels for your system. clear: clear screen passwd : change password tty : teletype; unix treats every terminal as , tty gives filename of the terminal. stty : settings tty; displays the settings of terminal

: displays a message e.g. printf “Hello World” : displays a message e.g. echo “Hello World” {inserts a new line automatically} echo –n “hello” { control in same line after hello } echo “hello\tworld\n” hello\tworld\ntoday echo –e “hello\tworld\ntoday” hello world today

Types of users in 1 1. Root: administrator 2. Super-user: a user other than root, who knows password of root, can get administrative privileges by su command followed by root password. To execute administrative command first move to home directory by su -l 3. Ordinary users: a user other than root and su with no administrative privileges.

# to come out of su i.e. root privilege, press [Ctrl+d] # sudo command gives us restricted access to root account without knowing root password, for 5 minutes only. Only those commands can be executed which are defined in /etc/sudoers file.

Powers of Root Root is equivalent to administrator login in windows. Root has all the powers like i. Changing system date: date ii. User Management: useradd, userdel, etc. iii. Changing attributes of files: iv. Initiate or any process: kill -9 105 v. Hard Disk Management: fsck . Install & Remove softwares. vii. Networking services.

User Attributes 2 A user has 6 attributes: 1. User Name 2. User ID 3. Primary Group 4. Full Name 5. Login Shell 6. Home Directory User Name is to be specified while creation of new user.. User ID value is by default is 500. Root has UID=0. Primary Group by default will be a private group having the same name as the User Name. Full Name by default is empty. Login shell by default is bash Home directory by default also has same name as User Name.

Note: user information is stored in /etc/passwd file. Each entry in this file consists of a single line containing a set of 7 colon separated fields. login_name:password:UID:GID:Comment:Home_directory:Shell

To view the default options useradd -D

Group Attributes A group has 3 attributes 1. Group Name 2. Group ID 3. Group Members Group Name is to be specified. Group ID is 500 by default. Root has GID=0 Group members are added during user creation.

Note: group information is stored in /etc/group file.

Managing Users

3