![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tar the symbolic link | ganga.dharan | Shell Programming and Scripting | 1 | 05-23-2008 07:11 AM |
| need some info about symbolic link and hard link | detective linux | UNIX for Dummies Questions & Answers | 2 | 01-08-2008 07:36 AM |
| Symbolic Link Confusion | Sepia | UNIX for Dummies Questions & Answers | 5 | 05-07-2007 05:40 PM |
| symbolic Link | bhargav | UNIX for Dummies Questions & Answers | 1 | 10-15-2004 09:41 AM |
| get symbolic link file | andrec | UNIX for Dummies Questions & Answers | 11 | 11-13-2001 03:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
A few more details, please. After reading your posting, I am left with the impression that you're more interested in aliases (defining pseudonyms for commands) and not in creating alternate paths for files.
|
|
||||
|
I see several possibilities here so let me take them one at a time.
1 ) Limit access to non-OS commands for a given user You could create a directory anywhere on the system (perhaps in a "bin" subdirectory from the user's home) where commands -- compiled or script -- could be stored. Those commands could then be owned by that user and be executable only by that ID. Simply add the directory to the user's PATH environment variable. 2 ) Create a alias for a given command This is useful when you have a particularly complicated command perhaps with many options. By using alias(1) in the user's profile, you can simplify any command. One that was standard twenty years ago when I first did this is college was: alias la="/bin/ls -la" 3 ) I'm making this way too hard and you want the user to execute some admin commands such as df(1M) Just add /usr/sbin to the user's PATH. |
|
||||
|
I just responded to a similar question. The simple answer is giving an account a UID of 0 is the same as making another root (DON'T DO THIS UNLESS YOU HAVE REALLY GOOD REASON). For example, at my office, we have a "cert" account with full root access but the password is sealed in an envelope with our security department incase of multiple bus accidents for the admins.
There is sudo -- http://www.gratisoft.us/sudo/ -- which can be used to configure root access on certain commands for a given list of users. However, I suspect the answer is much simpler. Generally, UNIX commands are broken into two major categories: 1 ) user (stored in /bin or /usr/bin) 2 ) administrative (stored in /sbin or /usr/sbin), and User commands are for the entire user population and include such basics as ls, mkdir, cp, and vi. Whereas administrative commands are meant to be used by the system administrator for such things as mounting file systems, configuring devices, adding users, and such. There are really very few circumstances (I'm a bit of a purist) where any account other than that of an administrator requires root access to execute a command. One common example is running backups from, say, an operator's account. This could be a very long thread if we got into a full-blown discussion. In short, to give a non-root user access to a given command: 1 ) Set the PATH environment variable as needed, 2 ) alias the command 3 ) Use sudo ONLY if root access is absolutely required. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|