?
Solved

What exactly is Sudo?

Posted on 2005-04-13
8
Medium Priority
?
411 Views
Last Modified: 2010-04-20
How does Sudo differ from doing a chmod +s <executable>?  How exactly is sudo used...?

Thanks
0
Comment
Question by:dissolved
  • 4
  • 3
8 Comments
 
LVL 16

Accepted Solution

by:
JammyPak earned 1900 total points
ID: 13773020
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
 
LVL 9

Assisted Solution

by:fixnix
fixnix earned 100 total points
ID: 13773028
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
 
LVL 16

Expert Comment

by:JammyPak
ID: 13773054
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:dissolved
ID: 13773294
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
 
LVL 16

Expert Comment

by:JammyPak
ID: 13773473
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
 
LVL 16

Expert Comment

by:JammyPak
ID: 13773531
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
 

Author Comment

by:dissolved
ID: 13773744
Very cool, thank you
0
 

Author Comment

by:dissolved
ID: 13774072
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question