Problems that novice may encounter when adding users and deleting users in Linux

Source: Internet
Author: User

problems that novice may encounter when adding users and deleting users in Linux
1. switch to a new user after creating a new User: No directory, logging in with home=/
Add User    #sudo  useradd-m-s/bin/bash-g Group LoginName  -M Create HOME directory (without this to manually add the directory, otherwise there will be no directory,logging in with home=/)-s/bin/bash using Bash (default is/bin/sh Use default does not appear in front of the $ character [email protected])- G Groupthen 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 of the solutions available online are as follows:
$mv/var/run/utmp/var/run/utmp_
$touch >/var/run/utmp
about:/var/run/utmp
Utmp is a file, in addition to the UTMP program you can not edit this file, delete his words, the current login information will be lost.
This file will be recreated every time the machine reboot up.
    
    but I have experimented or not, still get the same hint   
    then brute-Force delete the user:
   $  userdel-r-F XXXX   
    hint: Userdel:warning:can ' t remove/var/mail/git:no such file or directory BR style= "padding:0px; margin:0px; Color:rgb (51,51,51); Font-family: Song body; line-height:25px ">    Userdel:git home Directory (/home/git) not found
but it doesn't matter. The user was actually deleted successfully.
    As shown in the following:
       
    


Problems that novice may encounter when adding users and deleting users in Linux

Related Article

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.