linux 普通用户切换成root免密码
[root@ok ~]# vim /etc/pam.d/su
下面是/etc/pam.d/su文件的内容
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required pam_wheel.so use_uid
auth include system-auth
account sufficient pam_succeed_if.so uid = use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session optional pam_xauth.so
将第4行的#号去掉,然后将登陆用户加入 wheel组
[root@ok ok]# usermod -G wheel ok
[ok@ok ~]$ su
[root@ok ok]#
su直接切换成root
linux 普通用户切换成root免密码的更多相关文章
- Linux的用户切换、修改用户的用户名和密码
一.用户切换 "$":普通用户提示符 "#":root用户提示符 1.普通用户到root: 方式一:命令:su然后输入root密码 此种方式只是切换了root ...
- Linux进入单用户模式(passwd root修改密码)
进入单用户模式——passwd root修改密码 1.在grub 页面输入a,进入修改内核模式 2.在内核的结尾“/”,输入空格,在输入single,回车 3.启动系统,进入单用户模式 4.Passw ...
- linux 添加用户并赋予root权限
1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户#passwd tommy //修改密码Changing pass ...
- 普通用户切换到root用户
普通用户切换到root用户首先按组合键 CTRL+ALT+T 进入终端界面,一般终端界面默认为普通用户权限模式,如何从普通用户进入root用户首先重置root密码输入 sudo passwd root ...
- CentOS7 下使用root免密码输入自动登入gnome桌面
如果系统默认启动图形界面: vi /etc/gdm/custom.conf #找到[daemon],修改为下面的 [daemon] AutomaticLoginEnable=true Automati ...
- linux下 如何切换到root用户
默认安装完成之后并不知道root用户的密码,那么如何应用root权限呢? (1)sudo 命令 xzm@ubuntu:~$ sudo 这样输入当前管理员用户密码就可以得到超级用户的权限.但默认的情况 ...
- 【转】linux下 如何切换到root用户
转自:https://www.cnblogs.com/xinjie10001/p/6295020.html 默认安装完成之后并不知道root用户的密码,那么如何应用root权限呢? (1)sudo 命 ...
- linux centOS服务器部署ssh,免密码登陆linux
登陆centos,切换用户,切换到你要免密码登陆的用户,进入到家目录 2 创建钥匙, [xun@jzlinux ~]$ ssh-keygen -t rsa Generating public/priv ...
- Linux创建用户并赋予Root权限
添加普通用户 [root@server ~]# useradd test //添加一个名为test的用户[root@server ~]# passwd test //修改密码Changing pass ...
随机推荐
- hiho #1309 任务分配
#1309 : 任务分配 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定 N 项任务的起至时间( S1, E1 ), ( S2, E2 ), ..., ( SN, ...
- BZOJ 3827: [Poi2014]Around the world
Sol 并查集. 一个点所能到达的最远是单调不降的.然后将链延长到两倍,预处理出每个点到达的最远点,然后倒着计算深度. 再然后一直跳,跳到>=x+n的点,因为跳到的点都能到最终的点,并且不影响后 ...
- LED notification in Android device
Code can control the LED notification in Android device, using android.app.Notification: 1 2 3 4 5 6 ...
- SNMP常用数据操作
SNMP常用数据操作 snmp编程中常见的数据类型基本上就是integer32/oct_str(字节数组)/counter64/timeticks/dateAndTime这些.很多其它的比如Truth ...
- Linux下VMware虚拟机网卡不能运行在混杂模式解决办法
转自: http://blog.csdn.net/henulwj/article/details/50347489 问题描述 在Linux如果以普通用户运行VMware Workstations,创建 ...
- [k]css盒模型
box-sizing : content-box || border-box || inherit 1.content-box:此值为其默认值.元素的宽度/高度(width/height)等于元素边 ...
- 转: Oracle表空间查询
1.查询数据库中的表空间名称 1)查询所有表空间 select tablespace_name from dba_tablespaces; select tablespace_name from us ...
- Contains Duplicate III
Given an array of integers, find out whether there are two distinct indices i and j in the array suc ...
- spring + myBatis 常见错误:SQL语法错误
在程序运行时,有时候会出现如下错误: 这个错误通常是你的sqlmapper.xml中sql语句语法有错误.所以请仔细查看你sql语句是否正确,比如{#id}这样写就会报上述错误,其实应该#{id}这样 ...
- jquery UI 弹出框
2015-07-17 11:04:38 <div id="reg"></div> <script type="text/javascript ...