Linux : How to Disable Direct Root Logins

Allowing the root user to login directly is a major security issue, we’ll show you how to disable it so you can still login as root but just not directly, reducing the security issue.

This will force a hacker to have to guess 2 seperate passwords to gain root access.
(you do have 2 seperate passwords for [...]

Linux :How to encrypt text file in Linux (VIM)

How to encrypt text file in Linux (VIM)

It is very easy to encrypt a text file in Linux, VIM text editor can be used to achieve it.. vim -x [file name]

[kartook@Nilas ~]$ vim -x kartook.txt

This will prompt us to enter encryption key (password)

Enter encryption key : ******
Enter same key again: ******

After that, key [...]

FreeBSD : Data set and change

Display the date:

Simply type the date command to display the current date:

# date

Output:

Fri Mar  12 12:44:29 CST 2010

To set/change date:

To set the date, you need to simply use the date command followed by the year, month, day, hour, minute, and second … all numeric and no spaces.

To set the date with date command, you need [...]

Mysql : Connect to a remote mysql Server

At a shell or command (cmd for windows) prompt you type all one 1 single line:

mysql -u DB_USER_NAME -p[PASSWORD] DB_NAME -h DB_SERVER

with the following replacements of the terms above:

* Replace DB_SERVER with the correct database servername or IP address

* Replace DB_USER_NAME with your mysql username.

* Replace DB_NAME with your mysql databasename.

* [PASSWORD] [...]

MySql : how to create database user on mysql databbase?

to create new user on mysql database we can use below script;

DB_NAME = KartookShop
DB_USER = Kartook
DB_PASSWORD = password
HOST=localhost

we want to give SELECT,INSERT,UPDATE,DELETE,CREATE,DROP permission on Kartook.

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON KartookShop.* TO ‘Kartook’@’localhost’ IDENTIFIED BY ‘password’;

this will allow Kartook to connect to KartookShop database from localhost. If you want to give permission [...]

MySql : How to Create a new database on MySQL?

How to Create a new database on MySQL?

To create a new database you need to login as root or a account that has permission.

we will create KartookShop database.

-> mysql -u root -p
mysql> create database KartookShop;
Query OK, 1 row affected (0.06 sec)

Possibly Related Posts:

Linux : How to Disable Direct Root Logins
Linux :How to encrypt text file [...]

Linux : Linux command line calculator

Here what bc, a command line calculator, comes in handy.
In this short tutorial, I will show how to do some basic calculation with bc.

First launch bc by typing bc and hitting enter. You will see bc ready to take your commands.

[root@kartook ~]# bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software [...]

FreeBSD :How do I disable desktop icons for “Computer,” “Home,” and “Trash?”

How do I disable desktop icons for “Computer,” “Home,” and “Trash?”

If you do not want your desktop cluttered with the default icons for “Computer,” “Home,” and “Trash,” you can disable any or all of them. To do this, launch Applications > System Tools > Configuration Editor (gconf-editor from the command line), and go to the [...]

FreeBSD : How do I upgrade from gnome2-lite to the full GNOME 2.28 desktop?

How do I upgrade from gnome2-lite to the full GNOME 2.28 desktop?

The Lite edition does not include all of the components of the standard GNOME 2.28 desktop. If you wish to install the full desktop, first remove the gnome2-lite package, then install the gnome2 port or package. For example:

root@kartook# pkg_delete gnome2-lite

Then one of the following:

root@kartook# [...]

How do I remove www from all my urls so that search engine can only rank domain.com ?

How do I remove www from all my urls so that search engine can only rank domain.com/ urls under Linux Apache web server?

Add following code to your .htaccess or httpd.conf (directory directive) file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

If you added directives to httpd.conf, restart Apache:

# service httpd restart

Possibly Related Posts:

Linux : How to [...]