The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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 08: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 06:40 PM
symbolic Link bhargav UNIX for Dummies Questions & Answers 1 10-15-2004 10:41 AM
get symbolic link file andrec UNIX for Dummies Questions & Answers 11 11-13-2001 03:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-27-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
Creating symbolic link

Any idea how to create a symbolic link...for example i want to create a symbolink link for a specific user in his profile to use the df command...?

Thanks in advance
  #2 (permalink)  
Old 09-27-2006
hegemaro hegemaro is offline
Registered User
  
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 134
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.
  #3 (permalink)  
Old 09-27-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
What i want to do is to create a directory having the commands that a specific user can execute....the only way i know is to create a directory have symbolic link of the commands that i want that user to access......
  #4 (permalink)  
Old 09-27-2006
hegemaro hegemaro is offline
Registered User
  
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 134
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.
  #5 (permalink)  
Old 09-27-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
how about if i want to add a new user and give him just the same privlege as the root?....i know i am asking too much but i want to get the principle behind all this....
  #6 (permalink)  
Old 09-27-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,960
I'm trying to figure out the principle behind what you're asking. What problem are you trying to solve, exactly?
  #7 (permalink)  
Old 09-30-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
Quote:
Originally Posted by Corona688
I'm trying to figure out the principle behind what you're asking. What problem are you trying to solve, exactly?
What i am trying to solve is this:
I have been reuested by manager to create 6 users on unix server machine. 3 users to have the same privilage as the root user(they can add/remove users, reboot or restart the server,etc...) while the rest to be normal users, (they can do daily work such as monitoring the system, cp, mv...etc)......one i was thinking to do it is to define the three new users in the root group and the rest to be in others group.....do u think this would solve the request or there is somethig else which i dont know??
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0