LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Being a newbie, can someone help with sudo and setuid (https://www.linuxquestions.org/questions/linux-newbie-8/being-a-newbie-can-someone-help-with-sudo-and-setuid-901462/)

smintz 09-06-2011 01:22 PM

Being a newbie, can someone help with sudo and setuid
 
I am having difficulties with understaanding sudo and setuid.
Is it possible to get the steps involved for setting these up and then running them?
Thanks

kasl33 09-06-2011 01:33 PM

Quote:

Originally Posted by smintz (Post 4463154)
I am having difficulties with understaanding sudo and setuid.
Is it possible to get the steps involved for setting these up and then running them?
Thanks

Well first of all, you have to boot into Linux :D (I can see you're using Windows 7).

For setuid: I am thinking you might be mixing this up with su. Try this to become root (that's su and a hyphen):

Code:

su -
and enter your password.

Next, sudo is another way to gain elevated priveledges without actually becoming the root user. If your user/group is allowed to use sudo (you can just try it or check the /etc/sudoers file) then you can run most commands like this:

Code:

sudo command
For instance, if you are in Ubuntu (please put what distro you are using in your signature) and want to run a sytem update:

Code:

sudo apt-get update
sudo apt-get upgrade

For Ubuntu you would rarely ever need to actually su - to the root user account. However, if you needed to, you would have to first set the root password:

Code:

sudo passwd root
and then you could su - to the root account and use it.

chrism01 09-06-2011 06:09 PM

For 'su -' enter root's passwd, not your own. Note that that is the default target user; you can 'su - some_user' to any user if you know their passwd.
http://linux.die.net/man/1/su

You enter your own passwd for sudo access
http://linux.die.net/man/8/sudo
http://linux.die.net/man/5/sudoers
http://www.gratisoft.us/sudo/man/sudoers.html

suid, sgid are for permissions, not logging in as others
setuid, setgid (aka suid, sgid) http://www.omnisecu.com/gnu-linux/re...and-setgid.htm


All times are GMT -5. The time now is 11:21 AM.