Introduction
In this project, you will learn how to create and manage user accounts for teachers and students in a classroom server environment. You will use a bash script called userctr.sh
to automate the process of adding and deleting user accounts, which can be a tedious task when done manually.
๐ Preview
## Add 1 teacher user and 6 student users (stu1 to stu6)
$ sh userctr.sh add teacher stu 6
teacher:617533
stu1:345893
stu2:183263
stu3:404525
stu4:571165
stu5:251940
stu6:716130
## Delete 1 teacher user and 6 student users (stu1 to stu6)
$ sh userctr.sh del teacher stu 6
๐ฏ Tasks
In this project, you will learn:
- How to set up the necessary environment for the project
- How to implement functions to add and delete users and groups
- How to test the
userctr.sh
script to ensure it works as expected
๐ Achievements
After completing this project, you will be able to:
- Understand the importance of automating user management tasks
- Create and manage user accounts for teachers and students using a bash script
- Ensure that user accounts are created with the appropriate settings, such as default shell and sudo privileges
- Efficiently add and delete user accounts in a classroom server environment
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
linux(("`Linux`")) -.-> linux/UserandGroupManagementGroup(["`User and Group Management`"])
linux(("`Linux`")) -.-> linux/VersionControlandTextEditorsGroup(["`Version Control and Text Editors`"])
linux(("`Linux`")) -.-> linux/BasicFileOperationsGroup(["`Basic File Operations`"])
linux(("`Linux`")) -.-> linux/FileandDirectoryManagementGroup(["`File and Directory Management`"])
linux/UserandGroupManagementGroup -.-> linux/useradd("`User Adding`")
linux/UserandGroupManagementGroup -.-> linux/userdel("`User Removing`")
linux/UserandGroupManagementGroup -.-> linux/usermod("`User Modifying`")
linux/UserandGroupManagementGroup -.-> linux/sudo("`Privilege Granting`")
linux/VersionControlandTextEditorsGroup -.-> linux/vim("`Text Editing`")
linux/BasicFileOperationsGroup -.-> linux/touch("`File Creating/Updating`")
linux/FileandDirectoryManagementGroup -.-> linux/cd("`Directory Changing`")
subgraph Lab Skills
linux/useradd -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/userdel -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/usermod -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/sudo -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/vim -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/touch -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
linux/cd -.-> lab-301459{{"`Users and Groups Creation and Deletion Batch`"}}
end