Pages

Saturday, April 30, 2011

SOLARIS NETWORKING

1.The NICS in the system are listed by the following command

# dladm show-dev

2. Information about links on the data-link layer is displayed by

# dladm show-link

3. You also add information to certain configurationfiles to create a persistent network configuration. The most common files are /etc/hostname.interface, where interface is the specific interface that is used on the system, and /etc/hosts.

4. To set IPADDRESS to in Solaris X86 do the following.

# ifconfig rtls0 plumb 192.168.0.20/24

5. To check the ipaddress

# ifconfig -a

6. To make the configuration persist across the reboot do the following.

# echo 192.168.0.20/24 > /etc/hostname.rtls0

Add the corresponding ipaddress and hostname to /etc/hosts

# nano /etc/hosts

192.168.0.20/24 solaris1

7. To add the defaultrouter to the system

# echo 192.168.0.1 > /etc/defaultrouter

8. To enable packet forwarding in Solaris

# svcadm enable ipv4-forwarding

9. To start Routing protocol

# svcadm enable route:default


10. Perform a reconfiguration reboot

# reboot –- -r

11, To check packet forwarding is enabled

# routeadm

12. To disable packet forwarding

# svcadm disable ipv4-forwarding

13. To perfom reconfiguration reboot

# reboot -- -r

14. To view the routing table.

# netstat -rn

15.  To add a purticular route

#  route -p add -net 10.0.5.0/24 -gateway 10.0.5.150/24

15. 

















ADDING A NEWUSER IN SOLARIS

Defult home directory of normal users in Solaris is /export/home/username

Before creating the user you should create a directory in /export/home/username . Add the user using the following command.


# useradd -d /export/home/user user

The following option can be used with the useradd command.


1. -u 1003—Specifies the UID
2. -g 102—Specifies the GID of the primary group
3. -d /export/home/sandy—Specifies the home directory
4. -s /bin/ksh—Specifies the login shell
5. -m—Creates the home directory specified by the -d option
6. -k /etc/skel—Specifies the location of skeleton files, such as .profile
7. username —Specifies the user name of the account
###############################################################################################

# useradd -u 1003 -g 102 -d /export/home/user -s /usr/bin/bash -c "Vasanth" -m -k /etc/skell

#################################################################################################

UID AND GID OF USERS IN SOLARIS

1. A UID for a regular user can be between 100 and 2147483647 (except for
60001, 60002, and 65534).

2. UIDs 0–99, 60001, 60002, and 65534 are reserved for use by the Solaris OS

NOTE: avoid using UIDs over 60000 because they are not compatible with some Solaris features.

DEFAULT USER GROUP IN SOLARIS
##############################

When a new user is created he will be assigned to a primary group called staff.

NOTE: GIDs are assigned from the unused integers between 100 and 60000.

SETTING PASSWORD SECURITY POLICY IN SOLARIS

The Length of the password, Password locking after failed attempts and algoritham used to encrypt the password are define in

# /etc/security/policy.conf

By default in Solaris password length has set to 8 characters. If you set a password with 10
character long 9, 10 are simply ignored.

####### Setting better up a better password in Solaris 10 do the following. ########


# nano /etc/security/policy.conf

change the below lines and save the file


CRYPT_ALGORITHMS_DEPRECATE=__unix__
CRYPT_DEFAULT=2a




The password complexity rules, history, and password-aging defaults are specified
in the

# /etc/default/passwd

Monday, April 25, 2011

LINUX LIKE PINGING IN SOLARIS

Normally in Solaris the output of the ping command contain only one line. That is it gives the out put as given below.

-bash-3.00# ping google.com
google.com is alive


######## To Use ping just Like in Linux##########

# ping -s google.com

SETTING DNS CLIENT IN SOLARIS

# touch /etc/resol.conf

# nano /etc/resolv.conf

nameserver 192.168.1.1

save the above file


# cp /etc/nsswitch.dns /etc/nsswitch.conf

To test the above setup

# nslookup google.com

SETTING DEFAULT ROUTE IN SOLARIS

############ TO ADD A DEFAULT GATEWAY###############

# route add default 192.168.1.1


If you need to make route to be persist across the reboot

# echo 192.168.1.1 > /etc/defaultrouter

NFS SERVER SOLARIS

To enable the NFS service run the following command

# svcadm -v enable -r network/nfs/server

To share /packages directory

# share -F nfs -o rw /packages

The above command is mainly used fro temporary sharing and it will not persist on reboot. To make the share persist on the reboot do the following.

# nano /etc/dfs/dfstab

share -F nfs -o rw /packages

save the file

To mount the share from a remote machine.

Login to the client

# mount -t your nfsserver:/package /mnt



##########To restart the NFS server################


# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start


######## To disable NFS server#####################


# svcadm -v disable -st network/nfs/server

Installing Nano editor In SOLARIS

-bash-3.00# mkdir /packages

-bash-3.00# cd /packages

-bash-3.00# ftp://ftp.sunfreeware.com/pub/freeware/intel/10/nano-2.0.9-sol10-x86-local.gz

-bash-3.00# gunzip nano-2.0.9-sol10-x86-local.gz

-bash-3.00# pakgadd -d nano-2.0.9-sol10-x86-local

The above steps will help you install nano. nano will be installed inside /usr/local/bin.

Just run

-bash-3.00# /usr/local/bin/nano

Changing The Default shell to Bash in Solaris

Login to the server as root

Run the following command
# passwd -e

It will prompt like below

Old shell: /bin/sh
New shell:

Enter the new shell as

New shell: /usr/bin/bash