文章来源:https://derflounder.wordpress.com/2012/12/14/adding-ad-domain-groups-to-etcsudoers/

Adding AD domain groups to /etc/sudoers

recent discussion on the MacEnterprise list focused around how to give members of Active Directory groups the ability to run commands as root using the sudo command-line utility. This would allow the users in those groups the ability to run some or all commands with root privileges in Terminal without having to give those accounts administrative privileges on the Mac in question.

To do this, you would need to add an entry to the /etc/sudoers file. /etc/sudoers gives listed users or groups the ability to execute commands while having the privileges of the root user.

Editing /etc/sudoers

To edit /etc/sudoers safely, make sure to use the visudo utility. This application will do a sanity check on your changes to /etc/sudoers before putting them into production.

visudo uses vi as its editor. If you haven’t used vi previously, I recommend doing some research on vi commands  before launching visudo.

Adding entries to /etc/sudoers

Adding the following entry to /etc/sudoers would allow you to give full sudo permissions to an AD group named ITadmins:

1
%DOMAIN\\ITadmins      ALL=(ALL) ALL

Because a number of AD groups have spaces in the names, you’ll need to escape the spaces using backslashes. For example. adding the following entry to /etc/sudoers would allow you to give full sudo permissions to an AD group named Group Name With Spaces:

1
%DOMAIN\\Group\ Name\ With\ Spaces       ALL=(ALL) ALL

In both cases, replace DOMAIN with your AD domain’s name.

[CENTOS7] 将域群组加入到Sudoer里的更多相关文章

  1. apache Subversion 直接支持LDAP域群组

    如果你的Subversion已经用apache的ldap支持用户认证功能,你是否常常在想,既然都用ldap支持认证,为什么不直接支持域群组, 反而在authz文件里面一个一个的手工定义,或者有人用脚本 ...

  2. centos7搭建集群必知:centos7已经无iptables,只有firewall

    1.防火墙概述 centos7搭建集群,发现没有iptables,需要安装.防火墙为firewalle CentOS7默认的防火墙不是iptables,而是firewalle. CentOS 7.0默 ...

  3. 微信小程序的机会在于重新理解群组与二维码

    历时一年,唯一一个尚未发布就获得Pony Ma与Allen Zhang站台的产品:微信小程序,将于2017年1月9日正式上线了.我很期待.唯一要警惕的是:防止长考出臭棋. 在上线前夕,我对于如何借助小 ...

  4. 一行实现QQ群组头像,微信群组,圆角等效果. 并支持url直接加载图片

    说点题外话. Coding中我们总是经历着这么几个过程. 学会使用: 不管是API也好, 开源库也好. 总是在最开始的学会去用. 了解实现原理: 可能会因为一些不兼容, 代码的异常状态的处理不够完美等 ...

  5. Windows Server 2008 R2域控组策略设置禁用USB

    问题: Windows Server 2008 R2域控服务器如何禁用客户端使用USB移动存储(客户端操作系统需要 Windows Vista以上的操作系统,XP以下的操作系统不能禁用USB移动存储) ...

  6. 添加群组表AppGroup和群组详细表AppGroupDetails

    添加群组表AppGroup和群组详细表AppGroupDetails CREATE TABLE [dbo].[AppGroup]( ) NOT NULL PRIMARY KEY, ) NOT NULL ...

  7. linux基础-第七单元 用户、群组及权限的深入讨论

    怎样查看文件的权限 ls命令详解 root用户及文件的安全控制 什么是root用户 用户分类 文件操作权限 文件操作权限的字符表示 chown chgrp 使用符号表示法设定文件或目录上的权限 chm ...

  8. linux基础-第六单元 用户、群组和权限

    用户及passwd文件 /etc/passwd文件的功能 /etc/passwd文件每个字段的具体含义 shadow文件 /etc/shadow文件的功能 /etc/shadow文件每个字段的具体含义 ...

  9. linux命令之 用户和群组

    一.保存用户信息的文件 1 /etc/passwd root:x:::root:/root:/bin/bash pwftp:x::::/alidata/www/wwwroot/:/sbin/nolog ...

随机推荐

  1. GO入门——1.基础

    1 安装配置与命令 GOROOT:Go根目录 GOPATH:GO工作目录,其目录下需要建立一下三个子目录 bin :存放编译后生成的可执行文件 pkg :存放编译后生成的包文件 src :存放项目源码 ...

  2. docker网络之overlay

    使用docker network的好处是:在同一个网络上的容器之间可以相互通信,而无需使用expose端口特性 本文使用docker-swarm进行overlay网络的分析.使用2个vmware模拟2 ...

  3. Windows下编译打包Spice PC客户端

    目录 1 环境搭建 2 编译客户端 3 打包客户端   1 环境搭建 1.1 准备工作 安装启动: 安装替换图标工具: Resource Hacker 安装exe制作工具: NSIS(提取码:3dfp ...

  4. 《Netty权威指南》目录

    一.基础篇 走进Java NIO 1. Java 的 I/O 演进之路:https://www.cnblogs.com/zengzhihua/p/9930652.html 2. NIO 入门:http ...

  5. tomcat 虚拟目录

    在webapps同级目录 下建立一个webapps_abc的目录,将网站根目录abc文件夹放入webapps_abc目录下: 找到conf目录下的,server.xml文件,在service节点下添加 ...

  6. 上传文件限制导致413-Request Entity Too Large

    在使用Nginx时,在异步上传图片到服务器时,发现抛出“error”错误,仔细发现抛出错误内容为:413-Request Entity Too Large,查看Tomcat运行日志时发现后台没有接收到 ...

  7. vue-cli watch/timer

    watch 监听函数 data:{ letter:'' }, watch:{ letter(){ xxxxxx } }, timer data(){ return{ timer:null } }, h ...

  8. ASP.NET MVC实现剪切图片

    开发需要,我们需要对某一张图片进行剪切.就是说,获取图片某一区域.下面Insus.NET教大家轻便容易实现它. 首先写好一个处理函数,它建在MVC应用程序结构Utilities目录下: 准备好一张图片 ...

  9. MVC会员注册

    自从写了<数据库数据加密与解密>http://www.cnblogs.com/insus/p/3434735.html.其中也有提及Insus.NET将要在MVC应用程序中实现会员注册的功 ...

  10. 一个大区域输入框应该使用textarea