linux创建sudo用户_Linux终极指南-创建Sudo用户
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)
使用adduser或useradd添加新用戶 (Use adduser or useradd to add a new user)
sudo adduser usernameBe 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 usernameA 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 usernameThat's all you need to know about creating a new sudo user in Linux. And remember, "With great power comes great responsibility."
這就是在Linux中創建新的sudo用戶所需的全部知識。 記住,“能力越強,責任就越大”。
翻譯自: https://www.freecodecamp.org/news/the-ultimate-guide-to-linux-creating-a-sudo-user/
linux創建sudo用戶
總結
以上是生活随笔為你收集整理的linux创建sudo用户_Linux终极指南-创建Sudo用户的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到抓鳝鱼被咬住是什么意思
- 下一篇: linux bash命令_Ultimat