[lug] rotating logs

Sean Reifschneider jafo at tummy.com
Sun Sep 24 16:52:42 MDT 2000


On Sun, Sep 24, 2000 at 03:57:33PM -0600, John Starkey wrote:
>I was always told to su to root. Never login as root and su as the user.

Usually I have to su to the user as root when doing admin tasks like
setting up postgres or otherwise have to run a program as a particular
user.  I don't log in as root and then su to my regular user account,
if that's what you're thinking.

>Ok, now I see. Essentially you are creating a user with almost root
>priveleges and you admin that way??. But what prevents a user with shell

No, I'm just adding the location of a few binaries I need to my system
path.  Any user can do it by doing "PATH=$PATH:/usr/sbin:/sbin", or
the like.  There's nothing special about the user.  It doesn't grant
me extra privelages, I can't do super-user-like things, I just get to
run some programs that are usually only run by root (like route).

>access from doing the same?? Are you chmod'ing something? And how do you
>limit his/her access to certain options??

Mostly they're limited by the kernel.  For example, unless you're root you
can't change the IP address of an interface.  You can VIEW it but not change
it.

>Where can PATH variables be declared. Recently I've started using
>.bash_profile and /etc/profile. But I have PATHs in one of the first users

.bash_profile or /etc/profile would be the appropriate place since you append
to it.  Things that should be set for every instance of a shell should be
in the .bashrc.  The profile is only run by the login shell.

Sean
-- 
 Walking on water and developing software from a specification are easy.
  ... If both are frozen.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python




More information about the LUG mailing list