Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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'd like to find out if it's possible to remove a PATH from the $PATH variable of a single user on a system. For example, if I wanted to have /opt/directory/bin accessible by all users except one, could I do this from the users .bash_profile. I know the user could easily edit their .bash_profile and add the deleted path, but it's for a testing account that I'd like to prevent conflicts with stuff thats been installed in the users /home.
take your special folder, and think for a group name for it... for example "special"
edit permissions of the special folder so that it can only be exeuted (opened) by members of the group "special" then make all users except one, members of the group special.
this way, that one user would not be allowed to have any access to this folder.
Thanks but it's not exactly what I'm after, I want a user to be able to execute programs in all paths except one, maybe, I'll have to write a little script as part of /etc/profile to do that but I have no idea whether it will work or where to start.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.