[net.unix] Automatically logging in root

jmturn%cca-unix.arpa@CCA-UNIX.ARPA (11/10/85)

Because a number of things I do on my system require root privilages,
but since I don't feel happy doing normal things in root, I'd like to
have my system console automatically be logged in as root after the
system is through with rc. Since the console (as well as the system and
the only non-dialup terminal) is in my room, I don't feel that this is a
big security problem. Any suggestions how I can do this?

                           Save Your Vertical Blanking Intervals 
                           for Big Cash Prizes!

                           James Turner
                           (The Ringworld Engineer)

---------------------------------------------------
|   ARPA    | ringwld!jmturn@CCA-UNIX.ARPA        |
---------------------------------------------------
|           |  decvax  \                          |
|           |  sri-unix \                         |
|   UUCP    |            !cca!ringwld!jmturn      |
|           |  ima      /                         |
|           |  linus   /                          |
---------------------------------------------------
|   MAIL    | 329 Ward Street; Newton, MA 02159   |
---------------------------------------------------
(The views expressed in this message have been computer enhanced for
your pleasure.)

cspencer@bbncc5.UUCP (Clifford Spencer) (11/11/85)

> but since I don't feel happy doing normal things in root, I'd like to
> have my system console automatically be logged in as root after the
> system is through with rc. Since the console (as well as the system and
...
4.2 solution:
/etc/gettytab has a field "lo" that specifies the login program to use. 
You could just say  "lo=/bin/<SHELL_OF_YOUR_CHOICE>" in the gettytab entry 
for console.

sysV:
I don't have a sysV manual in front a me, but you could  put a line in 
/etc/inittab that starts an interactive  shell and redirects input and 
output from the console. 
							-cliff

-- 
cliff spencer
{harvard, ihnp4, decvax}!bbnccv!cspencer
cspencer@bbncc5

scl@uvacs.UUCP (Steve Losen) (11/12/85)

I don't know how to automatically login as root.  Like the original poster,
I also like to be root only when necessary.

What I do is login as myself and then su to root.  In csh or ksh you can
stop the root shell with "suspend" and revert to your true identity.
(Your system must support job control for this) When you need root again,
just "fg" the stopped su (fast!).  I run ksh and have things set up so that
both shells use the same history file.  So when I get a "permission denied"
error on a long command, I can "fg" to my root shell, and re-do the
command from history.

rob@ptsfb.UUCP (Rob Bernardo) (11/13/85)

In article <3088@brl-tgr.ARPA> jmturn%cca-unix.arpa@CCA-UNIX.ARPA writes:
>Because a number of things I do on my system require root privilages,
>but since I don't feel happy doing normal things in root, I'd like to
>have my system console automatically be logged in as root after the
>system is through with rc. Since the console (as well as the system and
>the only non-dialup terminal) is in my room, I don't feel that this is a
>big security problem. Any suggestions how I can do this?

If you are using System III or V, you can add an entry to /etc/inittab
that spawns /bin/sh on the console in the appropriate init state.

bobr@zeus.UUCP (Robert Reed) (11/15/85)

> I don't know how to automatically login as root.  Like the original poster,
> I also like to be root only when necessary.
> 
> What I do is login as myself and then su to root...So when I get a
> "permission denied" error on a long command, I can "fg" to my root shell,
> and re-do the command from history.

We have a utility called ".do" which examines the UID of the invoker,
and if it is contained in a selected set of validated numbers (which are
compiled into the program), does a setuid or setgid (depending on the
options) before exec-ing the rest of the line.  So, if you get a permission
denied, you can simply do a ".do !!".  Most of the time you sit in an
unpriveledged process, so there is less concern about making mistakes that
will horribly disfigure the filesystems.  But the power is there when you
need to use it.  It does mean that you have to be careful not to leave
unattended logins, but this comes as a simple matter of habit.
---
I got a postcard from my friend George with a satellite picture of
the entire earth.  On the back he wrote, "Wish you were here."
--Steve Wright

-- 
Robert Reed, CAE Systems Division, tektronix!teklds!bobr