[lug] rotating logs

Sean Reifschneider jafo at tummy.com
Sun Sep 24 13:32:49 MDT 2000


On Sun, Sep 24, 2000 at 12:16:29PM -0600, John Starkey wrote:
>So how do I find out what commands are available to su root?? And I did
>just look at the man su page. And I tried su -m to see if by retaining the
>env variables I could use root commands.

I presume you are talking about the commands which reside in /usr/sbin and
/sbin?  Things like ifconfig, useradd, route, mtr...  /sbin and /usr/sbin
contain programs which are largely meant for the system administrator,
and often require root privelages to run.  However, there are some programs
in there that it's nice to run as a regular user (ifconfig and route
without any options, mtr, etc).

I put ":/usr/sbin:/sbin" at the end of my PATH, so I don't constantly have
to be adding a prefix to some of the commands I do regularly.

As far as su, unless you use the "-" option, it keeps your current environment.
This means that if you log in as yourself and su to root, you don't get
/sbin and /usr/sbin in your path, even though you're root.  If you log in
directly as root, you do.  "su -" acts like you've logged in as that user,
so you should get the typical root PATH and other settings.

With /sbin:/usr/sbin in my path, I don't ever need to do "su -" to get to
root.  I often use it when switching to another user though.

Sean
-- 
 If you don't have time to do it right, when will you ever find time to do
 it over?
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