August 2015
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories

August 2015
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

List PID’s for processes listening on ports solaris

List PID’s for processes listening on ports To list PID’s for processes listening on ports

#pfiles `ptree | awk ‘{print $1}’` | egrep ‘^[0-9]|port:’

disable the inetd service

Symptoms

Repeated attempts by unprivileged users to stop the inetd server may transition the inetd service to the “maintenance” state, thereby moving all internet services managed by inetd(1M) to the “offline” state.

To determine the state of the inetd service, the following command can be run:

$ svcs inetd STATE STIME FMRI maintenance 12:00:23 svc:/network/inetd:default […]

install ssh client on Centos

install ssh client on Centos

To install openssh on a CentOS:

yum install openssh

 

And if you want to install the client (ssh command) you have to run:

yum install openssh-clients

install dig, host, and nslookup – bind-utils on CentOS

if you want to use on of the linux commands:

dig, host or nslookup on a CentOS machine and you get the error message:

-bash: nslookup: command not found

you have to install the bind-utils package.

Just run the command:

yum install bind-utils

Solaris 10 – create an init script

First of all, we need to understand the procedure of the boot in Solaris. Next, follows a description of the boot sequence in Solaris.

Overview of the boot sequence in Solaris When Solaris boots up, it runs “init”. “init” looks in /etc/inittab to find out what runlevel it needs to boot into On Solaris, this […]

Solaris run levels

Solaris system state or init states refer to the level of services provided by the system on that specific run-level.Normally SVR4 systems has 7 run levels and Solaris too has that. (S)tart files, (K)ill files:

In unix ,runlevel will define what are the process need to start in OS startup according to which run level […]

determine the runlevel in solaris

Determining a System’s Run Level

Display run level information by using the who -r command.

$ who -r

Use the who -r command to determine a system’s current run level for any level.

Example 6-1 Determining a System’s Run Level

This example displays information about a system’s current run level and previous run levels.

[…]

Disabling Servies on Solaris 10

SUN has done a equally good things with Solaris 10 as they have done bad with the same. Sometimes I wonder how or why no one takes care of small issues with Solaris 10. It has become very popular since it went open source, but still there are some annoyances which a day to day […]

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 […]