how to refresh shell environment and remain sane - Redhat

This is a discussion on how to refresh shell environment and remain sane - Redhat ; How can a user refresh his/her current shell environment after, for example, sysadmin adds him/her to another group ? EXAMPLE: groups command gives for the user joe this 548 palace:~ > groups power lp neptune saruman sysadmin adds joe to ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: how to refresh shell environment and remain sane

  1. how to refresh shell environment and remain sane

    How can a user refresh his/her current shell environment after, for
    example, sysadmin adds him/her to another group ?

    EXAMPLE:
    groups command gives for the user joe this
    548 palace:~ > groups
    power lp neptune saruman

    sysadmin adds joe to the group proj

    If joe types groups on one of existing terminals the result is the same
    as from above. He is not a member of group proj

    Of course, if the user telnets to itself, he/she will see proj as a
    part of his group

    549 palace:~ > telnet palace
    Trying 10.188.27.17...
    Connected to palace.
    Escape character is '^]'.
    Red Hat Desktop release 3 (Taroon)
    Kernel 2.4.21-20.EL on an i686
    login: joe
    Password:
    Last login: Thu Jul 21 14:55:29 from palace.XXX.XXX
    501 palace:~ > groups
    power lp neptune saruman proj

    ============================
    So, I am repeating the question:
    How can a user refresh his/her current shell environment after, for
    example, sysadmin adds him/her to another group (without log out and
    log in sequence)?

    Sincerely

    Igor

    P.S: sourcing .login does not help
    sourcing .cshrc does not help

    of course, rsh to palace works too ... but this is just a workaround (
    like telnet )


  2. Re: how to refresh shell environment and remain sane


    wrote in message
    news:1122004713.777776.146240@f14g2000cwb.googlegr oups.com...
    > So, I am repeating the question:
    > How can a user refresh his/her current shell environment after, for
    > example, sysadmin adds him/her to another group (without log out and
    > log in sequence)?


    The refresh a user's current shell and to re-run the user's .bash_profile
    settings use the command
    .. .bash_profile
    ( note the 2 dots )



    --
    Sandgroper
    ----------------------------------
    Remove KNICKERS to Email
    steveray@KNICKERSiinet.net.au



  3. Re: how to refresh shell environment and remain sane


    wrote
    > How can a user refresh his/her current shell environment after, for
    > example, sysadmin adds him/her to another group (without log out and
    > log in sequence)?

    How about exec bash -l {that's lowercase L, not one, after the dash}



  4. Re: how to refresh shell environment and remain sane

    In article <1122004713.777776.146240@f14g2000cwb.googlegroups. com>,
    igor.furlan@gmail.com wrote:
    :How can a user refresh his/her current shell environment after, for
    :example, sysadmin adds him/her to another group (without log out and
    :log in sequence)?

    Short answer: you can't. The list of supplementary group IDs is set by
    the login program. The only way a process can change that list is via
    the setgroups(2) system call, which requires root privileges.

    --
    Bob Nichols AT comcast.net I am "rnichols42"

  5. Re: how to refresh shell environment and remain sane

    exec su -l $USER did the trick

    I've found the solution here
    http://www.linuxquestions.org/questi...54#post1791154

    Thanks to ALL

    Igor


+ Reply to Thread