Question: Please to write a bash script to perform the following functions in a script named admino.sh The following subsections will describe the functions: ( -

Please to write a bash script to perform the following functions in a script named admino.sh
The following subsections will describe the functions:
(-h/--help) Help Function:
The capture below shows the execution of the script for this argument:
$./admino --help
Welcome to the Admino system information script
Please follow the following instructions to use it
-./admino -2--> provides hostname information.
** then you list the help/description of the following functions you have implemented **
(1) IP Address of a Network Interface:
The capture below shows the execution of the script for this argument:
$ ./admino -1 ens160
Your ip for ens160 interface is: 10.0.1.10
(3) List of Users in the System:
The capture below shows the execution of the script for this argument:
$ ./admino -3
The list of users of your system are:
- root
- bin
- daemon
- adm
- lp
- sync
- shutdown
- halt
- mail
- operator
- games
- ftp
- nobody
- systemd-bus-proxy
- systemd-network
- dbus
- polkitd
- abrt
- unbound
- tss
- libstoragemgmt
- rpc
- colord
- usbmuxd
- saslauth
....
(4) List Users Into a Specific Group:
The capture below shows the execution of the script for this argument:
$ ./admino -4 adm
List of users into group: adm
- syslog
- user
5. List the number of files own by an specific user from a particular directory
The capture below shows the execution of the script for this argument:
$ ./admino -5 user /home
This user has a total of 1456 files
(6) Create and encrypt a zip file for all the files in a directory
The capture below shows the content of the directory and the results of the execution of the script for this argument:
$ tree /home/instructor
/home/instructor/
cy5001file1
cy5001file10
cy5001file11
cy5001file2
cy5001file3
cy5001file4
cy5001file5
cy5001file6
cy5001file7
cy5001file8
cy5001file9
$ ./admino -6/home/instructor content.zip password
adding: cy5001file1(stored 40%)
adding: cy5001file10(stored 40%)
adding: cy5001file11(stored 40%)
adding: cy5001file2(stored 40%)
adding: cy5001file3(stored 40%)
adding: cy5001file4(stored 40%)
adding: cy5001file5(stored 40%)
adding: cy5001file6(stored 40%)
adding: cy5001file7(stored $0%)
adding: cy5001file8(stored $0%)
adding: cy5001file9(stored 40%)
(8) List of IPs and number of connections from where system's users have connected:
The capture below shows the output of the script for this argument:
$ ./admino -8
(Con.#)(IP Add)
210.125.17.122
110.115.277.245
220.8.15.3
577.32.12.38

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!