Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a cluster in which lots of user are using. For some users, I have to configure the enviornment (in .bashrc) as A and for some others, I have to configure that as B. Moreover, for some of them, I don't allow them to use a certain software. So how to do this kind of job more efficient? For example, if there is any service such that I can group some user, configure the environment and set their right once?
I have a cluster in which lots of user are using. For some users, I have to configure the enviornment (in .bashrc) as A and for some others, I have to configure that as B. Moreover, for some of them, I don't allow them to use a certain software. So how to do this kind of job more efficient? For example, if there is any service such that I can group some user, configure the environment and set their right once?
There are a lot of tools that you may consider using..
* You can perhaps use netgroups (typically with and LDAP solution too). They are very flexible, but I'm not sure if they provide exactly the kind of control you're after
* Use a configuration management tool such as Puppet of CFengine.
* Set up a sudo solution to control access to services. You can use netgroups to fine grain access control
* ACLs
Thanks for all these suggestions. I am thinking if the following is possible?
In my case, I will modify the path of the installed software and other parameters quite often. So if I did make some modification, I have to modify .bashrc for all users. Is that possible to write a common bashrc and everytime when the user logon, within his/her .bashrc, just include the common bashrc?
For example,
# common bashrc
PATH=$PATH: .....
# user A's bashrc
....
include common bashrc (I don't know if there is any command called 'include' for that purpose)
When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist.
So when a user log in, the /etc/bash.bashrc (the file name may differ from linux distros) is executed before the user's own bashrc. Is this what you're looking for? Now you only need to host the /bash/bash.bashrc file, which can be done by RPM-files, Puppet/CFengine, custom scripts, or whatever.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.