Preparing Installation and Running Users
- Installation user: user who installs the NPU driver and firmware and CANN package.
- Running user: user who runs services on the NPU driver, firmware, and CANN.
Create installation and running users by referring to Table 1.
Component |
Installation user |
Running user |
|---|---|---|
Drivers and firmware |
root |
|
CANN |
root |
All users can run services. |
Non-root user |
|
The following users are used in the example steps in this document:
- Install the driver and firmware as the root user.
- Install the CANN software as a non-root user HwHiAiUser (default running user of the driver and firmware).
Run the following command to create the HwHiAiUser user and user group:
1 2 | groupadd HwHiAiUser useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash |
To create other users, perform the following steps: Note that if the --install-for-all parameter is not used during driver and firmware installation, the running user of the CANN software package and the running user of the driver and firmware must be in the same user group.
Run the following commands as the root user. Replace <usergroup> and <username> with the actual user names.
- Create a non-root user.
1 2
groupadd <usergroup> useradd -g <usergroup> -d /home/<username> -m <username> -s /bin/bash
- Set the password for the non-root user.
1passwd <username>
- You are not advised adding the CANN running user to the root user group because permission control may cause security risks. Therefore, exercise caution when adding the running user to the root user group.
- After the running user is created, do not disable the login authentication function of the user.
- The password must meet the password complexity requirements. For details, see Password Complexity Requirements. The password validity period is 90 days. You can change the validity period in the /etc/login.defs file or using the chage command. For details, see Setting User Account Validity Period.