码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntut add user and give sudo right

时间:2019-07-12 18:57:37      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:article   passwd   shel   ubuntu   detail   bash   because   sudoers   replace   

# " ssozh"  should be replace with you username

1.add user

su root

adduser -m ssozh

passwd ssozh

 

2.give sudo right

change file chmod:   chmod u+w /etc/sudoers

find "root ALL=(ALL) ALL".and add:  ssozh ALL=(ALL) ALL

change file chmod: chmod u-w /etc/sudoers

 

3.change shell for new user(Why you cannot use tab)

you will find /etc/passwd ssozh :

ssozh:X:1000:1000::/home/leroy:/bin/sh

change it:

ssozh:X:1000:1000::/home/leroy:/bin/bash

 

4.why use English? because this ubuntu dont install Chinese pinyin.....

 

cite:https://blog.csdn.net/leroy008/article/details/18706213

  https://www.jianshu.com/p/3d435e09712a

 

ubuntut add user and give sudo right

标签:article   passwd   shel   ubuntu   detail   bash   because   sudoers   replace   

原文地址:https://www.cnblogs.com/SsoZhNO-1/p/11177633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!