Subject: Re: chroot: why super-user only?
To: Greywolf <greywolf@starwolf.com>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 01/27/2003 22:29:54
>...and login is still setuid?!?  Why?  [Brain infarction, on my part, here
>-- why does anybody want to call login directly from a terminal?]

because it has the nice "side effect" of *changing the owner of the
tty* and and the value of s_login in struct session.  it's better than
su in these regards.  commonly this means that after i've logged in as
root on the console (since root is the only account with an real
password and all the other users log in via ssh with keys), i can
merely "login -f other" and there you go.  csh (and tcsh) provide
login as a builtin command such that they automatically exec
/usr/bin/login, instead of merely running it as a regular command, so
that it's really as if you just logged in.

i use it frequently.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."