From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6 Description of problem: i was working on a startup script for our homegrown daemon and realized that --user option seems to get broken if script is invoked from crond. looks like it's su which doesn't like non tty stdin. any ideas how can this be fixed? i assume 'su' has a valid reason here. workaround: make daemon change uid. syslog: Jul 30 23:55:01 xxx draft-robot: draft-robot shutdown succeeded Jul 30 23:55:01 xxx su: standard in must be a tty Jul 30 23:55:01 xxx draft-robot: baseball startup failed and cronjob output: Starting up draft-robot [baseball]standard in must be a tty [FAILED] [FAILED] Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. call from cron: daemon --user=foo "sleep 60 &" 2. 3. Additional info:
source of trouble seems to be /sbin/initlog; also, enhanced logic might be acceptable in daemon(): iam=`id -un` if [ -z "$user" -o "$iam" = "$user" ]; then
Closing bugs on older, no longer supported, releases. Apologies for any lack of response. Current releases, such as FC4 a) use 'runuser' b) don't use 'initlog'. Ergo, this should be solved.