Professional Documents
Culture Documents
Name: UNIX-OS-Add_Members_to_Group-1001.ksh
SYNTAX:
< script > -g group -G group1[[,group2]...] -u user1[[,user2]...]
I.E: to add user czhpyr to the primary group: 'security' and secondary:
'staff,dba,scout'
Name: UNIX-EDS_Opsware_user_del-UX0003.sh
-i czhpyr tznp59
Name: UNIX-OS-UserManager-1298.sh
Array: for more than 1 user use the following syntax: to create users czhpyr and
tznp59, members of security as prymary group and staff as secondary. Using
/export/home/ID and /bin/ksh:
To modify groups:
To modify password:
To modify home:
According the parameter/s you choice, you will be able to find users set the
expiring or non-expiring, lock or unlock, account status of multiple users.
# Available parameters:
# -e = change the expire to 90 days
# -n = change the expire to non-expiring.
# -l = to lock the accounts.
# -u = to unlock the accounts.
# -umbfs = unlock for Linux from MBFS client.
# -f = to force the password to be changed at first logon.
# -r = to not force the password to be changed at first logon AIX.
# -s = to check the account status.
# -g = to find the user with group and grep.
# -gi = to find the user with grep -i.
# -i = to find the user with id command.
# -noch = to check the NOCHECK attribute status on a user.
# -nochr = to remove the NOCHECK attribute on a user.
I.E: Example to find, unlock and check status: -g -u -s User1 User2 User3...
I.E: Example to unlock, set expire and check the NOCHECK parameter: -u -e -noch
User1 User2 User3...
Name: UNIX-OS-Security_reports-1355.sh
According the selected option, you will be able to get a specific report.
# Required parameter:
# Available parameters:
# -c = to use the cat command, listing a specific file content.
# e.g: -c /etc/passwd
# e.g: -c /etc/shadow
# e.g: -c /etc/group
# e.g: -c /etc/sudoers
# -f = to use the find command, searching for a specific file.
# e.g: -f sudoers
# -g = to look for a specific group.
# e.g: -g group_name
# -w = to use which command, to look for a specific command path.
# e.g: -w visudo
# -t = to use the tail command, listing the latest created users.
# e.g: -t 10
6) folder tasks:
Name: UNIX-OS-Folder_manager-1354.sh
According the selected option, you will be able to perform different actions
related to a folder.
# Required parameter: Choose one or more between the following available options:
#
# -ld = To check if a folder exists and listing permission. Necessary
parameters: folder_path
# e.g: -f /home/user1 -ld
# -la = To check if a folder exists, showing the content including hidden
files. Necessary parameters: folder_path
# e.g: -f /home/user1 -la
# -cf = To create a new folder
# e.g: -f /home/user1 -cf
# -uh = To assign the user a new home. Necessary parameters: folder_path and
User_ID
# e.g: -f /home/user1 -uh user1
# -mo = To modify a folder ownership or/and groupship. Necessary parameters:
folder_path and and [User_ID] or [User_ID:primary_group]
# e.g: -f /home/user1 -mo user1
# e.g: -f /home/user1 -mo user1:group1
# -mos = To modify a folder and sub-folders ownership or/and groupship.
Necessary parameters: folder_path and [User_ID] or [User_ID:primary_group]
# e.g: -f /home/user1 -mos user1
# e.g: -f /home/user1 -mos user1:group1
# -mg = To modify a folder groupship. Necessary parameters: folder_path and
primary_group
# e.g: -f /home/user1 -mg group1
# -mgs = To modify a folder and sub-folders groupship. Necessary parameters:
folder_path and primary_group
# e.g: -f /home/user1 -mgs group1
# You can also use different options all together:
# e.g: to create a folder, assign that folder to a user home, modify the
owner and groupship recursive, and check the home:
# -f /home/user1 -cf -uh user1 -mos user1:group1 -ld