How does init determine the user to run a daemon as
Bill Campbell
linux-sxs
Fri Sep 23 11:54:59 PDT 2005
On Fri, Sep 23, 2005, Jan M wrote:
>Hi Roger,
>
>Thanks. How does init determine which user to run the daemon as? Is it the
>executable owner?
That depends on how the program is executed.
Programs started by inetd/xinetd specify the user in the appropriate
configuration files.
Programs run on startup from /etc/inittab (on systems that use that), are
started as root, but may well ``su'' to other users or run programs that
are setuid or setgid to another user (e.g. apache).
Programs may also be run as users from cron, depending on whether the
system is configured to permit users to have their own crontabs. The
command ``crontab -l -u username'' will normally show the crontab entries
for a particular username.
Programs run with the ``at'' command, if permitted, will run as the user
initiating the job.
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
The day-to-day travails of the IBM programmer are so amusing to most of
us who are fortunate enough never to have been one -- like watching
Charlie Chaplin trying to cook a shoe.
More information about the Linux-users
mailing list