Problems that new users may encounter when adding or deleting users in Linux

Source: Internet
Author: User

Problems that new users may encounter when adding or deleting users in Linux
Problems that new users may encounter when adding or deleting users in Linux

1. After creating a new user, switch to the new user: No directory, logging in with HOME =/
Add User # sudo useradd-m-s/bin/bash-g group loginname-m to create the home directory (if this is not added, manually add the directory, otherwise No directory appears, logging in with HOME =/)-s/bin/bash use bash (the default value is/bin/sh. By default, loginname @ ubuntu is not displayed before $) -g group and then use passwd to change the User Password
2. When deleting a user: userdel: user hbase is currently logged in
Or: userdel: user test is currently used by process 2417 userdel: cannot open/etc/subuid many solutions on the Internet are as follows: $ mv/var/run/utmp _ $ touch>/var/run/utmp about:/var/run/utmp is a file, except for the utmp program, you cannot edit this file. If you delete it, the current login information will be lost. This file will be re-created every time the machine is reboot.
However, I still cannot try it myself. If I still get the same prompt, delete the user by force:
$ Userdel-r-f XXXX prompt: userdel: warning: can't remove/var/mail/git: No such file or directory userdel: git home directory (/home/git) not found, but it doesn't matter. The user has been deleted successfully.
As shown in:
    
    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.