Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. Define mass and mediated communication

Answered: 1 week ago