What exactly is Sudo?

How does Sudo differ from doing a chmod +s <executable>?  How exactly is sudo used...?

Thanks
dissolvedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JammyPakCommented:
suid allows any user to run the executable, where as sudo is more flexible - you can define groups of users, and groups of executables, and then link them together. So...suid lets anyone run it, but sudo doesn't necessarily do that.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fixnixCommented:
you can type 'man sudo' to get an explanation but in short,

sudo allows non priveledge users root access to run certain apps without having to give them full root access of the root password.
0
JammyPakCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dissolvedAuthor Commented:
Thanks. I'll check out those links.

Say I want to give root type access to a program firewalk in /usr/bin

the syntax would be

sudo -v -u <username>   ...what else?
Thanks
0
JammyPakCommented:
here's what I woud do:
run 'visudo' as root
this edit's the /etc/sudoers file

then, at the bottom, you can add lines:
%<linux group name>   <hostname | ALL>=<list of commands>

so,
%trusted ALL=/usr/bin/nmap

will let everyone in the group 'trusted' run nmap from any machine

you can also define user aliases, command aliases, and host name aliases, but in this case I didn't...
0
JammyPakCommented:
sorry...to follow up there, after this has been done, the user can then execute 'sudo nmap' and it will prompt them for their password, and then execute
0
dissolvedAuthor Commented:
Very cool, thank you
0
dissolvedAuthor Commented:
quick question. I just did the same thing with ping

now when a regular user does
sudo ping


It just pings. But when they do sudo nmap, it prompts for password.  Why the difference?
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.