Skip to content

SBGrid personal installations

SBGrid personal installations are geared toward individual users

Managing multiple users with SBGrid installations

Permissions are a problem.

Software management account recommended, "sbgrid" user

Manage access with sudo

To create a software management account on Linux and permit users to run the sbgrid-cli command as the sbgrid user using sudo, we recommend creating a file in the /etc/sudoers.d directory with the necessary sudoers configuration. This approach helps keep the main sudoers file clean and organized.

Step 1: Create the Software Management Account

  1. Open a terminal.

  2. Use the adduser command to create a new user account named sbgrid:

    sudo adduser sbgrid
    
  3. Follow the prompts to set a password and provide additional information for the new user.

Step 2: Create a Sudoers Configuration File

  1. Create a new file in the /etc/sudoers.d directory. You can name it sbgrid for clarity:

    sudo touch /etc/sudoers.d/sbgrid
    
  2. Open the file with a text editor:

    sudo nano /etc/sudoers.d/sbgrid
    
  3. Add the following lines to the file to grant specific users (e.g., username) and groups (e.g., groupname) the ability to run the sbgrid-cli command as the sbgrid user:

    username ALL=(sbgrid) NOPASSWD: /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli
    %groupname ALL=(sbgrid) NOPASSWD: /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli
    

    Replace username with the actual username, groupname with the actual group name, and use /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli as the path to the sbgrid-cli command.

  4. Save and close the file.

Step 3: Verify the Sudoers Configuration

  1. Verify the syntax of the sudoers configuration to ensure there are no errors:

    sudo visudo -c
    

    If there are no syntax errors, you should see the message sudoers file /etc/sudoers.d/sbgrid parsed OK.

Step 4: Using Sudo to Run sbgrid-cli as the sbgrid User

  1. Users can now run the sbgrid-cli command as the sbgrid user using the following syntax:

    sudo -u sbgrid /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli
    

By following these steps, you can create a software management account on Linux and manage access to that account using a file in the /etc/sudoers.d directory. This approach ensures that users are restricted to only running the sbgrid-cli command as sbgrid using sudo. In this way, multiple users can update and remove software with locking and without permission errors.