Failed to Create the Driver Running User HwHiAiUser Whose UID and GID Are 1000

Symptom

The driver running user HwHiAiUser whose UID and GID are 1000 fails to be created. The command output is as follows:

1
groupadd: GID '1000' already exists

Possible Causes

The UID and GID are occupied.

Solution

  1. Run the following command to view the user who occupies 1000:
    1
    cat /etc/passwd | grep 1000
    

    If the following message is displayed, 1000 is occupied by user st (this user is only an example).

    1
    st:x:1000:1000:st:/home/st:/bin/bash
    
  2. Run the following command to change the GID and UID of the user (the value 1002 is only an example):
    1
    2
    usermod -u 1002 st
    groupmod -g 1002 st
    
    Run the cat /etc/passwd | grep 1000 command. If no command output is displayed, run the cat /etc/passwd | grep 1002 command. If the following message is displayed, the change takes effect:
    1
    st:x:1002:1002:st:/home/st:/bin/bash
    
  3. Run the following commands to create the driver running user HwHiAiUser whose UID and GID are 1000:
    1
    2
    groupadd -g 1000 HwHiAiUser
    useradd -g HwHiAiUser -u 1000 -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash