 |
 |
sudo command
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2006
Status:
Offline
|
|
Hi,
Sudo command allows a permitted user to execute command as another user as specified in the sudoers file. "Sudo su" lets one continuously have the superuser privelege, ie; the privelege doesn't die after one command. "Sudo su -" prevents detail of each command from being logged.
Now what does "sudo su - <username>" do. Example::"sudo su - dwhprod"
Any help is much appreciated.
Thanks.
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
You switch to user dwhprod by supplying the root password.
You're really stringing together commands, you know. You can get to a root shell (yes, that's what you do by hitting "sudo su") by just typing "sudo -s" or (if root is enabled, which it isn't by default on OS X) just "su". You can switch to any user by typing "su username". That will request the login password for that user, however, not the root password. What you're doing is that you first authenticate as root, with sudo, and then use root to run "su username". Running su as root does not require a password, so you only get one password request (for sudo). The - just stops reading switches.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2005
Location: Netherlands
Status:
Offline
|
|
How do you get myself on the sudoers list? I installed ntfs-3g and I need to unmount and mount the drive with the sudo command.
|
|
Apple Powerbook 17" 1,67 GHz, 2 gig RAM, 100 gig HDD, ATI Mobility Radeon 9700 128MB, Superdrive 8X
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2001
Status:
Offline
|
|
users with admin accounts are in the sudoers list. So if you log in with an admin account, just do sudo -s and then enter your password, you'll get a root shell.
If you're logged on as a non-admin user, either sudo to an admin user *first* or modify the /etc/sudoers file. Put the user's short name in there. Of course, to edit /etc/sudoers, you must be root ;-)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2005
Location: Netherlands
Status:
Offline
|
|
Originally Posted by CatOne
users with admin accounts are in the sudoers list. So if you log in with an admin account, just do sudo -s and then enter your password, you'll get a root shell.
If you're logged on as a non-admin user, either sudo to an admin user *first* or modify the /etc/sudoers file. Put the user's short name in there. Of course, to edit /etc/sudoers, you must be root ;-)
Done that, ntfs-3g works great 
|
|
Apple Powerbook 17" 1,67 GHz, 2 gig RAM, 100 gig HDD, ATI Mobility Radeon 9700 128MB, Superdrive 8X
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|