Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-16-2011, 05:39 AM   #1
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 =,,
Host_Alias FACULTY =,,

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
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016Reputation: 3016

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
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,705

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
@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.



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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:16 AM.

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