For users who want to deploy the Community Edition of OCP using the graphical interface, they must have the privileges to run sudo commands without using a password.
You can follow the steps below to manually create a user (using admin as an example) and grant sudo privileges to the user:
Run the following command to create the admin user:
useradd -U admin -d /home/admin -s /bin/bash mkdir -p /home/admin sudo chown -R admin:admin /home/adminRun the following command to set a password for admin:
passwd adminGrant sudo privileges to the user.
Run the following command to open the
sudoersfile in the/etc/directory. Add the following content to the end of the file:## Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL admin ALL=(ALL) NOPASSWD: ALLRun the following command in the
/homedirectory to check the directory privileges:ls -ld /data ls -ld /home/adminThe command output should be like this:
drwxr-xr-x 2 admin admin 4096 Feb 9 18:43 drwxr-xr-x 2 admin admin 4096 Feb 9 18:43 /data drwxr-xr-x 2 admin admin 4096 Feb 9 18:43 /home/adminIf the admin user does not have the privileges, run the following command as the root user:
chown -R admin:admin /data chown -R admin:admin /home/adminHere,
/dataand/home/adminare sample mount directories. Replace the actual mount directories in this section.