The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



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
sudo, or not sudo: that is the question iBot UNIX and Linux RSS News 1 02-07-2008 01:40 PM
Sudo ???? ShellBoy UNIX for Advanced & Expert Users 4 07-20-2007 02:14 PM
using sudo in HP-UX yoavbe Shell Programming and Scripting 1 07-17-2006 08:54 AM
Help with Sudo geomonap UNIX for Advanced & Expert Users 1 03-29-2006 04:50 PM
Sudo reddyb UNIX for Dummies Questions & Answers 1 08-23-2001 05:15 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 07-25-2007
ust ust is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 98
About sudo

if I release sudo to a user , the user will have ALL function of root , if I just want a user ONLY have the permission to su another user ( NO any root permission ) , what can i do ? thx
  #2 (permalink)  
Old 07-25-2007
prvnrk prvnrk is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 138
You can control the roles that user going to own after su.

E.g., if you want user1 to do su to user2 only then do the below:

1. entry to be added to sudoers:

user1 <hostname> = /usr/bin/switch.sh (just an e.g.,)

2. create the file /usr/bin/switch.sh with the line below

su - user2

3. chmod +x /usr/bin/switch.sh

4. ask user user1 to run the below:

$sudo /usr/bin/switch.sh


DONE
Closed Thread

Bookmarks

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 02:07 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