Linux Ubuntu新增使用者

2021-08-22 13:39:49 字數 678 閱讀 1553

開啟終端,輸入:sudo adduser username,系統會提示以下資訊:

正在新增使用者「username」...

正在新增新組「username」(1001)...

正在新增新使用者「username」(1001)到組「username」...

建立主目錄「/home/username」...

輸入新的 unix 口令:(新使用者密碼)

重新輸入新的 unix 口令:

passwd:已成功更新密碼

changing the user information for username

enter the new value, or press enter for the default

full name : yangyang (輸入新使用者的名稱)

room number :

work phone :

home phone :

other :

這個資訊是否正確? [y/n] y     

為此使用者有root許可權,執行命令:

root@ubuntu:~# sudo vim /etc/sudoers

修改檔案如下:

root all=(all) all

wang all=(all) all

儲存退出,wang使用者就擁有了root許可權。

linux(ubuntu)新增使用者

ubuntu和windows一樣,可以任意建立或者刪除新的使用者,windows下比較簡單,ubuntu下需要使用命令,不過操作起來不是很繁瑣,所以我盡量寫的詳細一些。如何建立ubuntu新使用者?首先開啟終端,輸入 sudo adduser username,系統會提示以下資訊 正在新增使用者 u...

linux ubuntu 為使用者增加sudo許可權

方法 一 使用usermod命令 新增user sudo adduser username 增加sudo許可權 sudo usermod ag sudo username 方法二 修改 etc sudoers檔案 修改檔案前先開通root 具體方法是 ubuntu技巧之 is not in the ...

Linux Ubuntu 切換使用者root

aimmon aimmon machine sudo i root aimmon machine exit 登出aimmon aimmon machine sudo su root aimmon machine home aimmon exit exit aimmon aimmon machine ...