SingleStore DB

ISSUE: Getting prompted for user’s sudo password

The SingleStore Tools may show the following prompt when asking for the management user’s sudo password:

The target user alice on host host-01.example.net does not have the privileges to perform this action.
Please enter your password to proceed with sudo.  (For details, see https://docs.singlestore.com/toolbox-redir/sudo-prompt).
sudo password for alice@host-01.example.net:

The prompt appears when the management user (alice in this example) does not have sufficient privileges to perform the action requested on the host (host-01.example.net in this case). To try performing the action using sudo, enter alice’s sudo password at the prompt.

The following are some specific cases where this may apply:

  • sdb-deploy install requires root privileges to perform package management.

  • sdb-admin create-node requires write access to the node install directory.

  • sdb-admin list-nodes requires read access to the memsqlctl state file.

How to get rid of the prompt

If your management user should be allowed to create, delete, start, stop, or modify nodes, add the management user to the memsql group on all hosts. For the example above, run the following command on host-01.example.net:

usermod -a -G memsql alice

Alternatively, re-register the host with a different management user that has the proper permissions. In this example, assume bob is a user with the correct privileges:

sdb-toolbox-config unregister-host --host host-01.example.net
****
Toolbox will perform the following actions:
  · Unregister host host-01.example.net

Would you like to continue? [y/N]: y
✓ Successfully unregistered 1 host
Operation completed successfully
sdb-toolbox-config register-host --host host-01.example.net --ssh bob@host-01.example.net
****
Toolbox is about to register the following host:
  · Host: host-01.example.net
  · Localhost: false

Would you like to continue? [y/N]: y
+---------------------+------------+-------------------------+---------------+
|   Host              | Local Host | SSH address             | Identity File |
+---------------------+------------+-------------------------+---------------+
| host-01.example.net | No         | bob@host-01.example.net |               |
+---------------------+------------+-------------------------+---------------+

Notice

If the host machine does not have sudo installed, use the instructions above to re-register the host with a different management user. If no user has the correct privileges, connect to the host and perform the action manually.