LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   adding permanent enviroment variable for all users (https://www.linuxquestions.org/questions/centos-111/adding-permanent-enviroment-variable-for-all-users-4175629909/)

robertkwild 05-17-2018 03:45 PM

adding permanent enviroment variable for all users
 
hi all,

i want to add this enviroment variable to all users -

https://knowledge.autodesk.com/suppo...ux-server.html

so my question is how do i add it to all users not just for one users home directory as more than one person logs in using different logins/profiles

i have edited the file "/etc/profile" and added this line to the end but doesnt work

"export ADSKFLEX_LICENSE_FILE=@192.168.1.233"

what am i doing wrong, how do i also call it a filename as it says ie .flexlmrc

cheers,

rob

MensaWater 05-17-2018 04:04 PM

The files sourced during login depend on the user's shell. For posix shell and korn shell /etc/profile was the global file. For bash look at /etc/bashrc. For csh look at /etc/login.

Note that many things can set environment variables. Any default sourced file might in turn source other files which in their turn might source files. Also the $HOME files are sourced by default AFTER the system profiles in /etc so any value set can be overridden. (And they can also source other things.)

TB0ne 05-18-2018 07:51 AM

Quote:

Originally Posted by robertkwild (Post 5856053)
hi all,
i want to add this enviroment variable to all users -

https://knowledge.autodesk.com/suppo...ux-server.html

so my question is how do i add it to all users not just for one users home directory as more than one person logs in using different logins/profiles i have edited the file "/etc/profile" and added this line to the end but doesnt work

"export ADSKFLEX_LICENSE_FILE=@192.168.1.233"

what am i doing wrong, how do i also call it a filename as it says ie .flexlmrc

Sorry, but is this a trick question?

The instructions from Autodesk support you link to (and have you CALLED Autodesk support for assistance with their pay-for product???) specifically tell you that it looks for the .flexlmrc file in whatever users home directory. So no matter WHERE you put that in their .profile, .bashrc, .bash_profile, whatever...it will not work. The instructions say that.

You can deploy things to all new users using the /etc/skel directory, but aside from that the solution to your problem is in the link you posted. In short, follow their instructions.

::EDIT::
I thought this sounded familiar:
https://www.linuxquestions.org/quest...er-4175626129/

Working on this for two months, and you said you were going to follow up and 'let us know'.


All times are GMT -5. The time now is 06:58 AM.