Archive for the ‘Solaris’ Category

Disabling automounter for /home directory

Sunday, March 14th, 2004

By default SunOS 5.x comes with the automounter enabled. This implies that some filesystems such as /home will no longer be treated as normal directories. Despite this facilitates the administration of your system, in some situations you’ll want to avoid this behaviour.

To avoid the automounter to serve the /home directory as if it was an NFS resource and thus allowing you to mount the directory according to your needs, proceed as follows:

Edit /etc/auto_master and comment the line starting by /home. Then make sure to restart automount so it will reload its maps:

automount

Are my interfaces in promiscuous mode?

Monday, November 10th, 2003

When a network interface is in promiscuous mode the machine can see all network packets, even those destined to another machine. Under Solaris, there is no way to determine if your box’s network interfaces are in promiscuous mode.

One of the reasons your box is in promiscuous mode is due to sniffer programs such as snoop or tcpdump. The ifstatus tool can help to see the mode of your interfaces.

How to disable automounter?

Monday, November 10th, 2003

Sometimes, for security reasons you should need to disable automounter. Automounter is controlled by the /etc/auto_* configuration files.

The easiest way to disable it is to remove /etc/auto_* and disable the /etc/rc2.d/S74autofs.

cd /etc
rm auto_*
cd /etc/rc2.d
mv S74autofs OFF_S74autofs

Preventing users from changing the owner of files

Wednesday, September 10th, 2003

As you probably know the chown command provides a way for the owner of a file to change the ownership of this file. In some circumstances (i.e. you want to know who created each file on your systems) you will want to avoid this behaviour.

(more…)

Disabling remote login

Wednesday, September 10th, 2003

For security reasons, sometimes you’ll want to only allow root logins from the console on your Solaris box. Next tip shows you how to do it.

Simply edit /etc/default/login and add the following line:

CONSOLE=/dev/console

This will disable rlogin or telnet as root.

Recreating /dev/null

Monday, August 25th, 2003

If for some reason you have lost your /dev/null you can easily recreate it by moving a file to /dev/null as root. Another way is to just recreate the soft link (as root again):

devlinks

But if you have messed up the original device in /devices proceed as follows:

mknod /devices/pseudo/mm@0:null c 13 2
chown root:sys /devices/pseudo/mm@0:null
chmod 666 /devices/pseudo/mm@0:null
cd /dev
ln -s ../devices/pseudo/mm@0:null null

Disable replies to broadcast pings

Monday, August 25th, 2003

Some types of DoS – Denial of Service – attacks (i.e. smurf, fraggle) utilize IP directed broadcasts in combination with echo protocols and spoofed packets to generate multiplied traffic streams.

(more…)

Hidden sniffer

Saturday, July 26th, 2003

It is possible to sniff packets through an unplumbed interface, so the interface can not be detected, remaining invisible to detection and attack.

(more…)

Umounting a busy filesystem

Saturday, July 26th, 2003

Note that this tip applies to Solaris 7 and 8.

Have you ever tried to unmount a filesystem and found that there is something blocking it?

(more…)

Configuring network interfaces

Friday, July 11th, 2003

To enable a network interface card under Solaris you should install the device driver, reconfigure the system by rebooting and assigning an IP address to the interface. The last one is what we are going to deal with.

(more…)