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

相关推荐
赖small强10 分钟前
【Linux驱动开发】NOR Flash 技术原理与 Linux 系统应用全解析
linux·驱动开发·nor flash·芯片内执行
风掣长空37 分钟前
Google Test (gtest) 新手完全指南:从入门到精通
运维·服务器·网络
luback1 小时前
前端对Docker简单了解
运维·docker·容器
0思必得01 小时前
[Web自动化] 开发者工具应用(Application)面板
运维·前端·python·自动化·web自动化·开发者工具
IT运维爱好者1 小时前
【Linux】LVM理论介绍、实战操作
linux·磁盘扩容·lvm
LEEE@FPGA1 小时前
ZYNQ MPSOC linux hello world
linux·运维·服务器
郝学胜-神的一滴1 小时前
Linux定时器编程:深入理解setitimer函数
linux·服务器·开发语言·c++·程序人生
冉佳驹1 小时前
Linux ——— 系统中的用户身份切换、文件权限管理、特殊权限和粘滞位设置
linux·chmod·chown·粘滞位·su 命令·chgrp·umask
Tranquil_ovo2 小时前
【Linux】Makefile 基础
linux
漏洞文库-Web安全2 小时前
Linux逆向学习记录
linux·运维·学习·安全·web安全·网络安全·逆向