How to set path for root - Unix

This is a discussion on How to set path for root - Unix ; Hi, My problem is when I login as root, the search path is only /usr/sbin, /usr/bin. I have added other paths such as /usr/local/bin in the /.profile, /.cshrc, and /.login for root. But they do not work. If I want ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: How to set path for root

  1. How to set path for root

    Hi,

    My problem is when I login as root, the search path is only /usr/sbin,
    /usr/bin. I have added other paths such as /usr/local/bin in the /.profile,
    /.cshrc, and /.login for root. But they do not work. If I want to use the
    command saved at /usr/local/bin as root, I have to give the whole path or
    set the path again manually.

    Can someone let me know that how to set up the path environment variable for
    the user root? How the /usr/sbin, /usr/bin is set for root (I mean which
    file is used)? I checked /etc/profile, can't find anything.

    Thanks in advance.

    A new unix user.



  2. Re: How to set path for root

    On comp.unix.questions, in , "Unix
    user" wrote:

    > Hi,
    >
    > My problem is when I login as root, the search path is
    > only /usr/sbin, /usr/bin. I have added other paths such as
    > /usr/local/bin in the /.profile, /.cshrc, and /.login for
    > root. But they do not work. If I want to use the command saved
    > at /usr/local/bin as root, I have to give the whole path or set
    > the path again manually.
    >
    > Can someone let me know that how to set up the path environment
    > variable for the user root? How the /usr/sbin, /usr/bin is set
    > for root (I mean which file is used)? I checked /etc/profile,
    > can't find anything.
    >
    > A new unix user.


    You have _two_ DNS mismatches in your Path header. Never seen
    that before.

    Here's your big clue for the decade: No one whom you
    need to be afraid of is trying to find out who you
    really are. You don't do anything but post **** on
    Usenet under numerous aliases, and any not-very-bright
    7-year-old with his Mommy's computer can do that. You
    are no threat to anyone.

    The only people that _verbally_ threaten you are your fellow
    loser trolls, and they too don't do anything but post ****
    on the Usenet, and are the last people on Earth that you
    should be afraid of. They can barely wipe their own asses.

    Almost anyone on these technical groups could come up
    with your name, address, and phone number in about 10
    minutes. But what would be the point?

    AC

    --
    alanconnor AT earthlink DOT net
    Use your real return address or I'll never know you
    even tried to mail me. http://tinyurl.com/2t5kp

  3. Re: How to set path for root

    You probably need to do an

    export PATH

    to make it stick.



    "Unix user" wrote in message
    news:d6fjk2$1kl$1@news.ox.ac.uk...
    > Hi,
    >
    > My problem is when I login as root, the search path is only /usr/sbin,
    > /usr/bin. I have added other paths such as /usr/local/bin in the

    /.profile,
    > /.cshrc, and /.login for root. But they do not work. If I want to use the
    > command saved at /usr/local/bin as root, I have to give the whole path or
    > set the path again manually.
    >
    > Can someone let me know that how to set up the path environment variable

    for
    > the user root? How the /usr/sbin, /usr/bin is set for root (I mean which
    > file is used)? I checked /etc/profile, can't find anything.
    >
    > Thanks in advance.
    >
    > A new unix user.
    >
    >




  4. Re: How to set path for root

    "Unix user" writes:

    > Hi,
    >
    > My problem is when I login as root, the search path is only /usr/sbin,
    > /usr/bin. I have added other paths such as /usr/local/bin in the /.profile,
    > /.cshrc, and /.login for root. But they do not work. If I want to use the
    > command saved at /usr/local/bin as root, I have to give the whole path or
    > set the path again manually.
    >
    > Can someone let me know that how to set up the path environment variable for
    > the user root? How the /usr/sbin, /usr/bin is set for root (I mean which
    > file is used)? I checked /etc/profile, can't find anything.
    > A new unix user.


    Hi there!

    Steve has answered the question, so that's OK.

    But you might wonder what you have done to deserve an answer like this
    from Alan Connor. The answer is nothing - the man is probably insane and
    certainly one of the nastiest creatures posting on Usenet! Ignore the
    idiot.

    And welcome :-)

    atb


    Glyn

  5. Re: How to set path for root

    > My problem is when I login as root, the search path is only /usr/sbin,
    > /usr/bin. I have added other paths such as /usr/local/bin in the
    > /.profile,


    That sounds a little Solaris like, in which case you should take a
    closer look at /etc/default/login as well as /etc/default/su.

    Although I'm not 100% sure I'm confident that this is also likely to
    work on other *nix (-like) OS's.

    --
    Groetjes, Peter

    ..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc

+ Reply to Thread