

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


November 1, 1999 E C S 1 5 3 — F A L L 1 9 9 9 Page 1
Version of November 1, 1999 9:35 am
Points : 100 Due Date : Friday, November 18, 1999 at 11:59PM
Extra Credit
November 1, 1999 E C S 1 5 3 — F A L L 1 9 9 9 Page 2
Version of November 1, 1999 9:35 am
xsu - run a command as another user
xsu [ –d ] [ –u user ] command
The command xsu executes the given command with the UID of the named user. If no user is named, the UID of root is used. The command may be in quotes (one argument) or may be multiple arguments. The command is run in a pristine environment. Specifically, the PATH is set to search /usr/bin, /bin, /usr/sbin, /sbin, and /etc in that order; the HOME is set to the home of user (again, to that of root if no user is named on the command line); SHELL is set to the user’s login shell; IFS is set to tab, newline, and blank; and TZ is set to PDT8PST. No other environment variables are set. All files except for standard input, output, and error are closed.All signals are reset to their default value. OPTIONS
If command cannot be executed, xsu exits with a code of –127. If command is executed, the program returns with the return code of command.
xsu –u bishop more /home/bishop/private This executes the command “more /home/bishop/private” with bishop ’s privileges. xsu –u nobody ed /tmp/plugh This allows the user to edit the file “/tmp/plugh” with the privileges of the nobody user.
su (1)