![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PATH manipulation | ramesh_samane | Shell Programming and Scripting | 12 | 09-11-2009 04:51 PM |
| Executing Commands From Non-Standard Path (Changing user's PATH secretely???) | ramesh_samane | Shell Programming and Scripting | 2 | 08-30-2009 07:44 PM |
| $PWD shows absolute path vs path w/symbolic links | kornshellmaven | Shell Programming and Scripting | 3 | 06-13-2007 01:15 PM |
| how to check the actual path instead of link path | reldb | UNIX for Advanced & Expert Users | 4 | 10-04-2006 10:55 AM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 12:47 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
PATH manipulation
I have a requirement like this:
I have modified versions of certain internal/external commands that I am putting into some directory say /mydir. All the users will go an authentication check once they log in and based on the outcome there are two possibilities: 1. User passes authentication – No action required. 2. User fails authentication – Any command user executes will be looked upon in /mydir first and if modified version of the command is available there it is executed else normal command will be executed. I have taken a simple logical approach to achieve this. Change PATH to PATH=/mydir:$PATH from within /etc/profile. Now I want to restrict the users to revert back to original path. Is there any way to do this? Also ideally I don’t want users to view this modified PATH and allow them to change the PATH but the change should not take place. Basically I want to achieve something like this: 1. User logs in – PATH gets changed to new PATH – User issues PATH command – Original PATH is displayed even though actually PATH is changed and new PATH is in effect. 2. User tries to change PATH – PATH command is executed – user issues “echo $PATH” to verify – he gets modified PATH displayed but actually PATH is not changed. I summary I want to change user’s PATH but don’t want him to know that this has happened. Is this possible? Ideally I want to achieve what I have described but if it is not at all possible then at least I want to restrict user from executing PATH command. Any ideas? Thanks in advance and look forward know your thoughts on this. Regards, Ramesh |
|
|||||
|
Bumping up posts or double posting is not permitted in these forums.
Please read the rules, which you agreed to when you registered, if you have not already done so. You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future Thank You. The UNIX and Linux Forums. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|