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

Use root user operation method to crack root authority

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces how to crack root permissions using root user operation methods, the things involved, learned from the theoretical knowledge, there are many books, literature for your reference, in terms of practical significance, accumulated years of practical experience can be shared with you.

Crack root permissions:

1) sudo passwd root / / set the password of the root user

2) under the / etc/ssh/sshd_config file

Change PermitRootLogin without-password to permitRootLogin yes / / this allows root users to log in

3) restart the system

After the above steps, we can log in as root users. After logging in again, we can see that we are root users.

We can use the su command to go back to the user we created

Let's install mysql.

Sudo apt install mysql-server

And then we come here and ask if we want to continue with the installation. We've installed ssh before, and we all know that we can just type Y here.

Then we are asked to enter the password of root, and then enter the confirmation again.

Note: the root password here is the root user of mysql, not the root user password we set earlier. Here, we suggest that we enter the password instead of pressing OK directly, otherwise mysql will generate the password randomly. At that time, we have to go to the configuration file to find it, which is troublesome.

After the installation, we use systemctl status mysql.service to confirm that the service is running

After the installation is completed, in order to ensure that our ufw firewall is not turned on, we do not need a firewall at this stage. Ubuntu16.04 's ufw is turned off by default, but let's execute it.

Sudo ufw disable / / turn off the firewall

After the installation is complete, we can use mysql-uroot-p123456

-u followed by the user

-p is followed by a password

Of course,-p can also be followed without a password, and then we will be prompted for input. If you answer the password, please do not leave it blank.

After logging in, we can log out using exit

Under mysql, we can use the

SHOW VARIABLES LIKE'% char%'; / / View character set encodings

SHOW VARIABLES LIKE'% colla%'; / / View proofreading collation

These can be modified in the configuration file.

Add under / etc/mysql/my.cnf

[client]

Default-character-set = utf8

[mysqld]

Character-set-server = utf8

Collation-server = utf8_general_ci

Restart the mysql service systemctl restart mysql.service

Go back in and see if there's any difference.

Set the default character set encoding, which can be done or not. Set up when we create the table, we do not have to add the default character set coding, because in China, our coding will default to utf8, of course, there are other needs can be re-set.

Most of the time, our database will be connected by clients of other machines, so we need to change the listening address.

Sudo netstat-anptu | grep mysql

You can see the listening address. The default is 127.0.0.1, which is local, and 3306 is the port used by mysql by default.

We can change the default listening address by adding bind-address to the configuration file. Here, 0.0.0.0 is used to facilitate the connection. Of course, if it is in the business ring mirror, it will not be set in this way.

Then we can use sudo netstat-anptu | grep mysql to see that the listening address has changed.

Read the above introduction to crack the root authority to use root user operation method, hope to bring some help to everyone in the practical application. Due to the limited space in this article, there will inevitably be deficiencies and areas that need to be supplemented. You can continue to pay attention to the industry information section and will update your industry news and knowledge regularly. If you need more professional answers, you can contact us on the official website for 24-hour pre-sales and after-sales to help you answer questions at any time.

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

Database

Wechat

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

12
Report