![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sudo question
Folks;
I have a sudo question: - I have a real user named "greg" and another generic user named "devuser" & application that must be run like start/stop as "devuser" user. Is there a way to: Have user Greg login into the Solaris 10 box as himself then sudo as "devuser" to be able to start/stop the application? In other words: Can user Greg sudo to become "devuser" so when he does things as "devuser" i will be able to track what he did? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
yes. all sudo actions are logged. just make sure whatever commands he has access to cannot escape out to a shell
|
|
#3
|
|||
|
|||
|
Thanks, but it would be very helpful if you tell me how to sudo as a user, like how can i use sudo in the "sudoer" file to allow users to sudo to become as "devuser"
|
|
#4
|
|||
|
|||
|
have you consulted the man pages or the documentation? There is much out there.
|
|
#5
|
|||
|
|||
|
Of course i did but i'm still having issues, that's why i was asking for help. for example, i have these two problems:
1. I used this form below to allow user Greg to login as generic user "devuser" which it worked fine with one problem: I want it to ask for a password so user "Greg" has to enter (his own password), but the problem is it doesn't ask for a password. Greg server_name = (devuser) PASSWD: SHELLS, $CMD 2. If i don't want Greg to use a shell when sudo, how can i do that? in other word: now Greg sudo as follow: # sudo -u devuser tcsh How can he sudo if i don't want him to use any shell like tcsh? |
|
#6
|
|||
|
|||
|
1) the entry looks ok. Run this below. Does it prompt for a password now?
as user greg run the below and paste the output Code:
sudo -K sudo -u devuser allowed_command_here sudo -l |
|
#7
|
|||
|
|||
|
The out put from "sudo -k" doesn't return any thing.
The output from "sudo -l" returns: User Greg may run the following commands on this host: (devuser) NOPASSWD: ALL (devuser) NOPASSWD: !SHELLS (devuser) NOPASSWD: !SU (root) ALL (root) /bin/ksh, /usr/bin/ksh, /bin/csh, /usr/bin/csh, /bin/sh, /usr/bin/sh, /sbin/sh, /usr/bin/tcsh (root) !SU usr/local/apache2/bin/apachectl 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 |
|||
| Google The UNIX and Linux Forums |