Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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