You are on page 1of 3

UNIX:

1) Add members to group

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'

-g security -G staff,dba,scout czhpyr

2) delete users from selected servers:

Name: UNIX-EDS_Opsware_user_del-UX0003.sh

I.E: to delete users czhpyr tznp59, use the following parameters:

-i czhpyr tznp59

3) create unix account

Name: UNIX-OS-UserManager-1298.sh

I.E: to create users:

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:

-o array -f securrity:''staff':diego benedetto - 100-05-xxxxxx-


001':/export/home/czhpyr:/bin/ksh:Pa$$w0rd:czhpyr securrity:''staff':marcos zamora
- 100-05-xxxxxx-001':/export/home/tznp59:/bin/ksh:Pa$$w0rd:tznp59

add just one user:


-o add -g security -c 'Kiran velu HPE Security UAA' -d /home/kzvq88 -s /bin/ksh -p
Happy@123 kzvq88

To modify groups:

-o modify -g security -G 'SecGroup1,SecGroup2' czhpyr

To modify password:

-o modify -f -p password czhpyr

To modify home:

-o modify -m -d /home/czhpyr czhpyr


4) UNIX-OS-AGING_PARAMETERS_UNLOCK_VIEW_MultipleUsers-1297.sh

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...

5) Some specific taks:

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

You might also like