May 2017
Beginner
552 pages
28h 47m
English
This script performs common user management tasks:
#!/bin/bash #Filename: user_adm.sh #Description: A user administration tool function usage() { echo Usage: echo Add a new user echo $0 -adduser username password echo echo Remove an existing user echo $0 -deluser username echo echo Set the default shell for the user echo $0 -shell username SHELL_PATH echo echo Suspend a user account echo $0 -disable username echo echo Enable a suspended user account echo $0 -enable username echo echo Set expiry date for user account echo $0 -expiry DATE echo echo Change password for user account echo $0 -passwd username echo echo Create a new user group echo $0 -newgroup groupname echo echo Remove an existing user group echo $0 -delgroup ...