2.3. Configuring sudo Access-RedHat
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html
sudo command offers a mechanism for providing trusted users with administrative access to a system without sharing the password of the root user. When users given access via this mechanism precede an administrative command with sudo they are prompted to enter their own password. Once authenticated, and assuming the command is permitted, the administrative command is executed as if run by the rootuser.sudo access. You will then be able to use the sudo command from this user account to execute administrative commands without logging in to the account of the root user.Procedure 2.2. Configuring sudo Access
- Log in to the system as the
rootuser. - Create a normal user account using the
useraddcommand. Replace USERNAME with the user name that you wish to create.#useraddUSERNAME - Set a password for the new user using the
passwdcommand.#passwdUSERNAME
Changing password for user USERNAME.
New password:
Retype new password:
passwd: all authentication tokens updated successfully. - Run the
visudoto edit the/etc/sudoersfile. This file defines the policies applied by thesudocommand.#visudo - Find the lines in the file that grant
sudoaccess to users in the groupwheelwhen enabled.## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL - Remove the comment character (#) at the start of the second line. This enables the configuration option.
- Save your changes and exit the editor.
- Add the user you created to the
wheelgroup using theusermodcommand.#usermod-aGwheelUSERNAME - Test that the updated configuration allows the user you created to run commands using
sudo.- Use the
suto switch to the new user account that you created.#suUSERNAME- - Use the
groupsto verify that the user is in thewheelgroup.$groups
USERNAME wheel - Use the
sudocommand to run thewhoamicommand. As this is the first time you have run a command usingsudofrom this user account the banner message will be displayed. You will be also be prompted to enter the password for the user account.$sudowhoami
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things: #1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility. [sudo] password for USERNAME:
rootThe last line of the output is the user name returned by thewhoamicommand. Ifsudois configured correctly this value will beroot.
sudo access. You can now log in to this user account and use sudo to run commands as if you were logged in to the account of the root user.2.3. Configuring sudo Access-RedHat的更多相关文章
- Back-off pulling image \"registry.access.redhat.com/rhel7/pod-infrastructure:latest
Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePull ...
- 解决: docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
直接获取 rpm文件 wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.1 ...
- open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory 解决方案
方法一. yum安装 yum install *rhsm* 方法二 (我是用这方法解决的) 执行命令: ① wget http://mirror.centos.org/centos/7/os/x ...
- RedHat 和 Mirantis OpenStack 产品的版本和功能汇总和对比(持续更新)
Mirantis 和 Red Hat 作为 OpenStack 商业化产品领域的两大领军企业,在行业内有重要的地位.因此,研究其产品版本发布周期和所支持的功能,对制定 OpenStack 产品的版本和 ...
- CVE-2014-4877 && wget: FTP Symlink Arbitrary Filesystem Access
目录 . 漏洞基本描述 . 漏洞带来的影响 . 漏洞攻击场景重现 . 漏洞的利用场景 . 漏洞原理分析 . 漏洞修复方案 . 攻防思考 1. 漏洞基本描述 0x1: Wget简介 wget是一个从网络 ...
- Redhat 官方Performance_Tuning_Guide
https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Gui ...
- SAP中的读访问日志Read Access Logging(RAL)
定义 读取访问日志(以下简称RAL)用于监视并记录对敏感数据的读取访问.这里的数据是指会被法律,外部公司政策或公司内部政策归类为敏感信息的数据.以下典型问题可能会与使用读取访问日志的应用程序有关: 谁 ...
- redhat 7安装CentOS 7 yum源
http://www.bubuko.com/infodetail-2004218.html http://www.bubuko.com/infodetail-2004218.html ******** ...
- 红帽旗下Linux的版本说明RedHat、CentOS、Fedora、OEL等
简单总结一下RedHat.CentOS.Fedora Core区别关系: RedHat: 红帽已经被IBM 340亿刀收购了,但是红帽依旧发型自己的RedHat enterprise linux 版本 ...
随机推荐
- [转载]马士兵Java视频教程 —— 学习顺序
书(Java核心编程)+视频..这样学感觉比较好.. 原文地址:马士兵Java视频教程 —— 学习顺序作者:习惯 第一部分:J2se学习视频内容包括: 尚学堂科技_马士兵_JAVA视频教程_JDK5. ...
- [Swift通天遁地]二、表格表单-(15)自定义表单文本框内容的格式
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- ASP.NET 之 Chart Control for .Net Framework
ps:曾经靠着这张图做了很多的图形报表
- V-SQL的简单使用
V-SQL概述: V-SQL,是对同望V3平台时间多数据支持非常重要的基础引擎.因为各个数据库的查询语句的语法有所不同,V-SQL的功能是把查询语句解析为执行系统连接的数据库(MSSQL,Oracle ...
- Java中 == 和 equals()
记住三句话 1. 语义上:==指的是内存引用一样.equals是指的是逻辑相等.逻辑相等具体的意思由编写者决定(即在引用类型中,"=="是比较两个引用是否指向堆内存里的同一个地址( ...
- pd_ds 之 hash
http://attack.cf/?post=23 打个广告....
- JS高级——递归
基本概念 1.在函数内调用函数自己,就是递归 2.没有递归结束条件的递归,就是死递归 3.化归思想,将一个问题由难化易,由繁化简,由复杂化简单的过程称为化归,它是转化和归结的简称. 基本使用 1.计算 ...
- html——快捷键
webstorm ctrl+c 复制 ctrl+v 粘贴 ctrl+x 剪切一行或删除一行 ctrl+d 复制本行到下一行 ctrl+z 退回之前操作 ctrl+shift+z 已经做好的退回之后的下 ...
- Sandbox 沙盒
In computer security, a sandbox is a security mechanism for separating running programs, usually in ...
- Cesium学习笔记(四)Camera ----http://blog.csdn.net/hobhunter/article/details/74909641
Cesium 相机控制场景中的视野.操作相机的方法有很多,如旋转,缩放,平移和飞到目的地.Cesium具有默认的鼠标和触摸事件处理程序与相机进行交互,还有一个API以编程方式操纵相机. 我们可以使用该 ...