- Symptom:When you install ZStack, you use root for login. However, when you start the service, the system reports that you are not a root user and
sudois required.ERROR: please use sudo or root user FAIL Reason: failed to start zstackWhen you run the following command in a Python CLI environment, you find that Python determined that you are not a root user.import getpass user = getpass.getuser() print user - Cause:
When you switch from a regular user to a root user, you used
suinstead ofsudo su. In this case, only the root user is switched but relevant environment variables are not switched. - Description:
- The
sudocommand can be used by the current user with the root super permission. - The
sucommand can be used to switch to a root user. However, the relevant environment variables are not switched to the root directory. - The
sudo sucommand is used to switch to a root user with the root permission.
- The
I installed ZStack as a root user. However, when I start the service, the system reports that I am not a root user. Why? Print
Created by: ZStack Support
Modified on: Fri, 25 Mar, 2022 at 3:44 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.