Find Out When a Unix/Linux User Last Logged In

Keeping track of your users’ activities may seem a little bit intrusive, but it is very necessary for security-conscious system administrators. When users are logged onto the system, you should know, and if a user account is up to anything suspicious, knowing when the user’s logged in might very well save your system. It may […]

How to Disable or Completely Delete Linux Server Users

Disabling a user account can be very useful if the account has been compromised, the user has left but may return in the future, or for punitive purposes. To disable a user on a Linux system, you can use the following command string:
# usermod –lock –expiredate 1970-01-01 <username>
Replace <username> with the actual user’s […]

How to Run Commands as Another User

In a previous post, we explained how to use “su” to execute a command as another user, but that is only one of the many ways you can accomplish this on a Linux or Unix server. The following techniques each have their own advantages and can help you run programs under different user identifications.

runuser – […]

MySQL User and Password Management

As you manage your dedicated server, you will invariably come across times when you need to reset passwords, add or delete accounts, or generally perform maintenance on your database users. When working with MySQL, there are a couple of simple ways to manage user accounts. The first involves accessing it from the command line, while […]

List All Linux Commands with Compgen

A Linux dedicated server is all about commands. At some point, you will inevitably need to manage it from SSH (Secure Shell), which means you will be presented with a command line interface. While you may already know some commands, it is nice to see what the server offers as a whole. You can do […]

A Basic Introduction to the Linux Command Line

If you are managing a Linux server for the first time, you are probably using a web-based control panel, such as cPanel/WHM.  While a control panel may fill most of your basic needs as a system administrator, there are some tasks best left to the command line. On a remote Linux server, you can access […]

How to Suspend User Accounts on a Linux Server

I hope the time never comes when you have to take action against a user on your dedicated server, but if the situation does arise, you should know how to handle it. With a Linux server, there are several ways to disable an account without completely deleting it. This is useful if you have a […]

Granting Users Access to Privileged Files

Linux dedicated servers set permissions for every file, including applications.  Fortunately, it is very quick and easy to change the permissions of files in order to give specific users access.
First, it is important to understand how ownership and permissions work in Linux.  Every file has an owner, and that owner […]

Who is the user Nobody?

If you stare at the list of running processes on your server for long enough, you are bound to come across the user called “nobody”. Before you call a security expert and prepare to fight off a hacker, relax. While the username “nobody” may seem suspicious, it is actually supposed to be there.
On […]

What is “root” on a Linux Server?

When you enter into the world of dedicated servers, you are going to hear new terminology, acronyms, and strange ways of pronouncing software titles. One common term that experienced system administrators will throw around is “root”. Just as the roots of a tree are its strength and foundation, root on a Linux server […]