page 1 | 2 | 3 | 4 | 5
When you lease a dedicated server, your hosting provider makes available a server installed with your choice of Linux distribution (Fedora, Centos, FreeBSD, etc.). An initial login user (either root or a user name with root authority) and password is provided for your first secure shell session.

To manage a dedicated server yourself efficiently, you will need to set up the home directories, transfer and organize data and application files for your web pages, start the required services to support the secure transfer of data from a remote location to your server, set up the database and email access, to name a few. It may sound like a lot of work but once it is set up, a Linux dedicated server can run for months without manual intervention after all required administration functions are automated.

You can become a skilled Linux administrator over time by learning and trying administrative commands on your own. There are no fixed ways to get a task completed, so pick a method that makes sense to you. There are many excellent examples and explanations for each command on the Internet. You need to understand how each command works rather than just blindly copy and modify a provided example.

This section covers the basic administrative tasks that you are most likely encountered to set up a working environment for your server.

Customize the console prompt.
Linux commands, programs and applications when properly installed are stored in the directory /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, or /usr/local/sbin. If your initial shell does not seem to be able to find the needed commands, you will need to append the appropriate path to the environment variable PATH as in the following example:

PATH=$PATH:/sbin:/usr/sbin:$HOME/scripts



By default the command prompt displays the user name, the hostname, the current working directory with a $ prompt. If this format is too long or annoying to you, you can change quickly the appearance of the prompt, including the use of colors as following.

PS1='\! \u \w % '
PS1="\e[0;32m[\! \u \w]% \e[m "


For detailed explanations of the meaning of each above parameter, search the Internet using the keyword: changing linux shell prompt. You will find many excellent articles covering this topic.

Change the root password.
It is important that the root password must be carefully guarded, and all programs and scripts that may expose the use of the root password must be protected as well. You need to change the original root password supplied to connect to your server the very first time. You may also want to delete any initial non-root user names supplied by your hosting provider.

In unavoidable cases when you must reveal your current root password to your hosting provider to perform server maintenance functions, it is a good practice to change the root password immediately after the maintenance is done. Your server integrity is protected and its files cannot be accessed by anyone even if one has physical access to it.

The following commands create a new root password. The new password must be retyped to avoid mistyping. Strong passwords should have at least seven or eight characters with no repetition of letters or numbers. You should pick a password which is not dictionary-based, easy for you to remember but very difficult for others to figure out. The user root should be disallowed to log in the server directly via the secure shell (ssh).

[brucelee@192.168.224.109 ~]$ su
Password:
[root@192.168.224.109 brucelee]# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
page 1 | 2 | 3 | 4 | 5