Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Kubuntu v5.10



On Sun, 25 Dec 2005 13:01:07 +0900, Evan Monroig <evan.monroig@example.com>
wrote:

> When you need the root account you just need to type for 
> example "sudo apt-get install apache2" 

Just remember that by doing so you are gaining root privileges but
retaining your unprivileged user's environment (including the $PATH
variable). Most distributions don't have /{,usr/{,local/}}sbin in a normal
user's $PATH, meaning that tools like insmod & co. are inaccessible without
specifying a fully qualified pathname.

One way round that is to use su instead of sudo:

$ su - -c "insert your commands to be run as root here"

This time it's the root password you'll be asked for.

Note the "-" between "su" and "-c". This is what gets the system to
basically log in as root temporatily and thus take root's environment for
the duration of the commands to be executed.

-- 
G. Stewart - godwin.stewart@example.com

The most difficult years of marriage are those following the wedding.

Attachment: pgp00019.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links