ubuntut add user and give sudo right

Posted ssozhno-1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntut add user and give sudo right相关的知识,希望对你有一定的参考价值。

# " 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的主要内容,如果未能解决你的问题,请参考以下文章

ISCC:Please give me username and password!

雅思写作大作文Discuss both views and give your own opinion

Ubuntu 添加删除用户 How to Add and Delete Users on Ubuntu 16.04

How to add user account on Linux(Automatically and Manually)

error: pasting “(“ and “1“ does not give a valid preprocessing token

文化丨Modern twists give China's oracle bone script new life