LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   changing env variables of another sessions (https://www.linuxquestions.org/questions/linux-general-1/changing-env-variables-of-another-sessions-4175413246/)

cepal 06-25-2012 06:01 AM

changing env variables of another sessions
 
Hi,
is there a way of how to force changnig env variables to someone else's running shell? My situation is like this: on a jump box I've increased HISTSIZE and HISTFILESIZE in bash profile to the generic jump user, but it won't propagate to already running shells, which, upon exiting, would shrink all the history to the original little lenght which obviously I don't want.

One way is simply sending a SPAM to all the logged in people to manually change their session variables and I might end up that way but I am wondering if that couldn't be done more elegantly... So far, I was unable to find anything on Google.

I know I can read /proc/[PID]/environ but can I write to it? (most definitely not by using awk and/or sed etc. to change the variable values in-line).

Assume I have full root, of course...

Thanks a lot,
CePal

cepal 06-25-2012 06:14 AM

Just to prevent confusion, I'm talking about BASH environment in RHEL 5.4 x64

pan64 06-25-2012 06:25 AM

see the man page of proc: The proc file system is a pseudo-file system which is used as an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.
So I do not think so...

cepal 06-28-2012 04:49 AM

Quote:

Originally Posted by pan64 (Post 4711198)
see the man page of proc: The proc file system is a pseudo-file system which is used as an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.
So I do not think so...

I still hope there is some way, probably not using a virtual filesystem the way one would use a "standard" one, but using some other tools which I am not aware of...


All times are GMT -5. The time now is 05:01 AM.