April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

How to enable SSH Root Login In Solaris 11

Permit SSH Login for Root in Oracle Solaris 11

Open Terminal window and switch to root user.

1. Change the file /etc/ssh/sshd_config PermitRootLogin yes with PermitRootLogin no and save file.

vi /etc/ssh/sshd_config

PermitRootLogin yes

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

vi /etc/default/login

#CONSOLE=/dev/console

3.Remove “;type=role” from the root […]

Script to check the process id running on a particular port – Solaris

I have found this script from the internet, Do not know the author of the script. In future, If I find the original link, I would add it here.

 

Trouble copying the above script? porttopid.sh

 

 

#!/bin/ksh

line=’———————————————‘ pids=$(/usr/bin/ps -ef | sed 1d | awk ‘{print $2}’)

if [ $# -eq 0 ]; […]

zfs cheat sheet Solaris 11

zfs cheat sheet Solaris 11 The ZFS file system is a file system that fundamentally changes the way file systems are administered, with features and benefits not found in other file systems available today. ZFS is robust, scalable, and easy to administer.ZFS uses the concept of storage pools to manage physical storage, ZFS eliminates volume […]

Solaris Security Tips

Aditing

Enable the Basic Security Module (BSM): /etc/security/bsmconv Configure the classes of events to log in /etc/security/audit_control: dir:/var/audit flags:lo,ad,pc,fc,fd,fm naflags:lo,ad # # lo – login/logout events # ad – administrative actions: mount, exportfs, etc. # pc – process operations: fork, exec, exit, etc. # fc – file creation # fd – file deletion # fm […]

Solaris system information

Solaris system information 1. Solaris physical memory usage

Script to get free/unused memory on Solaris can be found with command vmstat. Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted. Tested on Solaris 5.8, 5.9, 5.10. Can be wrong on Zones. Script ./mem_usage.sh

#!/bin/sh mem_free=`vmstat 1 […]

dtsession timeout variable setting

Examine the dtsession timeout variable setting:

# cat /etc/dt/config/C/sys.resources | grep -i dtsession | grep -i lockTimeout If the dtsession timeout is greater than 15, commented or does not exist, this is a finding.

Examine the Open Windows timeout settings, both global and for every user.

# cat /usr/openwin/lib/app-defaults/XScreenSaver | egrep -i ‘\*(lock|timeout):’ If […]

solaris hardening reference

[gview file=”http://rmohan.com/wp-content/uploads/2015/09/Solaris_Build2.pdf”]

Shell script arrays Syntax error: “(” unexpected

Recently when I am using arrays in a script I got the error message as “Shell script arrays Syntax error: “(” unexpected”.

$ sh arrays.sh #In arrays.sh script I defined some arrays trying to extract values form it

The out put I got after running the script is below

Shell script arrays Syntax error: “(” […]

Securing Solaris

Protect your system from internal & external security vulnerabilities

Introduction Solaris security broadly falls under two groups – one is where the system is accessible using local area network/vlan and it has to be secured against unauthorized access. Second is system is accessible over the Internet to a number of persons and it has to […]

Solaris hardening

1. Purpose of OS Hardening

Computers and network elements connected to networks are vulnerable to attacks. The following is a list of commonly known types of attacks:

1. Viruses, worms, backdoors and trojans?2. Wire tapping and sniffing?3. Password cracking?4. Exploits of known vulnerabilities such as software buffer overflow 5. Denial of services (DOS)

Some of […]