Table of Contents


setuser - runs another program under a specified account’s environment.


setuser account child


account is a single argument. child consists of one or more arguments.

setuser sets $GID, $UID, $SHELL, $HOME, and $USER to account’s gid number, uid number, login shell, home directory, and user name, respectively. It changes the working directory to account’s home, and sets its uid and gid to account’s uid and gid, with supplementary groups set up. It then runs child.

setuser cannot be run by anyone other than root.

Exit Codes

setuser exits 111 if it cannot find a UNIX account named account, if it cannot setup the environment, change directory, setgid, setuid, or run child. Otherwise its exit code is the same as that of child.

See Also

envdir(8) , envini(8) , envuidgid(8) , fghack(8) , multilog(8) , pgrphack(8) , readproctitle(8) , setlock(8) , setuidgid(8) , softlimit(8) , supervise(8) , svc(8) , svok(8) , svscan(8) , svscanboot(8) , svstat(8) , tai64n(8) , tai64nlocal(8)

Table of Contents