博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux创建sudo用户_Linux终极指南-创建Sudo用户
阅读量:2518 次
发布时间:2019-05-11

本文共 1898 字,大约阅读时间需要 6 分钟。

linux创建sudo用户

sudo stands for either "superuser do" or "switch user do", and sudo users can execute commands with root/administrative permissions, even malicious ones. Be careful who you grant sudo permissions to – you are quite literally handing them the key your house.

sudo代表“超级用户”或“切换用户”,并且sudo用户可以执行具有root /管理权限的命令,甚至是恶意的。 请小心,向谁授予sudo权限-实际上是在将密钥交给您的房子。

Before creating a new sudo user, you must first create a new user.

在创建新的sudo用户之前,您必须首先创建一个新用户。

如何创建新用户 (How to Create a New User)

使用adduseruseradd添加新用户 (Use adduser or useradd to add a new user)

sudo adduser username

Be sure to replace username with the user that you want to create. Also, note that to create a new user, you must also be a sudo user yourself.

确保将username替换为您要创建的用户。 另外,请注意,要创建新用户,您自己还必须是sudo用户。

使用passwd更新新用户的密码 (Use passwd to update the new user's password)

sudo passwd username

A strong password is highly recommended!

强烈建议您使用强密码!

授予新用户Sudo权限 (Give the New User Sudo Permissions)

After creating a new user, add them to the appropriate group using the usermod command.

创建新用户后,使用usermod命令将其添加到适当的组。

在Debian系统(Ubuntu / Linux Mint / ElementryOS)上,将用户添加到sudo(On Debian systems (Ubuntu / Linux Mint / ElementryOS), add users to the sudo group)

sudo usermod -aG sudo username

在基于RHEL的系统(Fedora / CentOS)上,将用户添加到wheel(On RHEL based systems (Fedora / CentOS), add users to the wheel group)

sudo usermod -aG wheel username

如何删除用户 (How to Delete a User)

To delete a user, use the following commands.

要删除用户,请使用以下命令。

基于Debian的系统(Ubuntu / Linux Mint / ElementryOS) (Debian based systems (Ubuntu / Linux Mint / ElementryOS))

sudo deluser username

基于RHEL的系统(Fedora / CentOS) (RHEL based systems (Fedora / CentOS))

sudo userdel username

That's all you need to know about creating a new sudo user in Linux. And remember, "With great power comes great responsibility."

这就是在Linux中创建新的sudo用户所需的全部知识。 记住,“能力越强,责任就越大”。

翻译自:

linux创建sudo用户

转载地址:http://gqrwd.baihongyu.com/

你可能感兴趣的文章
Delphi消息小记
查看>>
JVM介绍
查看>>
将PHP数组输出为HTML表格
查看>>
经典排序算法回顾:选择排序,快速排序
查看>>
BZOJ2213 [Poi2011]Difference 【乱搞】
查看>>
一道关于员工与部门查询的SQL笔试题
查看>>
Canvas基础
查看>>
[Hive - LanguageManual] Alter Table/Partition/Column
查看>>
可持久化数组
查看>>
去除IDEA报黄色/灰色的重复代码的下划波浪线
查看>>
Linux发送qq、网易邮件服务配置
查看>>
几道面试题
查看>>
【转】使用 WebGL 进行 3D 开发,第 1 部分: WebGL 简介
查看>>
js用正则表达式控制价格输入
查看>>
chromium浏览器开发系列第三篇:chromium源码目录结构
查看>>
java开发操作系统内核:由实模式进入保护模式之32位寻址
查看>>
第五讲:单例模式
查看>>
Python编程语言的起源
查看>>
Azure ARMTemplate模板,VM扩展命令
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>