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 版本 ...
随机推荐
- PCB 利用nginx正向代理实现上网
在PCB行业中,为了保证服务器的安全性,服务器正常都是需要与外网断开的,如果想在服务器通过浏览器下载一点东西是不行.通常作法是在一台可以上网的电脑下载文件,接着放到网络盘上,再从网络盘拷贝到服务器上. ...
- Euclid(几何)
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2831 题意:已知A,B,C,D,E,F的坐标, ...
- 确定比赛名次(toposort)
http://acm.hdu.edu.cn/showproblem.php?pid=1285 #include <stdio.h> #include <string.h> ; ...
- P3390矩阵快速幂
题目背景 矩阵快速幂 题目描述 给定n*n的矩阵A,求A^k 输入输出格式 输入格式: 第一行,n,k 第2至n+1行,每行n个数,第i+1行第j个数表示矩阵第i行第j列的元素 输出格式: 输出A^k ...
- SpringBoot入门之HelloWorld
1.SpringBoot简介 百度百科:Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而 ...
- Vue导航守卫beforeRouteEnter,beforeRouteUpdate,beforeRouteLeave详解
Vue导航守卫以我自己的理解就是监听页面进入,修改,和离开的功能.每个守卫接受三个参数 to: Route: 即将要进入的目标路由对象 from: Route: 当前导航正要离开的路由 next: F ...
- CF 351A - Jeff and Rounding DP
http://codeforces.com/problemset/problem/351/C 题意:有2*n个浮点数a1,a2,a3...a2*n,把他们分成n队,对于每对<A,B>,对A ...
- scala的枚举
package com.test.scala.test /** * 枚举 */ object Enum extends Enumeration { val Red,Yellow,Green=Value ...
- java 任意时间转换日期类型
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); try { Date dd=sdf.parse("201 ...
- WinForms_ListView中获取选中项数据值
string value = listList.SelectedItems[0].SubItems[1].Text;//获取首行listview的值 string va = listList.Sele ...