November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Hardening a Solaris Installations

installation can be secured: the object is to have a box which can be accessed remotely via SSH and therefore used as a general purpose Unix server.

1.1. Patch and Firewall

First <ilnk=”patchsolaris”>patch and <ilnk=”firewallsolaris”>firewall the machine.

1.2. Network-Related Daemons

In this section, our aim is to permanently stop network-related daemons which are not required, […]

process id attached with particular port in sunos

pfiles /proc/* 2>/dev/null | nawk ‘ /^[0-9]*:/ { pid=$0 } /port: 7085$/ { printf(“%s %s\n”,pid,$0);}’

I would try something like:

$ lsof -i :7085

PCP is a script that enables administrators to see what open TCP ports are in use on a Solaris system. It maps ports to PIDs and vice versa. It accepts wildcards […]

Adding Samba to the Service Management Facility

I am a bit new to the Service Management Facility (SMF) introduced into Solaris 10, but after getting my feet wet I kinda like it. These steps came in handy for me when I needed to add Samba to SMF.

Backup and Remove samba rc* scripts bash-3.00# tar cvpf – /etc/rc?.d/???samba | gzip -c > […]

Solaris command: prstat

Total Physical Memory >prtdiag -v | grep Memory Memory size: 8192 Megabytes >prtconf | grep Memory Memory size: 8192 Megabytes Total Physical Memory >vmstat 5 10 r b w swap free re mf pi po fr de sr vc vc vc vc in sy cs us sy id 0 0 0 14841224 772880 23 147 […]

Root login on Oracle Solaris 11

Once after your installation is completed, you will not be able to login directly to the console as the user “root”. user root should be assigned role as a normal user. Below are the very few steps to enable root login. 1. #vim /etc/ssh/sshd_config [ change parameter to yes ] PermitRootLogin yes 2. #vim /etc/default/login […]

Solaris Grep

grep on Solaris

Today I was asked by a colleague how to match a regex in a text file and return a specific number of lines both before and after the match. GNU grep has a very easy solution for this; the -A/B/C flags, as shown on my […]

maximum-number-of-file-descriptors solaris

Before I get into details here is the bottom line. If you start MySQL on Solaris as a non-root (ie, mysql) user and for some reason you need to adjust the […]

Solaris 11 direct root login access

This will be helpful for those wants to have direct root login locally and via SSH

Comment out the “CONSOLE=/dev/console” line in /etc/default/login.

Modify PermitRootLogin to yes in /etc/ssh/sshd_config

Remove “:type=role” from the root entry in /etc/user_attr

Remove highlighted part

root::::type=role root:::

How to enable SAR (System Activity Reporter) on Solaris

Solaris 10 comes with a new feature called SMF (Solaris Management Facility), and to enable SAR, we need to update the SMF database with this information.

# svcadm enable svc:/system/sar:default

Now lets check if it is really enabled.

# svcs -x system/sar svc:/system/sar:default (system activity reporting package) State: online since Sun Nov 16 10:07:42 2008 […]

Solaris 10 Password Policy Enforcement

I was recently handed a baseline policy that was to implemented for all users on the Solaris 10 systems that I support. After a small amount of research I was able to find the various pieces that needed to be altered.

Desired Policy

After discussion between the security officer and the other management level staff, […]