Subject: Re: newbie stuff
To: Bob Savage <savage@2xtreme.net>
From: Herb Peyerl <hpeyerl@beer.org>
List: netbsd-help
Date: 09/30/1998 05:22:43
Bob Savage <savage@2xtreme.net>  wrote:
 > I'm very new to this and having a raft of problems. First, I managed to set
 > up a second account that can 'su' to root permissions -- sorta. I can
 > switch (or whatever that does), but then I cannot (for example, shutdown
 > (e.g. 'halt'); I need to login as root to do that, at which point I get
 > this annoying message that I shouldn't be logging in as root. So my first
 > question is, is it that bad to login as root if I am just doing it to
 > shutdown the computer?

>From the 'su' manual:

     Only users in group ``wheel'' (normally gid 0), as listed in /etc/group,
     can su to ``root'', unless group wheel does not exist or has no members.
     (If you do not want anybody to be able to su to ``root'', make ``root''
     the only member of group ``wheel'', which is the default.)

 > Second, I can't figure out exactly how I am supposed to setup my 'user'
 > account (the non-root account). Specifically, I don't have write
 > permissions in my home directory (because it was created by root). I tried
 > 'chown' and that didn't seem to do it. I know this sounds pathetically
 > stupid, but, hey! I warned you in the subject line :)

Root has to 'chown' the directory to be owned by you. ie: "chown savage ~savage"

 > Last, for now, I tried to change my default shell to tcsh by doing several
 > things including alterring the password database ('chpass' or something),
 > but it kept saying something like "non-standard shell" and rejecting my
 > change (I'm afraid I can't let you do that, Dave). I altered the
 > /etc/csh.login file so that it launches tcsh, but that actually adds a
 > second level of shell so when I logout, I need to exit twice... suggestions?

from the chpass manual:

     The shell field is the command interpreter the user prefers.  If the
     shell field is empty, the Bourne shell, /bin/sh, is assumed.  When alter-
     ing a login shell, and not the super-user, the user may not change from a
     non-standard shell or to a non-standard shell.  Non-standard is defined
     as a shell not found in /etc/shells.