Add a new user and give privileges to it

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello!

To add a new user on your Toradex system and ensure they have the necessary permissions to execute most commands, you can follow these steps:

  1. Create the New User:

    • Use the command sudo adduser <username> to create a new user.
  2. Assign the User to Necessary Groups:

    • For general command execution, consider adding the user to the following groups:
      • sudo: This allows the user to execute commands with superuser privileges using sudo.
      • dialout: Necessary for serial port access, which might be required for nmcli if it interacts with network hardware.
      • netdev: Often required for network management commands like nmcli.
      • adm: Provides access to system logs, which can be useful for troubleshooting.
  3. Add the User to Groups:

    • Use the command sudo usermod -aG <group1>,<group2>,<group3> <username> to add the user to the necessary groups. For example:
      sudo usermod -aG sudo,dialout,netdev,adm <username>
      
  4. Verify Group Memberships:

    • After adding the user to the groups, verify the memberships with groups <username>.
  5. Test Command Execution:

    • Log in as the new user and test executing commands like nmcli and usermod to ensure they work as expected.

By following these steps, your new user should have the necessary permissions to execute most commands while maintaining a level of security by not using the root account directly. If certain commands still fail, check the specific group requirements for those commands and adjust the group memberships accordingly.

Best regards, Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

SPI access in Torizon.