user – Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 user – 32 32 How to Login as a Different User in Linux Mon, 21 Jun 2010 16:28:00 +0000 System usersSometimes when I am working on a project and come across a new powerful Linux command, I need to test it. With a live dedicated server, that can be a recipe for disaster. Rather than taking such a risk with your websites and possibly the websites of customers (if you also host sites), I recommend creating test accounts.

A test user will have a unique set of configuration settings, its own home folder, and its own username and password. The second dilemma I encountered, however, was that once the account was created, I did not want to always have to log out of SSH and then login as the other user. In fact, for security reasons, I did not want the test user to have SSH access all.

Normally, the “su” command is used to become root, but you can also use it to login as any other user, directly from your SSH command prompt. To execute the command, type:

su -- username

It will then ask you for the specified user’s password. Enter it, and you are ready to test.

Image Source: Oxygen icons

How to configure password aging in Linux Fri, 08 Jan 2010 17:03:53 +0000 Password Change
If you have ever worked for a corporation or used IT services at a university, you have undoubtedly been prompted at one time to change your password. It is annoying and seems like a waste of time, but it is important. Running a web server that gives all or some users shell access means you are open to more vulnerabilities than if you were flying solo.

Password aging is one way to make sure users changing their passwords often to lessen the likelihood that would-be attackers can figure them out and exploit them. The “chage” command in Linux allows you to change the number of days between password changes. To set the minimum days (i.e. the number of days before a user must change his/her password) enter:

# chage -m

So, if you want the user called “bob” to change his password in 90 days, you would enter:

# chage -m 90 bob

After 90 days, bob will be prompted for a password change. You can also set expiration dates for accounts and inactive passwords. If you have particularly stubborn users who refuse to use secure passwords, this is a way to prompt them often until they run out of uncreative password ideas. Please use this tool only for good.

How to create a MySQL database in cPanel Mon, 21 Dec 2009 21:07:18 +0000 cPanel database creation
Question: How can I use cPanel to create a MySQL database?

Answer: cPanel uses its own web-based frontend to make database creation very easy. Just follow these simple steps:

1. Login to cPanel
2. Under the Databases section, click “MySQL Databases”
3. Where it says “Create New Database” enter a short name for your database.
4. Click “Create Database”.

Next, you will need to have a user for the database. If you do not have any users, you will need to create one. If you do, skip to step 4.

1. Scroll down to the bottom until you see “Add New User”.
2. Enter a name and password.
3. Click “Create User”
4. Under “Add User To Database” find your user in the dropdown menu and then find the database you created in the second dropdown menu.
5. Click “Add”.

You have now created a database that will give permissions to the user you created. When you install scripts or applications, they will access the database using the username and password you specified. Therefore, make sure you remember it, but also make sure it is secure.

Find out which users are logged in Fri, 27 Nov 2009 22:28:59 +0000 Who command
Question: How do I find out which users are logged in to my Linux server?

Answer: To find out who is logged on to your server, you can run a very simple command:


You will need to login to your server via SSH order to run this command.

This will tell you the person’s username as well as the date and time they logged in. Who will also tell you a few other things. “who -b” will tell you the last time the system was booted. Enter “who -q” to find out the names of the logged in users and then a summary count of total users.

If you need to make sure you are logged in as a particular user, you can also type


This will tell you your own username.

This command is very useful if you suspect there are unauthorized users on your server or if you suspect someone of hacking into an authorized user’s account when you know they are not logged in. Therefore, it can be used for general information and for security purposes. For more information about the “who” command, type “man who” from the command line.

Changing a User's Group in Linux Fri, 20 Nov 2009 22:50:16 +0000 Tux Linux mascot
Question: How do I add a user to a group in Linux?

Answer: Now that you have created a new user, you may need to add the user to a special group. To accomplish that, follow these easy steps.

1. Login to your server via SSH.
2. Become root:

Let’s assume the username is “mrtest” and you want to add it to the “audio” group.

3. From the root command prompt, enter:

useradd -G audio mrtest

If the group does not already exist, you need to create it first with groupadd:

groupadd audio

Once a group is created, you can add as many users to it as you need.

Adding Users in Linux Fri, 20 Nov 2009 22:38:48 +0000 Add user
Question: How do I manually add a user on my Linux server?

Answer: There are many reasons why you might want to add a user manually. Some scripts require their own special users with generic permissions to run them. Creating a user is actually very easy. Just follow these steps:

1. Login to your server via SSH.
2. Become root:
$ su
3. If the user you want to make is called “mrtest” simply enter:

# adduser mrtest
4. It will ask for the user’s password. Enter it.
5. It will then ask for Full Name, room number, work phone, etc. All of this is optional.
6. Finally, it will ask if the information is correct. Just press Y for yes.

By default, the user’s group will be the same as the name. If it needs to be in another group, you will need to tell Linux to change it. We will cover that in another post.

The Mysterious User Named Nobody Tue, 13 Oct 2009 20:56:32 +0000 question mark person
Question: Who is “nobody”, and why is he running so many programs on my server? Am I being hacked?

Answer: On a Linux-based dedicated server, every application must be run by a particular user. On a desktop system, programs are usually either run by the local user or the system. Anything that runs as a local user typically has very basic permissions, often not enough to access directories outside of /home. The alternative, however, is to run a program as root.

If something runs as root, it has complete access to everything, even directories and other programs that it has no need to use. What results is a serious security concern. To remedy this, many Linux distributions will run major services, particularly ones that access the network, as a third user. On most systems, that user is called “nobody”

“Nobody” does not have its hand completely tied like a local user, but it also does not have the sweeping permissions of root. Instead, it functions only for the purpose of running whatever software is assigned to it. Furthermore, unlike the basic local user or root, “nobody” does not have a password. Would-be attackers can never login as “nobody”. Therefore, rest assured. Not only is “nobody” not a threat, he is actually keeping your server safe.

Photo Source: Flickr