1When creating user account using useradd how is the default
1,When creating user account using useradd how is the default group determined? Is there a default group users are added automatically unless specified in the useradd command ? Does the default group behavior vary between RedHat and Ubuntu?
2:The usermod command is used to change a Linux user account settings. There are a few of parmeters (ex. \"-l\" to change the user name) require considerations before using with the usermod command. Discuss a specific parameter you would used with the usermod and what you need to consider either before or after applying your usermod. Also, provide an example of your usermod command including the parameter.
Solution
1) When user account is created using useradd command, then by default it can be use only by root user and defualt group becomes 1.
2) usermod command is used to modify any attribute for already existing user.There are many options provided with usermod command and it totally depends on us which one to use as it completely depends on what our requirement are. Some of the parameters and their uses are given below
-c = We can add comment field for the useraccount.
-d = To modify the directory for any existing user account.
-e = Using this option we can make the account expiry in specific period.
-g = Change the primary group for a User.
-G = To add a supplementary groups.
-a = To add anyone of the group to a secondary group.
-l = To change the login name from tecmint to tecmint_admin.
-L = To lock the user account. This will lock the password so we can’t use the account.
