Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A brief introduction to the usage of sudo

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Visodu is used to edit sudo, such as vi. It comes with error checking. It must be capitalized. The change will take effect at that time.

Sudo-l look at the commands that can be executed by the current user-b execute commands in the background. Note that the password verified by sudo is the password of the current user.

To enter a password in sudo format:

User or% group or user category name loggable host = (transformable identity) executable command 1, executable command 2

Password-free sudo format:

User or% group or user category name loggable host = (changeable identity) NOPASSWD: executable command 1, executable command 2

Example:

Location 1, position 2, position 3, position 4.

Root ALL= (ALL) ALL

% wheel ALL= (ALL) NOPASSWD: ALL

Position 3 is used to write changeable identities, such as root

Host_Alias SERVER=no1,no2192.168.1.0/24 defines the host or network segment that can be logged in, and it is written in location 2. It is basically useless and generally uses ALL.

User_Alias ADMINS=liming,gem defines a user class alias, written in location 1

Cmnd_Alias SHUTDOWN=/usr/sbin/halt,/usr/sbin/shutdown defines the category name of the command, if you want to prohibit the execution of the command, add it before! To write the absolute path, write in position 4

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report