Sudo user [Документация VAS Experts]

Sudo user

The connection and control of the equipment is carried out via the SSH protocol. The connection must be made under a user with sudo privileges, or under the root user (not recommended).

Watch the video tutorial on connecting to DPI:

On the connected equipment, you need to create a sudo user.

Using the dpisu user as an example:

  1. Create user dpisu
    adduser dpisu
    passwd dpisu
  2. Write the following to the file /etc/sudoers.d/dpisu
    Defaults:dpisu !requiretty
    Defaults secure_path = /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    dpisu ALL=(ALL) NOPASSWD: ALL

    Pay attention to the contents of the config and the dpisu login, which occurs 2 times. If you are setting up a user with a different login, specify the login in the config instead of dpisu. With this config, you disable the requirement to ask for a password and the requiretty requirement when switching to sudo mode.

  3. Disable requiretty in the file /etc/sudoers
     sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers