Category Archives: Unix

Monitoring User Logins In UNIX

Here are some of the commands and files that you may want to check out if you want to monitor your users’ login activity on a Unix box (BSD/Solaris) The concerned files (Solaris): /var/adm/utmp(x) /var/adm/wtmp(x) /var/adm/lastlog The Commands: users* who w ac* last *may not be available in Solaris? All sample outputs show on this … Continue reading

Loop Kill Mutiple PID On Bourne Shell

Just want to document it here. A colleague request to kill multiple PID owned by different users. They don’t have any special privilege to kill process other than their own. Here’s a simple for…loop script that will look for and kill each PID it found. #!/bin/sh -x ps -ef | grep nobody | awk ‘{print … Continue reading

Checking and Repairing File system with fsck

fsck is the command used in UNIX for checking filesystem for any inconsistencies, usually caused by abnormal shutdown. These abnormal shutdown may be caused by some hardware failure or power failure. fsck also has options to repair filesystem as well. Syntax: fsck  [ -F fstype]  [-V]    [-yY]    [-o options]  special -F fstype     type of file system … Continue reading

Set Up Environment Variable on Bourne, Bash, Korn and C-Shells

There are many shells available for the UNIX operating system. Among them are sh (bourne), csh (C), tsch (korn) and bash (bourne again) Shells. With all these shells, sometimes we can mix all the syntax when assigning values to a variables. Here’s is another review so you wont forget: C Shell (csh) or Korn (tcsh): … Continue reading

SCO Group (SCO UNIX) Is Bankrupt!

Santa Cruz Operation SCO Group, the same group that gave us SCO UNIX has filed bankruptcy last Friday. That is bad news not only for the SCO users and community but for the stock holders too! The bankruptcy that was filed was The Chapter 11 Bankruptcy! Meaning, the court will take over (with the creditor’s … Continue reading

The getent Command

For the UNIX side of things, we’ll try to feature one command a week that is commonly used in system/user administration on a UNIX box. If anyone wants to contribute more, then we may do one command every two days or ‘Unix Command for the day’. Something like that. For today, it’s all about getent. … Continue reading

OpenLDAP Installation on Sun Blade 100

This is an OpenLDAP installation on the following system: System Configuration: Sun Microsystems sun4u Memory size: 1024 Megabytes Sun-Blade-100 (UltraSPARC-IIe) Prerequisites: Depending on the requirements, there may be a need to install some third party softwares: OpenSSl Kerberos SASL Berkeley DB TCP Wrappers and others Need to make sure the following variables is set: Variable … Continue reading

Route, Routing, Routing Table

Here’s some information about routing from a Unix (Solaris) box. Got this request from one of the Network people to add a static route on a server. The command # netstat -rn show the routing table on a *nix machine . The ‘route’ command manually manipulates the network routing table on a Unix box. The … Continue reading

Soft and Hard Links… Explained

A friend and I were kind of reviewing some HPUX/Solaris commands and ideas. She asked “What were the difference between hard and soft links?”. Unable to get the answer at once, I of course consulted my Solaris Administration guide. I also got curious cause I really don’t mind what their difference is, all I care … Continue reading

from DUSK…

We UNIX SysAds have many many tools that can help us administer our servers. What’s great about UNIX is that you don’t have to learn the complicated commands to do what’s need to be done. There is a saying in the UNIX world that a complex command is just a few commands used altogether. We … Continue reading