LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2011, 05:39 AM   #1
sublime188
LQ Newbie
 
Registered: Jan 2011
Posts: 12

Rep: Reputation: 0
Smile Simple Host_Alias Explanation


I am studying the use of sudo right now, and I would like a simple explanation of what exactly Host_Alias is used for. Reading the /etc/sudoers files does not provide too much info on this.

What does Host_Alias restrict or enable?

For example, lets say I have 6 computers, 3 of them belong to an administrators group and the other 3 belong to a faculty group. Assume they have static ip's.

By adding:
Host_Alias ADMINS = 192.168.1.1, 192.168.1.2, 192.168.1.3
Host_Alias FACULTY = 192.168.1.4, 192.168.1.5, 192.168.1.6

Then, in the user specifications I would indicate something like:
jill FACULTY = /usr/bin/, !SU, !SHELLS

From what I have been able to deduce this means, jill, when logged on to a faculty machine would get whatever commands are in /usr/bin and would not be able to su or change shells. Now, if she logged on to an admin computer she would not have these rights/restrictions correct?
Any clarifications/corrections will be much appreciated
 
Old 02-16-2011, 08:19 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,092

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
http://www.gratisoft.us/sudo/sudoers.man.html

Edit as I think chrism01 has better answer.

Last edited by jefro; 02-16-2011 at 10:01 PM.
 
1 members found this post helpful.
Old 02-16-2011, 08:48 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
@OP: you are correct. Host_Alias doesn't 'do' anything, it's just a shorthand way of naming the systems you want to use in a particular sudoers line.
In your case, you have not specified a line for ADMINS computers, so nothing is allowed for anyone...
The sudoers files ADDs privileges; if nothing is specified, nothing is allowed; you have to read the entire file to check who is allowed what and where.
 
1 members found this post helpful.
  


Reply

Tags
sudo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone give me SIMPLE explanation of how subnet masking works? BobNutfield Linux - Networking 11 11-16-2010 04:49 PM
Need explanation how does the output comes????? immadisetty Programming 7 03-03-2010 04:11 AM
UIDs/ SID's/ GID's... Simple explanation? JeffC1 Linux - Newbie 1 07-11-2008 06:21 AM
Using "sed" - a simple explanation needed midiox Linux - Newbie 2 04-03-2006 07:47 AM
I Could Use An Explanation winger Linux - General 3 04-13-2002 11:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration