LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   remove directory from a users PATH (https://www.linuxquestions.org/questions/linux-general-1/remove-directory-from-a-users-path-277526/)

reddazz 01-13-2005 07:59 PM

remove directory from a users PATH
 
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.

qwijibow 01-13-2005 08:13 PM

if i may, i think i have a better solution...

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.

reddazz 01-14-2005 08:57 AM

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.

qwijibow 01-14-2005 09:50 AM

Quote:

I want a user to be able to execute programs in all paths except one,
thats what group management is for. and the way you do it, is by manupulating groups like i have described.

reddazz 01-14-2005 10:29 AM

I'll look into this later on tonight and give you a feedback of the result.


All times are GMT -5. The time now is 04:24 AM.