Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu UserAdd #104

Open
junxnone opened this issue Dec 1, 2018 · 0 comments
Open

Ubuntu UserAdd #104

junxnone opened this issue Dec 1, 2018 · 0 comments

Comments

@junxnone
Copy link
Owner

junxnone commented Dec 1, 2018

添加用户

UseCase

Usecase cmd
Create new user with home folder sudo useradd -r -m -s /bin/bash gpu
-m 创建用户目录在 /home/gpu
指定目录为用户名主目录 usermod -d /home/xx/gpu gpu
添加用户到某个group sudo usermod -aG guestgroup username

为用户添加 root 权限

方法一 修改 /etc/sudoers 文件

chmod +w /etc/sudoers 
vi /etc/sudoers 
  • 添加如下内容:
gpu ALL=(ALL:ALL) ALL

方法二 把用户添加到 sudo Group

sudo usermod -a -G sudo newuser
  • 为用户 newuser 移除 sudo 权限
sudo deluser newuser sudo

Issues

  • .bashrc
    • 从其他用户 copy .bashrc/.profile 到 当前用户,重新登录即可

Reference

@junxnone junxnone closed this as completed Dec 3, 2018
@junxnone junxnone transferred this issue from junxnone/tio Jul 17, 2019
@junxnone junxnone reopened this Jul 17, 2019
@junxnone junxnone transferred this issue from junxnone/wiki Jul 24, 2019
@junxnone junxnone changed the title Ubuntu Create New User 创建新用户 Ubuntu users create and setup Sep 22, 2021
@junxnone junxnone transferred this issue from junxnone/Linux_archive Sep 22, 2021
@junxnone junxnone changed the title Ubuntu users create and setup Ubuntu UserAdd Dec 22, 2022
@junxnone junxnone transferred this issue from junxnone/techwiki Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant