Question: 4. 120 points) In a version of Unix/Linux, the user passwords are stored in the file /etc/shadow. Each record in the file consists of the

 4. 120 points) In a version of Unix/Linux, the user passwords

4. 120 points) In a version of Unix/Linux, the user passwords are stored in the file /etc/shadow. Each record in the file consists of the user id (uid which is a non-negative integer) and the encrypted password. All the data is separated by blank spaces Write a bool function "enter" which takes an int uid and a string password, and returns true if the uid/password is in the file and false otherwise. You will need to use the function encrypt which takes a string and returns the string encrypted. 4. 120 points) In a version of Unix/Linux, the user passwords are stored in the file /etc/shadow. Each record in the file consists of the user id (uid which is a non-negative integer) and the encrypted password. All the data is separated by blank spaces Write a bool function "enter" which takes an int uid and a string password, and returns true if the uid/password is in the file and false otherwise. You will need to use the function encrypt which takes a string and returns the string encrypted

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!