新聞中心
deepin是由武漢深之度科技有限公司在Debian基礎(chǔ)上開(kāi)發(fā)的Linux操作系統(tǒng),其前身是Hiweed Linux操作系統(tǒng),于2004年2月28日開(kāi)始對(duì)外發(fā)行,可以安裝在個(gè)人計(jì)算機(jī)和服務(wù)器中,下面為大家分享一下deepin系統(tǒng)創(chuàng)建Sudo用戶(hù)具體方法。

十年的普蘭店網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開(kāi)發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。營(yíng)銷(xiāo)型網(wǎng)站建設(shè)的優(yōu)勢(shì)是能夠根據(jù)用戶(hù)設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整普蘭店建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。成都創(chuàng)新互聯(lián)公司從事“普蘭店網(wǎng)站設(shè)計(jì)”,“普蘭店網(wǎng)站推廣”以來(lái),每個(gè)客戶(hù)項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。
環(huán)境
Deepin 15.11
創(chuàng)建一個(gè)新用戶(hù)
使用adduser創(chuàng)建一個(gè)用戶(hù),用戶(hù)名為user01
bob@bob-PC:~$ sudo adduser user01
Adding user `user01' ... Adding new group `user01' (1001) ...
Adding new user `user01' (1001) with group `user01' ...
Creating home directory `/home/user01' ... Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for user01
Enter the new value, or press ENTER for the default
Full Name []: user01
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
如何在Deepin 15.11中創(chuàng)建Sudo用戶(hù)如何在Deepin 15.11中創(chuàng)建Sudo用戶(hù)
添加user01這個(gè)用戶(hù)到sudo組里面
sudo組的所有成員都在Deepin系統(tǒng)上授予sudo和root訪(fǎng)問(wèn)權(quán)限。因此,要將剛剛創(chuàng)建的user01用戶(hù)添加到sudo組,請(qǐng)運(yùn)行以下命令:
bob@bob-PC:~$ sudo adduser user01 sudo
Adding user `user01' to group `sudo' ...
Adding user user01 to group sudo
Done.
使用id命令查看一下用戶(hù)是否添加到sudo組了
bob@bob-PC:~$ id user01
uid=1001(user01) gid=1001(user01) groups=1001(user01),27(sudo)
測(cè)試sudo用戶(hù)賬號(hào)
現(xiàn)在user01用戶(hù)使用ssh登錄到本機(jī)測(cè)試
bob@bob-PC:~$ ssh user01@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established. ECDSA key fingerprint is SHA256:TKkqZwt9OzPaVSwSkFoLXtAFwnU4aKMG7T8QyF2fPKw. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. user01@localhost's password:
Welcome to Deepin 15.11 GNU/Linux
* Homepage:https://www.deepin.org/
* Bugreport:https://feedback.deepin.org/feedback/
* Community:https://bbs.deepin.org/
user01@bob-PC:~$
檢驗(yàn)一下sudo是否好用:
user01@bob-PC:~$ ls -l /root
ls: cannot open directory '/root': Permission denied
user01@bob-PC:~$ sudo ls -l /root
[sudo] password for user01:
total 4
drwxr-xr-x 2 root root 4096 Mar 6 18:05 模板
如何在Deepin 15.11中創(chuàng)建Sudo用戶(hù)如何在Deepin 15.11中創(chuàng)建Sudo用戶(hù)
如何使用sudo執(zhí)行命令
使用例子:
sudo [option] command
sudo -i
sudo -s
sudo systemctl restart networking
sudo tail -f /var/log/boot.log
如何從sudo組里刪掉指定的用戶(hù)
user01@bob-PC:~$ sudo deluser user01 sudo
Removing user `user01' from group `sudo' ...
Done.
# 查看一下用戶(hù)是否不在sudo組里面了
user01@bob-PC:~$ id user01
uid=1001(user01) gid=1001(user01) groups=1001(user01)
如何刪除一個(gè)用戶(hù):
bob@bob-PC:~$ sudo deluser --remove-home user01
Looking for files to backup/remove ...
Removing files ...
Removing user `user01' ... Warning: group `user01' has no more members.
Done.
總結(jié)
sudo命令允許我們以系統(tǒng)管理員運(yùn)行任何命令或選定的命令。
網(wǎng)站名稱(chēng):deepin系統(tǒng)創(chuàng)建Sudo用戶(hù)具體方法
分享路徑:http://www.fisionsoft.com.cn/article/djdedid.html


咨詢(xún)
建站咨詢(xún)
