CentOS

How to Locking And Unlocking User Accounts in Linux?

Fadıl

There may come a time when you need to disable a users login to your Linux box… without deleting there account and still allowing them to receive the email. To do this you must login as “root” and at the command prompt type:

<root@techsoftcenter>:/#"passwd -l username"

(Without the quotes of course) This will lock the users account denying them access to login. You may be thinking “well how do I unlock it now?”, well there’s a command for that too =) At the command prompt type:

How to Monitoring Your System?

How to Monitoring Your System?

Fadıl

An easy way to keep tabs on your system is through the program top. The top is a little app that can display the processes currently running, how much RAM, processor and how much CPU time they are taking (just like ps aux). First, let’s start off by starting it up.

[root@rd ~]# top

This should bring up a nice looking program that shows us much of what ps aux shows us but updated every second. You can change the time between updates by pressings, then typing in the seconds between updates (Note: you can use decimal numbers like 0.5). To switch to command mode display, hit c, and to sort by CPU time hit T.
The top is very useful in tracking what your resource hogs are, and what your RAM and Swap usage is. Play with it, the top’s a neat little program.

How to Scheduling in Linux?

Fadıl

Scheduling in Linux…

Linux comes equipped with scheduling tools. Tools that will let you get a full night’s rest and still have that backup program automatically run at 3am on the dot, and even send us an email letting us know about any appointments.

1. Using the at utility

The at command is used for jobs that need to be run only once. at is an interactive program and it takes in an argument, which is the time and date that you want the job to be run. All outputs of at are sent by email. So let’s say it’s 1pm, and we have a meeting at 3pm. In order to be reminded of this meeting at 2:30pm, we can type:

Installing a New Hard Disk and Copying the Files

Installing a New Hard Disk and Copying the Files

Fadıl

Formatting the new disk

Use the following command to format Linux partitions using ext2fs on the new disk:

mkfs.ext2 /dev/hdb1

To check the disk for bad blocks (physical defects), add the -c option just before /dev/hdb1.

If the new disk will have more than one Linux partition, format the other partitions with mkfs.ext2 /dev/hdb2, mkfs.ext2 /dev/hdb3, and so on. Add the -c option if desired.

Note: With older distributions, the command mkfs -t ext2 -c /dev/hdb1 didn’t check for bad blocks under any of Red Hat, Debian or Slackware, contrary to what the man page stated. This has now been fixed.

Changing Ownership Of A File Using Chown

Fadıl

Recently I encountered a problem when I ftped to my server, I was trying to upload a file that already existed under my username on the server, and I kept getting a 550 error. Which for you newbies out there is a file permission error, telling me that I do not have rights to write over or delete those files under my username.  That made me mad, I didn’t know what was going on I thought my FTP server was messed up.  Then we figured out that the problem could have been who owned the files.  Surely enough, the files were owned by root instead of a pinhead which was the username I was under.  If your files under your username are owned by root then that will allow your file permissions to be limited and you not to be in control of them.  So how do we fix all this?