The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sudo question melias Security 12 05-26-2008 01:10 AM
sudo, or not sudo: that is the question iBot UNIX and Linux RSS News 1 02-07-2008 10:40 AM
Sudo question Zarnick Linux 2 01-22-2008 05:25 AM
SUDO question - please help sajjad02 UNIX for Advanced & Expert Users 5 04-27-2005 08:22 AM
sudo question TRUEST UNIX for Dummies Questions & Answers 1 01-16-2004 09:53 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 01-17-2008
vbe vbe is online now
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 745
Greetings,
If its only to execute start/stop script for an application, why not write 2 scripts that Greg can execute (one for start and the other for stop)
e.g. start_appl and stop_appl
then in sudoers:

greg ALL=/usr/bin/su - devuser -c st*_appl
Reply With Quote
Forum Sponsor
  #9  
Old 01-17-2008
Registered User
 

Join Date: Oct 2007
Posts: 93
Thanks Vbe;
But your solution is not what i'm looking for, as i may need to add more commands for that user and may be other users. If you read my last reply you will see the last 2 things i'm looking for
Reply With Quote
  #10  
Old 01-17-2008
Registered User
 

Join Date: Dec 2007
Posts: 255
Quote:
Originally Posted by Katkota View Post

Also; i was asking how can user Greg sudo as "devuser" user so when he sudo he becomes "devuser" so he doesn't have to type sudo before every command he needs to run as "devuser", in other word, how can he sudo to become "devuser" to make the prompt changes from:
#Greg@server>
to
#devuser@server>


I hope i'm making it this question clear enough
this is not how sudo works. sudo is designed to give access to a limited amount of commands.

Based on your requirements you should just give him the account password and have him use su. There is no benefit to allowed greg to run a shell with sudo.
Reply With Quote
  #11  
Old 01-18-2008
vbe vbe is online now
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 745
I agree with Franck: It is not to be done with sudo...
Your alternatives now will lead to other issues such as "as" devuser you cannot stop Greg to change devuser's password for instance or to modify the .profile etc...
Secondly, you would have to modify (and test) the .profile to take in account who (and from where...) is logging onto the account and send it to another history file..

But what you are trying to do can be done quite easily...
Just add a .rhost in devuser's home directory wiht the name of the box and greg.

Greg can then use the account with no passwd by typing :
remsh or rlogin
e.g. with remsh (or rsh depending of your *ix flavour)
remsh yourboxname -l devuser


All the best
Vic
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0