Module 16 - Creating Users and Groups

Summary

This presentation gives instructions and information about creating and managing users and groups within a system. It covers fundamental concepts and utilizes examples of common commands used in practical scenarios.

Full Transcript

Module 16 Creating Users and Groups Exam Objective 5.2 Create Users and Groups Objective Description Creating users and groups on a new system. Introduction Introduction Remember: User account info and authentication info is stored in the /etc/passwd and /etc/shadow files. Using these files...

Module 16 Creating Users and Groups Exam Objective 5.2 Create Users and Groups Objective Description Creating users and groups on a new system. Introduction Introduction Remember: User account info and authentication info is stored in the /etc/passwd and /etc/shadow files. Using these files to add users/groups is possible but not recommended. Using commands is more appropriate. When creating a new users, some distributions create a User Private Group (UPG). Note: Before you begin creating users, you should plan how you will use groups. Creating Groups Groups Groups provide a way for users to share files. When creating a group, the grep command can be used to verify configuration and changes. The getent command can be used to show local and network-based groups. root@localhost:~# grep root /etc/group root:x:0: root@localhost:~# getent group root root:x:0: Creating a Group Execute the groupadd command by root user to create a new group. To specify a group ID (GID) for the group, use the -g option. root@localhost:~# groupadd -g 506 research If -g option is not used, groupadd will automatically assign a GID one value higher than the last added in /etc/group file. root@localhost:~# grep research /etc/group research:x:506: root@localhost:~# groupadd development root@localhost:~# grep development /etc/group development:x:507: Group ID Considerations Remember: In some distributions, when a user ID is created a UPG is also created. Avoid creating GIDs in the same range as UIDs created in the future. GIDs under 1000 are reserved for system use. To bypass this and assign a

Use Quizgecko on...
Browser
Browser