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

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!