On Sat, Jan 04, 2003 at 07:59:16PM +0100, Mark wrote:
> I will not call this a "bug", because usually when people cry bug they just
> mean they did not understand a certain behavior. :)
>
> Still, when I "su -l" to root from, say, the user "maintenance", and then
> issue a "shutdown -p now", the shutdown message sent around does not appear
> to come from "root", but from the underlying "maintenance" user:
>
> ----------------------------
> shutdown: [pid 4184]
> asarian-host: {root} %
> *** FINAL System shutdown message from [EMAIL PROTECTED] ***
> System going down IMMEDIATELY
> ----------------------------
>
> (Uh-oh, there goes my uptime!) Should it be an anomaly, it would certainly
> be one I can live with. :) For the sake of curiosity, though, why is the
> shutdown message not being broadcasted from "root" in this case?
>
> Thanks,
>
> - Mark
I think this is normal behaviour. From the su manpage:
"DESCRIPTION
...
USER is set to the target login, unless the target login has a
user ID of 0."
Also, there are several utilities that I'm aware of which tell you to
make certain to specify the user if you have su'd.....such as crontab.
>From the crontab man page:
"Note that su(1) can confuse crontab and that if you are running inside of
su(1) you should always use the -u option for safety's sake."
Maybe someone else can explain exactly why this happens, but it seem to
be expected behaviour.
Nathan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message