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 root
user.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
root
user. - Create a normal user account using the
useradd
command. Replace USERNAME with the user name that you wish to create.#
useradd
USERNAME - Set a password for the new user using the
passwd
command.#
passwd
USERNAME
Changing password for user USERNAME.
New password:
Retype new password:
passwd: all authentication tokens updated successfully. - Run the
visudo
to edit the/etc/sudoers
file. This file defines the policies applied by thesudo
command.#
visudo
- Find the lines in the file that grant
sudo
access to users in the groupwheel
when 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
wheel
group using theusermod
command.#
usermod
-aG
wheel
USERNAME - Test that the updated configuration allows the user you created to run commands using
sudo
.- Use the
su
to switch to the new user account that you created.#
su
USERNAME-
- Use the
groups
to verify that the user is in thewheel
group.$
groups
USERNAME wheel - Use the
sudo
command to run thewhoami
command. As this is the first time you have run a command usingsudo
from this user account the banner message will be displayed. You will be also be prompted to enter the password for the user account.$
sudo
whoami
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 thewhoami
command. Ifsudo
is 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 版本 ...
随机推荐
- VPS主机
腾讯云企业认证 备案域名要是顶级域名格式,所以不能是www.blueheartzf.com,而要是blueheartzf.com
- Linux 下文本查找技巧你掌握了吗?
前言 之前介绍过很多linux下查找相关的命令,例如<Linux中的文件查找技巧>,<find命令高级用法>,<如何查看linux中文件打开情况-lsof命令>等等 ...
- $stylus美化$
一直在用洛谷 当然不一定是洛谷 其他的网站也可以用 比如说codeforces 还是决定要美化一波 首先去找一个插件 叫做 stylus stylus下载的很多 我不想过多说明. Google和QQ浏 ...
- gerrit项目配置
1. 相关约定说明: 1.1 gerrit服务器ip地址:192.168.130.10 1.2 gerrit服务器端用户名:gerrit 1.3 gerrit用户端管理员:admin 1.4 ssh端 ...
- CSS 样式的优先级(重要,一定要理解)
1. 同一元素引用了多个样式时,排在后面的样式属性的优先级高 例如,下面的 div,同时引用了 [.default] 和 [.user] 中的样式,其中 [.user] 样式中的 width 属性会替 ...
- Intellij IDEA14配置
一.下载 官网下载地址:http://www.jetbrains.com/idea/ 目前最新的版本是15,发现15注册比较麻烦,好像需要只能通过联网激活.而网上14的离线注册码一大堆,就下载了14, ...
- 如何调用com组件中包含IntPtr类型参数的函数
背景 公司的支付平台最近对接了西安移动的支付接口,接口中签名的方法是对方提供了一个com组件,组件中包含了一个签名的方法和一个验签的方法,注册了签名之后,在vs中进行了引用,引用之后,查看组件的定义如 ...
- 解决:efi usb device has been blocked by the current security policy
解决:efi usb device has been blocked by the current security policy 问题描述:U盘装系统或者其他操作时,是因为BIOS安全策略,出现上述 ...
- React Native真机调试安卓版
React Native真机调试安卓版 一.准备工作 1.1 环境搭建 React Native中文网的文档已经非常清晰地描述了,按照步骤即可.http://reactnative.cn/docs/0 ...
- 使用Kettle增量抽取MongoDB数据实践
需求: 增量抽取MongoDB数据并加载到MSSQL 由于不能使用关系型数据库的自定义SQL, 所以主要遇到的问题有: 增量时间的查询和参数控制 ETL的批次信息和调用参数的写入 第一个问题的解决如下 ...