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 "你的邮箱地址"

相关推荐
LH_R26 分钟前
OneTerm开源堡垒机实战(三):功能扩展与效率提升
运维·后端·安全
dessler1 小时前
Hadoop HDFS-高可用集群部署
linux·运维·hdfs
泽泽爱旅行1 小时前
awk 语法解析-前端学习
linux·前端
少妇的美梦19 小时前
logstash教程
运维
chen94519 小时前
k8s集群部署vector日志采集器
运维
chen94520 小时前
aws ec2部署harbor,使用s3存储
运维
轻松Ai享生活1 天前
5 节课深入学习Linux Cgroups
linux
christine-rr1 天前
linux常用命令(4)——压缩命令
linux·服务器·redis
三坛海会大神5551 天前
LVS与Keepalived详解(二)LVS负载均衡实现实操
linux·负载均衡·lvs
東雪蓮☆1 天前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs