首頁 運維 CentOS centos怎麼賦予普通用戶root權限

centos怎麼賦予普通用戶root權限

May 19, 2020 pm 03:16 PM
centos root

centos怎麼賦予普通用戶root權限

賦予一般用戶root權限的方法:

1、新增用戶,先用adduser指令新增一個普通用戶,指令如下:

#adduser tommy      //添加一个名为tommy的用户
#passwd tommy       //修改密码
Changing password for user tommy.
New UNIX password:                //在这里输入新密码
Retype new UNIX password:         //再次输入新密码
passwd: all authentication tokens updated successfully.
登入後複製

2、修改/etc/sudoers 文件,找到root用戶這一行,在root下面添加一行,如下所示:

## Allow root to run any commands anywhere
root    ALL=(ALL)     ALL
tommy   ALL=(ALL)     ALL
登入後複製

修改完畢,現在可以用tommy帳號登錄,然後用指令sudo su - ,即可取得root權限進行操作了。

推薦教學:centos教學

以上是centos怎麼賦予普通用戶root權限的詳細內容。更多資訊請關注PHP中文網其他相關文章!

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

以超級使用者登入Ubuntu 以超級使用者登入Ubuntu Mar 20, 2024 am 10:55 AM

以超級使用者登入Ubuntu

centos怎麼中文輸入 centos怎麼中文輸入 Apr 07, 2024 pm 08:21 PM

centos怎麼中文輸入

centos7怎麼讀取u盤文件 centos7怎麼讀取u盤文件 Apr 07, 2024 pm 08:18 PM

centos7怎麼讀取u盤文件

centos7如何進入root權限 centos7如何進入root權限 Apr 02, 2024 pm 08:57 PM

centos7如何進入root權限

centos忘記密碼登入怎麼辦 centos忘記密碼登入怎麼辦 Apr 07, 2024 pm 07:33 PM

centos忘記密碼登入怎麼辦

SCP使用技巧-遞歸排除文件 SCP使用技巧-遞歸排除文件 Apr 22, 2024 am 09:04 AM

SCP使用技巧-遞歸排除文件

centos用戶名密碼忘了怎麼辦 centos用戶名密碼忘了怎麼辦 Apr 02, 2024 pm 08:54 PM

centos用戶名密碼忘了怎麼辦

centos7怎麼開啟root權限 centos7怎麼開啟root權限 Apr 07, 2024 pm 08:03 PM

centos7怎麼開啟root權限

See all articles