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

Secret-free execution method of root commands for mysql users

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Description: the execution process of the sudo command is: the current user is converted to root, and then executes the command as root. After the execution is completed, it is directly returned to the current user. It should be noted that the password entered when executing sudo is the password of the current user. Not root password 1, modify file write permission # ls-l / etc/sudoers-r--r- 1 root root 4042 Nov 4 15:05 / etc/sudoers# chmod uplix / etc/sudoers# vi / etc/sudoers# ls-l / etc/sudoers2, add secret-free user vi / etc/sudoers## Allow root to run any commands anywhereroot ALL= (ALL) ALL## add mysql user mysql ALL= (ALL) NOPASSWD: ALL3, Sudo Secret Free Test [mysql@devdb01 ~] $sudo ip addr1: lo: mtu 65536 qdisc noqueue state UNKNOWN link/loopback 0012 scope host valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:87:3b:bd brd ff:ff : ff:ff:ff:ff inet 1x2.55.3.xx/24 brd 196.55.3.255 scope global eth0 inet6 fe80::250:56ff:fe87:3bbd/64 scope link valid_lft forever preferred_lft forever [mysql@devdb01 ~] $

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

Servers

Wechat

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

12
Report