Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

创建用户

创建一个拥有主目录(-m)和默认shell(-s)是/usr/bin/zsh的用户

useradd -m -s /usr/bin/zsh username

useradd -m -s /bin/bash yuanzhiqiu

然后你将为该用户添加一个密码:

passwd username

sudo

需要的话,给sudo:
修改/etc/sudoers文件:在行root ALL=(ALL:ALL) ALL下添加一行

yuanzhiqiu      ALL=(ALL:ALL) ALL

编辑该文件的方法:

visudo

或用vim:编辑好之后:w !sudo tee %,ok退出之后文件是被修改了的

Using vim to force edit a file when you opened without permissions

评论