Write a set-user-ID-root program similar to the sudo(8) program. This program should take command-line options and arguments
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a set-user-ID-root program similar to the sudo(8) program. This program should take command-line options and arguments as follows:
The douser program executes program-file, with the given arguments, as though it was run by user. (If the –u option is omitted, then user should default to root.) Before executing program-file, douser should request the password for user, authenticate it against the standard password file (see Listing 8-2, on page 164), and then set all of the process user and group IDs to the correct values for that user.
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: