Subject: Re: su(1) asking for pw if euid==0
To: None <>
From: John Nemeth <>
List: tech-userlevel
Date: 07/10/2007 17:05:47
On Nov 30,  6:06pm, Jukka Salmi wrote:
} I'm having a problem with an rc script which sets ${name}_user to run
} the command as another user using su(1). While starting the command
} works fine, shutting it down doesn't.
} Since shutdown(8) is setuid root:operator I assume a non-root user in
} group `operator' should be allowed to shut down the system. Is this
} correct? However, this results in rc.shutdown being run as uid!=0 and
} euid==0. Nevertheless su(1) asks for a password when trying to kill
} the non-root process. Is this intended behaviour? If yes, rc.subr
} should probably be changed to kill _all_ process as root, not only
} those not setting ${name}_user.

     What version of shutdown(8) do you have?  It appears that this
problem was solved in src/sbin/shutdown.c:1.47.

}-- End of excerpt from Jukka Salmi