|
Home > Archive > Red Hat Topics > August 2005 > how to refresh shell environment and remain sane
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to refresh shell environment and remain sane
|
|
| igor.furlan@gmail.com 2005-07-22, 2:53 am |
| 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 )
| |
| Sandgroper 2005-07-23, 5:46 pm |
|
<igor.furlan@gmail.com> wrote in message
news:1122004713.777776.146240@f14g2000cwb.googlegroups.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
| |
| Frank Winans 2005-07-25, 8:46 pm |
|
<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)?
How about exec bash -l {that's lowercase L, not one, after the dash}
| |
| Robert Nichols 2005-07-26, 7:47 am |
| In article <1122004713.777776.146240@f14g2000cwb.googlegroups.com>,
igor.furlan@gmail.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"
| |
|
|
|
|
|