CentOS | 添加普通用户并授权sudo

bash 复制代码
sudo -i
adduser peter
passwd peter
whereis sudoers
nano /etc/sudoers

添加一行新用户到root组
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
peter   ALL=(ALL)       ALL


如果提升权限后无法cd到其他目录等,修改 /etc/passwd 文件,找到如下行,把用户ID修改为 0 ,如下所示: 
peter:x:500:500:peter:/home/lcy:/bin/bash
修改后如下
peter:x:0:500:peter:/home/lcy:/bin/bash

centos赋予普通用户超级管理员权限

centos赋予普通用户超级管理员权限_centos管理员权限-CSDN博客Linux的普通用户赋予root权限_centos管理员权限https://blog.csdn.net/qq_23689053/article/details/89362022

https://blog.csdn.net/qq_41980405/article/details/105291959https://blog.csdn.net/qq_41980405/article/details/105291959

Windows免密码登录Linux

https://blog.csdn.net/qq285744011/article/details/118293937

ssh-keygen -t rsa -C "你的邮箱地址"

相关推荐
weixin_5160230711 分钟前
linux下fcitx5拼音的安装
linux·运维·服务器
hunter14501 小时前
Linux 进程与计划任务
linux·运维·服务器
楼田莉子1 小时前
Linux学习之磁盘与Ext系列文件
linux·运维·服务器·c语言·学习
陌上花开缓缓归以1 小时前
linux 怎么模拟系统panic重启
linux·运维·服务器
KL's pig/猪头/爱心/猪头2 小时前
写一个rv1106的led驱动3-功能函数编写
linux·驱动开发·rv1106
月白风清江有声2 小时前
vscode使用git
linux·运维·服务器
zl_dfq2 小时前
Linux 之 【文件】(ext2文件系统、目录、软硬链接)
linux
物理与数学2 小时前
Linux 内核 LRU 页面置换算法
linux·linux内核
小白同学_C4 小时前
Lab1-Xv6 and Unix utilities 配置环境的搭建以及前言 && MIT6.1810操作系统工程【持续更新】
linux·c/c++·操作系统os
haluhalu.4 小时前
深入理解Linux线程机制:线程概念,内存管理
java·linux·运维