Steps To Create New User - Group
Steps To Create New User - Group
useradd - This command is used to add a new user. syntax - useradd -d /export/home/userid -m -s /bin/ksh -g groupname -c "user decription" userid There are the following options can be used with useradd command -d home directory (to specify the path of home directory)
-m make directory ( to create the home directory) -s -g -c shell (it's optional and used to chnage the default shell) primary group (to add the primary group) comments (to add the user description) For IBM users - -c "897/I/serial no.//userid [IBM" eg. -c "897/I/6C7727//Robert Blake [IBM" -c "897/I/XXXXXX//Robert Blake [IBM" For Non Ibm user - -c "897/C//Agency name/ [User name" eg. -c "897/C//DHR/ [Brandye Orr"
-G secondary group (to add a secondary group) e.g. sudo useradd testuser (To create an user without any option.) e.g. sudo useradd -d /export/home/testuser -m -s /bin/ksh -g idadmin -G dba -c "Test User, IBM DBA" testuser * sudo command is used to get the root privileges. Whenever we use sudo with any command user needs to enter his/er password after entering the command. groupadd - This coomand is used to add a new Group. eg. sudo groupadd newgroup
NOTES - groups userid (To view the all added group in user account.) eg. groups testuser. grep userid /etc/group (To view the all added groups in user accounts) eg. grep testuser /etc/group
NOTES - ssh_access group to access all the servers User can have only one primary group and multiple secondary groups. /usr/sadm/defadduser file displays all the default values that can be assigned to a new user.
************************************************************************************************************************