To create users you use the 'useradd' comfort. For example
In the example above, we set expiry for the user comfort we created earlier. The -e option sets expiration date for the user in format year-month-date.
The chage command provides various options for managing users such as password expiration, inactivity periods. You can use man chage to learn more.
The -d option sets the last password change date and by setting it to 0 you indicate that he password wad last changed on the day of creation.
To attach a user to a group, you have to first create a group.
Here we simply just created a group named altschool using the groupadd command.
Now to attach the user to the group we do this;
In the example above we added the user comfort we created earlier to the group altschool using usermod -aG command.
Allowing users to run only cat command is like setting their file permissions to only read files. They cannot execute any other commands or operations on the system.
The fist step is to open the sudoers file
This command above opens visudo(sudoers file).
In the image above the % is a sysmbol for group and altschool is the name of the group.
TO create a user without a home directory, you can use the useradd command with the -M option.