Quantcast
Channel: VMware Communities : Popular Discussions - vSphere Management Assistant (vMA)
Viewing all articles
Browse latest Browse all 25377

Adding an Active Directory group to sudoers file

$
0
0

I found an article "virtuallyghetto.com" that describes how to add an AD group to vMA sudoers file. I am getting this message when trying to run certain scripts on ESXi Hosts. I'm assuming this is referring to the vMA sudoers file and not the ESXi sudoers file (if one even exists anymore).

 

My question is regarding the bottom note "We're escaping both the initial forward slash and the space.". I have limited Linux file editing knowledge so, I'm not 100% clear what the escaping portion refers to? Can anyone explain it in lamens terms maybe by keystroke? The group I'll be adding is in the format Domain\AD Group

 

If you would like to add an AD group to sudoers file, you need to edit /etc/sudoers file. You need to make sure you escape the initial forward slash and any white spaces that maybe in the group name. In this example, we have a group called "VI Admins" that you would like all users to be able to login to vMA using their AD credentials and perform operations using sudo.

 

1. Edit /etc/sudoers using vi-admin account, make sure you use 'sudo':

 

[vi-admin@kate ~]$ sudo vi /etc/sudoers

 

2. Add the following towards the bottom of the file:

 

%PRIMP-IND\\VI\ Admins ALL=(ALL) ALL

 

Note: We're escaping both the initial forward slash and the space

 

3. Verify user can now sudo by querying sudo operatoins the user is allowed to execute:

 

[primp@kate ~]$ id
uid=1058014289(primp) gid=1058013696(domain^admins) groups=1058013696(domain^admins),1058014440(vi^admins)

 

[primp@kate ~]$ sudo -l
Password:
User primp may run the following commands on this host:
(ALL) ALL


Viewing all articles
Browse latest Browse all 25377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>