LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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



Reply
 
Search this Thread
Old 01-13-2005, 08:59 PM   #1
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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.
 
Old 01-13-2005, 09:13 PM   #2
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 01-14-2005, 09:57 AM   #3
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 74
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.
 
Old 01-14-2005, 10:50 AM   #4
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 01-14-2005, 11:29 AM   #5
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 74
I'll look into this later on tonight and give you a feedback of the result.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rm: cannot remove directory `ff': Directory not empty blancs Linux - General 17 08-29-2011 02:47 PM
how do I remove a variable from PATH melinda_sayang Slackware 17 02-28-2009 01:55 PM
How to rsynce the actual directory path instead of just the directory at the end of Niceman2005 Linux - General 5 04-08-2005 08:58 PM
How to remove Mandrake Galaxy Theming for all users and all new users. Zombie_Ryushu Mandriva 0 01-04-2005 06:38 PM
how to remove PATH variable? greg108 Linux - Newbie 2 08-22-2003 02:55 PM


All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration