Questions about Users, Groups, Passwords and Management of all those things * Preliminaries ** There are usually 2 - 5 different methods to accomplish each of these tasks. The certification tests often ask for all possible methods. How many users can any Unix system have? How does the OS internally represent users for processes and on disk? How long can a username be? What are the limitations on the characters used for usernames? What are the limitations for passwords? * length * entered characters What happens if 2 userids match on the same system? h2. Password Management Show all the ways that user accounts can be locked. Show all the ways that passwords can be locked. Show all the ways that user accounts can be expired / disabled in the future. Show all the ways that users can be warned about their expiring passwords. Show all the ways that user passwords can be disabled immediately. Show all the ways that a password can be expired. Show all the ways that an inactive account can be disabled automatically. Show all the ways that the minimum number of days between password changes can be modified. Show all the ways that to enforce password aging automatically. Show all the ways that reusing passwords can be prevented. Show how to set a user warning 8 says in advance of an expiring password. Show all the ways to remove a password from an account. How can we prevent pre-mature password changes? How can we change the password inside a chroot environment? How can an end-user view all the dates and limits on their own passwords? How can we update a group of passwords in the /etc/passwd file? How can we update a group of passwords inside a chroot? h2. passwd, chage, usermod, chpasswd How to change the primary group for a user? This is also called the "login group." How to we add a non-primary group for a user? How to set the comment field for a user? How to change the HOME directory for a user? How to change the username for a user? How to move a user's HOME? How to set a userid to an existing userid? When done, at least 2 users will have the same userid. How to change the login shell for a user? What are the differences between * useradd -g users bob * usermod -g users bob * usermod -Ga users bob * usermod -G users bob * useradd -G users bob * gpasswd -a bob users * gpasswd -A bob users * gpasswd -M bob users When would each produce unexpected results? Suggestion: play with different groups. How to replace the login group for user 'bob'? How to add an extra group for the user 'bob'? How to remove all other groups, except 'users' for the user 'bob'? How to add bob and jim to the group spies without altering any other group membership?