Sunday, 7 August 2011

How to add slice to swap memory?


ADD slice to swap:-
 1)create a slice by using format utility
 2)create a file system for that slice
 3)add a slice to swap
   #swap -a /dev/dsk/c0t0d0s1
   make perment change in vfstab

how to see the LINK SPEED,STATUS,MODE in Solaris?


#ndd -get  /dev/hme link_speed

 #ndd -get  /dev/hme link_status


#ndd -get   /dev/hme   link_mode

explain setuid,sgid,stickbit ?


Setuid:-(4) When the SUID is assigned to a file, all the users who are accessing the file become the owner
         of the file at that moment.
         ex: #ls -l /usr/bin | grep passwd
             #chmod 4644 one.


SGID:-(2) .It effect for only directory.If SGID permission is assigned to a directory, then the files and sub-dir
created under the parent dir (dir impletemented with SGID) will be inheriting the group of the
parent directory
           Ex:-# chmod 2644 two
                  drwxr-sr-x 2 root root 512 Jul 23 14:48 two


Sticky bit:(1) this is effective for directory.If a directory is with impletemented with sticky bit, every user in that system has the right to
           create a file/directory inside that dir (provided with permission), but only the owner of the file candelete the file.
  ex:-# chmod 1777 three
                 drwxrwxrwt 2 root root 512 Jul 23 14:52 three