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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:dpi:dpi_components:dpiui:user_guide:admin_section:equipment_management:sudo_user:start [2023/10/13 09:36] elena.krasnobryzhen:dpi:dpi_components:dpiui:user_guide:admin_section:equipment_management:sudo_user:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Sudo user ====== 
-{{indexmenu_n>1}} 
-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). 
  
-<note tip>Watch the video tutorial on connecting to DPI: {{youtube>81WMPGw6tak?}}</note> 
- 
-On the connected equipment, you need to create a sudo user. 
- 
-Using the dpisu user as an example: 
- 
-  - Create user dpisu <code bash>adduser dpisu 
-passwd dpisu</code> 
-  - Write the following to the file /etc/sudoers.d/dpisu <code bash>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</code>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. 
-  - Disable requiretty in the file /etc/sudoers <code bash> sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers</code>