Learn to prepare tasty,quality south indian, north indian, vegeterian,non-vegeterian,thai,tiffin,idli,dosa,vada,sambar.
Technical Job Duties of Solaris System Administrator
Concatenate new slice to an existing slice Solaris:
Sun Solaris (Solaris 9, Solaris 10) - Concatenate a new slice to an existing slice involves the following steps:
1) Log in as super user/root user (# prompt) to perform the operation
2) Create metadbs. The SVM state database contains vital information on the configuration and status of all volumes, hot spares, disk sets. There are normally multiple copies of the state database called the replicas. It is recommended that state database replicas be located on different physical disks, different controllers to provide added resilience. Command to create state database and its replica is metadb
# metadb -h - details options
3) Create a simple SVM volume on disk c3t2d6s3 (optional values and can be changed as per requirement) as follows :
# metainit d10 1 1 c3t2d6s3
4) To view the metadevice named d10 use the metastat command as follows :
# metastat d10
5) Create 5GB soft partition on the top of a simple device as follows :
# metainit d11 -p d10 5g
6) Before adding more space to d11, we need to add more space to simple volume by concatenating another slice (3GB) to d10 as follows :
# metattach d10 c3t3d2s2
7) Use metastat command to get information about d10
# metastat d10
Increasing The Size Of Mounted FileSystem Solaris :
Sun Solaris (Solaris 9, Solaris 10) - Increasing the size of a mounted filesystem involves the following steps:
1) Let us consider we are working with the mounted file system /test
2) Check the current size of the /test file system
# df -h /test
The command mentioned above displays the size of /test file system in MB size
3) Use metastat command to obtain size information about the device
# metastat -c d11
Lets say O/P is 3 GB
4) Use metattach command to increase the SVM volume named d11 from 3GB to 4GB as follows :
# metattach d11 1gb
5) Check the size using metstat -c as follows :
# metstat -c d11
O/P will be 4GB now
6) Check the size of /test as follows :
# df -h /test - We won't see any change in O/P
7) Use growfs command to increase the size of the mounted file system /test
# growfs -M /test /dev/md/rdsk/d11
8) df -h /test - Shows increase in size by 1GB
Monitoring System Users Sun Solaris :
Sun Solaris (Solaris 9, solaris 10) - Monitoring system Users is an essential function of system administrator/server administrator.Information security audit these days demand the confidentiality, integrity, and availability of information.It is duty of a system administrator to monitor system resources and watch for unusual activity.
It is a best practice to have a method in place to monitor the system. It is useful when we expect a breach in security.Some important commands and files used to monitor the user and system activity is given below :
logins - monitor a particular user's activity
loginlog - A file that contains one entry for each failed login attempt
who - shows who is logged into the system, who lists the login account name, terminal device, login date and time, where the user logged in
whodo - displays each user logged in and active processes owned by that user. The Output shows date, time, machine name. For each user logged in, the system displays device name, UID and login time, followed by list of active processes associated with UID
last - displays the session of the specified users and terminals in chronological order. For each user the command displays, the time when the session began, duration of the session, terminal where the session took place.
Removing Swap File Sun Solaris:
Sun Solaris (solaris 9, solaris 10) - Removing a Swap File can be performed by following the steps given below :
1) As a root user we can remove the swap area as follows :
# swap -d /dev/dsk/c0t0d0sn (where n=1,2,3..) -- This is for a swap partition
# swap -d /data1234/swapfile -- This is for a swap file
2) To ensure that the swap area is gone issue swap -l command :
# swap -l
swapfile dev swaplo blocks free -- O/P
The swap filename is removed from the list. The file is not available for swapping. It is not deleted physically
3) In the /etc/vfstab file, delete the entry for the swap file
4) Remove the swap file to recover the disk space :
# rm /data1234/swapfile
If the swap partition is in use instead of a swapfile, we canallocate this disk space like a normal file system
User administration Monitoring users Solaris:
Sun Solaris (Solaris 9, Solaris 10) - User administration - Monitoring users is an essential job role of system administration. It is a security measure and reports on user activity will be requested on a dily, weekly, monthly basis from teh InfoSec team (Information security team) who are involved in the process of penetration testing to test various loop holes in the organization's infrastructure.We can make use of many utilities to monitor the user's activity.
1) Log in as root/super user
$ su - root
2) Create a file called loginlog in /var/adm (/var/adm/loginlog) directory and set the file permissions to 600 (rw-------)
# cd /var/adm
# touch loginlog
# chmod 600 loginlog -- This can be performed as -- chmod -rw+u loginlog
3) Log out and log back in. Use command line to login and not CDE
4) Try to login as root and issue a wrong/incorrect root password. Do it five times. After the fifth attempt login as root issuing correct password and examine the file /var/adm/loginlog
# more /var/adm/loginlog
5) Use finger command to display information about the user. Username can be obtained from the loginlog file.
# finger username -- For example, # finger user123
# finger -m user123
6) Use finger command to display information about the user on another system :
# finger username@hostname --- where where hostname is the name of the host
# finger user12@helen --- here helen is the name of the host
7) Use the last command to display user and reboot activity
8) Use logins command to obtain information about the user login account
# logins -x -l username
Unmirroring Non-Critical File System Solaris:
Sun Solaris ( Solaris 9, Solaris 10) - Unmirroring a non-critical file system details the procedure for removing a mirror on a file system that can be removed and remounted without having to reboot the system.We use /new as the example file system. Lets assume /new is currently mirrored using the metadevice d3 - this mirror is formed using d13 and d33. Lets assume the underlying disk slice is /dev/dsk/c0t00s6.
1) Unmount the /new file system
# umount /new
2) Detach the submirror d13
# metadetach d3 d13
3) Delete the mirror d3 and rename the sub-mirror d33
# metaclear -r d3
At this point, the file system is no longer mirrored. The metadevice d13 still exists and can be used as the device to mount the file system. Full device name /dev/dsk/c0t0d0s6 can be used if we don't want the disk device to support a volume.
4) Delete the d13 metadevice :
# metaclear d13
5) Edit the /etc/vfstab to change the entry
# vi /etc/vfstab
/dev/md/dsk/d3 /dev/md/rdsk/d3 /new ufs 2 yes -
change it to
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /new ufs 2 yes -
6) Remount the /new file system
# mount /new
/etc/default/su UNIX System Administration File:
/etc/default/su UNIX System Administration File plays a major role in security audits. Nowadays financial firms have made it a mandate to perform SOX (Sarbanes Oxley) audit on a regular basis. This security audit takes into account user login, the way in which login occured (superuser/normal user) and many such criteria.
/etc/default/su is the file containing variables that restrict the user access as a root user.
SULOG=/var/adm/sulog - logs unsuccessful root logins.
CONSOLE=/dev/console - user need to login as a normal user and has to issue an su to become a root user
Oracle Solaris 11 in 2011 :
The giant database software company which has been expanding its horizon beyond database market is making a good penetration into os,storage and hardware market. Oracle VM is the virtualization product from oracle corporation. Oracle recently merged with Sun Microsystems the Java company. solaris the operating system from sun microsystems had been on its latest release solaris 10 before the merger. After oracle acquired sun solaris has been rebranded as oracle solaris 10. Oracle has now announced that oracle solaris 11 will be released on 2011.