Archive for December, 2011

Networking Tools At One Place

A very good morning guys. I couldn’t sleep tonight just because of ongoing India-Australia Test Match at Melbourne and while it’s more than half an hour before the play begins let’s have some talk over network tools in Linux.

There are some common tools like ping traceroute and netstat which provides valuable information about our network connection and traffic. So here we’ll get all these tools at one place so that we can use them easily. So first of all issue this command on your RHEL machine-

  • yum install gnome-nettool

And that’s all you need to do. Now go to your Terminal and issue gnome-nettool command and you’ll see the following screenAll Network Tools At One Place

This includes Ping Netstat Traceroute Portscan Lookup Finger and Whois which you can use from an easy to use graphical interface. So get set and go.


Lock User Accounts After Failed Login

This is the topic I was trying to do for many days but it was not working. Finally I have done it and it’s time to share it with you guys. So following are the steps to do this task-

  • Open /etc/pam.d/system-auth file.
  • Now write these lines just above the line stating auth sufficient

auth required onerr=fail deny=3

account  required reset

Lock User Accounts After Failed Login Attempts

Now the account will be locked after three failed login attempts. There are various other options you can use like-

  • unlock_time=100 will unlock the account after 100 seconds. You can use any value for unlock_time field. If you don’t use this parameter then you’ll have to manually unlock a locked account using pam_tally2 -r -u username command.
  • lock_time=100 will lock the account for 100 seconds after failed attempts to login.
  • no_magic_root will avoid locking root account.

This is more than enough guys but for any additional help you can see the respective man pages.

Well guys a very happy Christmas to all of you and now get prepared for two awesome Linux tricks-

                           Locking Screen

Suppose you are in the middle of your work and you need to leave for a while. So you would like to lock your screen. Following are the steps to so-

  • Install vlock using yum install vlock command.
  • Now to lock the screen just issue vlock command. To unlock it just enter your password.

                            Save Sessions And Resume Them On Another Terminal

Suppose you are working on a terminal and want to save it and resume it from another terminal you can use screen command. Following are the steps to do so

  • Install screen using yum install screen.
  • Now to save a session just issue screen -S id. Here id is the name you want to give this session. Like screen -S viny. This name will be used to restore session.
  • To restore your session just switch to another terminal(using ctrl+alt+F3) and issue screen -d -R id. Here id is the name you have used previously to save the session.
  • To exit the screen simply press ctrl+d.