Question
Create a script that parses the /etc/password file and creates a hash using the UID as the key value, you are required to design a
Create a script that parses the /etc/password file and creates a hash using the UID as the key value, you are required to design a script that can process a password file and based on the UIDs in the password file, generate the new UID.
jonesb:x:234:14:Bob Jones:/export/home/jonesb:/bin/ksh
thomask:x:345:14:Kevin Thomas:/export/home/thomask:/bin/ksh
jay:x:289:14:Jay Dog:/export/home/dandrear:/usr/bin/ksh
babic:x:123:100:Gojko Babic:/export/home/babic:/bin/ksh
baiy:x:453:101:Yaling Bai:/export/home/baiy:/bin/ksh
basham:x:163:100:George Basham:/export/home/basham:/bin/ksh
baxtert:x:206:100:Thomas Baxter:/export/home/baxtert:/bin/ksh
With these entries, we see that the UID with the maximum value is, 453. Therefore, if our script were to process such a file, the script should return the value 454
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started