Urtech.id

Learning By Doing

Recommendation

Create new user in MySQL and give it access to database

This article describes how to do common MySQL database administration tasks from the command line using the mysql program. Try this to create new user in MySQL and give it a...

Tito Santana

How to Configure DNS Server in VPS CentOS 7

This detailed tutorial will help you to set up a local DNS server on your CentOS 7 system Install bind package :yum install bind bind-utils -y Backup and open configuration ...

Tito Santana

Configure Different User Per Virtual Host on Nginx

For security reasons, you shouldn’t run all your NGINX virtual hosts with the same user. If you run all your websites with the same user ( www-data or nginx ), a PHP call...

Tito Santana

How to create users and groups in CentOS 7

Adding and removing users is one of the most basic tasks that you should know how to do Create a new user: adduser username replace username with the user that you want to create. Give your user a password so that they can log in: passwd username You will be prompted to type in the password twice to confirm it. Now your new user is set up and ready for use! You can now log in as that user, using the password that you set up.  Create a new group: groupadd groupname  List users in gr...

Tito Santana

Create new user in MySQL and give it access to database

This article describes how to do common MySQL database administration tasks from the command line using the mysql program. Try this to create new user in MySQL and give it access to database: CREATE USER 'username'@'hostname'; set password for 'username'@'localhost' = PASSWORD('password');  Try this to give it access to the database dbname : GRANT ALL PRIVILEGES ON dbname.* To 'username'@'hostname' IDENTIFIED BY 'password'; or with grant option :GRANT SELECT, INSERT, UPDATE, DELETE,...

Tito Santana

How to Configure DNS Server in VPS CentOS 7

This detailed tutorial will help you to set up a local DNS server on your CentOS 7 system Install bind package :yum install bind bind-utils -y Backup and open configuration file : cp /etc/named.conf /etc/named.conf.backup nano /etc/named.conf Add the lines : listen-on port 53 { 127.0.0.1; 103.129.221.94; }; allow-query { localhost; 103.129.221.94; any; }; allow-query-cache { localhost; 103.129.221.94; any; }; the result like image below : Still in the same file, add the lines...

Tito Santana

Configure Different User Per Virtual Host on Nginx

For security reasons, you shouldn’t run all your NGINX virtual hosts with the same user. If you run all your websites with the same user ( www-data or nginx ), a PHP call to " system() / passthru() / exec() " will have access to all websites! Nginx will not protect you against this. PHP is just an example, but any popular web-server language has similar calls. As a hacker, you can “ls ..” to navigate through all websites and “cp / echo / mv ” to write your own code in any fi...

Tito Santana