how to refresh shell environment and remain sane
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Topics > how to refresh shell environment and remain sane




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    how to refresh shell environment and remain sane  
igor.furlan@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-22-05 07: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 )






[ Post a follow-up to this message ]



    Re: how to refresh shell environment and remain sane  
Sandgroper


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-23-05 10: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







[ Post a follow-up to this message ]



    Re: how to refresh shell environment and remain sane  
Frank Winans


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-05 01:46 AM


<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}







[ Post a follow-up to this message ]



    Re: how to refresh shell environment and remain sane  
Robert Nichols


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-05 12:47 PM

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"





[ Post a follow-up to this message ]



    Re: how to refresh shell environment and remain sane  
igor.furlan@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-10-05 07:46 AM

exec su -l $USER      did the trick

I've found the solution here
[url]http://www.linuxquestions.org/questions/showthread.php?postid=1791154#post1791154[
/url]

Thanks to ALL

Igor






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:50 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register