RHEL 5.4 Installaition on Intel
Linux Installation: (RHEL 5.4)
Ram:2gb
Hard Disk:140gb
Intel X86 platform
Step 1: Mount the Red Hat Enterprise Linux X86_64 image and boot the server and at the splash screen press Enter key to begin install.
Step 2: Select OK to run a media test (optional) or skip
Step 3: Select Next
Step 4: Select English and press Next
Step 5: Select the Key board type as US English and press Next
Step 6: Select skip entering the installation number and Click OK.
Step 7: Click SKIP
Step 8: Select Create Custom Layout and Click Next
Step 9: Creating Partitions
Step 9.1: Click – New –Add Partition Window Opens
Mount Point = /boot
File System Type=ext3
Size(MB) = 2000
Check force to be primary partition and Click OK
Step 9.2: Click – New –Add Partition Window Opens
File System Type=physical volume (LVM)
Size(MB) = 137978
Check force to be primary partition
Click OK
Step 9.3: Click LVM – Make LVM Volume Group Window opens
Specify Volume Group Name =vgroot
Click on Add – Make Logical Volume Window Opens
Mount Point = /
File System Type=ext3
Logical Volume Name=lvroot
Size (MB) =10000
Click OK
Step 9.4: Click on Add – Make Logical Volume Window Opens
Mount Point = /usr
File System Type=ext3
Logical Volume Name=lvusr
Size (MB) =12000
Click OK
Step 9.5: Click on Add – Make Logical Volume Window Opens
Mount Point = /var
File System Type=ext3
Logical Volume Name=lvvar
Size (MB) =15000
Click OK
Step 9.6: Click on Add – Make Logical Volume Window Opens
Mount Point = /tmp
File System Type=ext3
Logical Volume Name=lvtmp
Size (MB) =10000
Click OK
Step 9.7: Click on Add – Make Logical Volume Window Opens
Mount Point = /home
File System Type=ext3
Logical Volume Name=lvhome
Size (MB) =5000
Click OK
Step 9.8: Click on Add – Make Logical Volume Window Opens
Mount Point = /opt
File System Type=ext3
Logical Volume Name=lvopt
Size (MB) =8000
Click OK
Step 9.9: Click on Add – Make Logical Volume Window Opens
File System Type=lvswap
Logical Volume Name=lvswap
Size (MB) =32000
Click OK
Step 10: Click Next
Step 11: Here we can specify Network Settings
Set the hostname manually = ecs01.ecsme.com
Specify Gateway = 192.168.1.0
Click on Edit
Uncheck Enable IPv6 Support
Check Enable IPv4 Support
Select Manual Configuration
IP Address = 192.168.1.1
Prefix (Netmask) = 255.255.255.0
Click OK
Step 12: Click Next and Change the region to Asia/Dubai
Step 13: Specify root password and Click Next
Step 14: Select Customize later and Click Next
Step 15: Click Next to start the Installation
Formatting the File System
Transferring the Image to Hard Drive
Step 16: Server Reboots and then Click Forward
Step 17: Agree the License Server and then Click Forward
Step 18: Click Forward with the default options on Firewall
Step 19: Click Forward by changing SELinux=disabled
Step 20: Click Forward by checking Enable kdump
Step 21: Click Yes and then forward
Step 22: Set the date and time and click forward
Step 23: Select No,I prefer to register at a later time
Step 24: Click Forward
Step 25: Create user and Click Forward
Step 26: Click Forward with default options for Sound Card
Step 27: Click Forward with default options for Additional CDs
Step 28 : Click Finish to finish the Installation.
Step 29 : Login Screen
........
Wednesday, September 22, 2010
Saturday, July 31, 2010
RMAN Backup and Recovery
RMAN Backup:
Listener shld be start
#xhost +
#mkdir /u01/prd
#mkdir /u01/rmanprd
#su – oracle
$export ORACLE_SID=prd
$sqlplus / as sysdba
sys@prd>startup
sys@prd>create tablespace rman_ts datafile ‘/u01/prd/rmants1.dbf’ size 300m;
sys@prd>create user rman identified by abc default tablespace rman_ts;
sys@prd>grant connect,resource,recovery_catalog_owner to rman;
sys@prd>host
$rman target system/manager rcvcat rman/abc@prdservice
Rman>create catalog;
Rman>register database;
Full Database Backup Script
Run {
Allocate channel c1 type disk;
Backup full database filesperset 1 format ‘/u01/rmanprd/rman%s.%p’;
Release channel c1;
}
Recovery Loss of User Data file Script
Run {
Allocate channel c1 type disk;
Sql ‘alter database datafile 4 offline’;
Restore datafile 4;
Recover datafile 4;
Sql ‘alter database datafile 4 online’;
Release channel c1;
}
Recovery Loss of Control File Script
Run {
Allocate channel c1 type disk;
Restore controlfile;
Restore database;
Sql ‘alter database mount’;
Recover database;
Sql ‘alter database open resetlogs’;
Release channel c1;
}
Recovery Loss of Redo Log File Script
Run {
Allocate channel c1 type disk;
Restore database;
Recover database;
Sql ‘alter database open resetlogs’;
Release channel c1;
}
Listener shld be start
#xhost +
#mkdir /u01/prd
#mkdir /u01/rmanprd
#su – oracle
$export ORACLE_SID=prd
$sqlplus / as sysdba
sys@prd>startup
sys@prd>create tablespace rman_ts datafile ‘/u01/prd/rmants1.dbf’ size 300m;
sys@prd>create user rman identified by abc default tablespace rman_ts;
sys@prd>grant connect,resource,recovery_catalog_owner to rman;
sys@prd>host
$rman target system/manager rcvcat rman/abc@prdservice
Rman>create catalog;
Rman>register database;
Full Database Backup Script
Run {
Allocate channel c1 type disk;
Backup full database filesperset 1 format ‘/u01/rmanprd/rman%s.%p’;
Release channel c1;
}
Recovery Loss of User Data file Script
Run {
Allocate channel c1 type disk;
Sql ‘alter database datafile 4 offline’;
Restore datafile 4;
Recover datafile 4;
Sql ‘alter database datafile 4 online’;
Release channel c1;
}
Recovery Loss of Control File Script
Run {
Allocate channel c1 type disk;
Restore controlfile;
Restore database;
Sql ‘alter database mount’;
Recover database;
Sql ‘alter database open resetlogs’;
Release channel c1;
}
Recovery Loss of Redo Log File Script
Run {
Allocate channel c1 type disk;
Restore database;
Recover database;
Sql ‘alter database open resetlogs’;
Release channel c1;
}
Listener and TNS Configuration
Listener Configuration(server Side)
#su – oracle
$netca
Listener Configuration –Next
Add –Next
Listener name= LISTENER
Selected protocols =TCP – Next
Use standard port = 1521
Would u like to configure anoter instance =No –Next - Finish
$cd $ORACLE_HOME/network.admin
$vi listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=prd
(ORACLE_HOME=‘/u01/app/oracle/product/11.2.0/db_1/)
)
)
)
Exit code 0 (check for this)
$lsnrctl stop
$lsnrctl start
TNS Configuration: (client side)
$netca
Local Net Service Name Configuration – Next
Add – Next
Service Name =prd (SID Name)
TCP –Next
Host Name =ecs01 or 192.168.1.1
Service Name=prdservice
No Donot test –next –Next – Finish
$tnsping prdservice
#su – oracle
$netca
Listener Configuration –Next
Add –Next
Listener name= LISTENER
Selected protocols =TCP – Next
Use standard port = 1521
Would u like to configure anoter instance =No –Next - Finish
$cd $ORACLE_HOME/network.admin
$vi listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=prd
(ORACLE_HOME=‘/u01/app/oracle/product/11.2.0/db_1/)
)
)
)
Exit code 0 (check for this)
$lsnrctl stop
$lsnrctl start
TNS Configuration: (client side)
$netca
Local Net Service Name Configuration – Next
Add – Next
Service Name =prd (SID Name)
TCP –Next
Host Name =ecs01 or 192.168.1.1
Service Name=prdservice
No Donot test –next –Next – Finish
$tnsping prdservice
Oracle Database Installation On RHEL 5.0
Oracle Database Installation:
#xhost +
#su - oracle
$dbca
Create database – Next
General Purpose – Next
Global Database Name=prd
SID=prd
Uncheck configure Enterprise Manager – Next
Use same administrative password for all accouts
system – sys ---manager
select use database file from template – Next
check specify flash recovery area
check enable archive mode – Next
check sample schemas (optional)
and remaining be the default values – Next – Finish
$pwd
/u01
$vi login.sql
Set sqlp “_user’@’_connect_identifier>”
$sqlplus / as sysdba
If any occurs like error while loading shared libraries then enter the below line.
$chcon –t textrel_shlib_t ‘/u01/app/oracle/product/11.2.0/db_1/lib/liblntsh.so.11.1’
$sqlplus / as sysdba
ssy@prd>startup
#xhost +
#su - oracle
$dbca
Create database – Next
General Purpose – Next
Global Database Name=prd
SID=prd
Uncheck configure Enterprise Manager – Next
Use same administrative password for all accouts
system – sys ---manager
select use database file from template – Next
check specify flash recovery area
check enable archive mode – Next
check sample schemas (optional)
and remaining be the default values – Next – Finish
$pwd
/u01
$vi login.sql
Set sqlp “_user’@’_connect_identifier>”
$sqlplus / as sysdba
If any occurs like error while loading shared libraries then enter the below line.
$chcon –t textrel_shlib_t ‘/u01/app/oracle/product/11.2.0/db_1/lib/liblntsh.so.11.1’
$sqlplus / as sysdba
ssy@prd>startup
Oracle 11gR2 Installation on RHEL 5.0
Oracle 11gR2 Installationon RHEL 5.0
Physical RAM:
# grep MemTotal /proc/meminfo
1805312
Swap Memory:
# grep SwapTotal /proc/meminfo
4096532 kb
#mkdir /u01
Creating /u01 File System
Fdisk /dev/sda
Command:n
First cylinder:
Last cylinder:+27g
Command:w
#partprobe /dev/sda13
#Mkfs.ext3 /dev/sda13
Mounting File System
#Mount /dev/sda13 /u01
#Vi /etc/fstab
/dev/sda13 /u01 ext3 defaults 1 2
#df –h /u01
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 27G 166M 26G 2% /u01
#Vi /etc/hosts
192.168.1.1 ecs01.ecsme.com ecs01 ecs01
#Vi /etc /sysconfig/network
Hostname=ecs01.ecsme.com
Neat-tui
Static ip 192.168.1.1
Netmask:255.255.255.0
#service network restart
# uname -r
2.6.18-194.el5xen
Adding Linux Kernel Parameters to support Oracle
#vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
Note: we may find the parameters mentioned above already present in the /etc/sysctl.conf file. If they have a value lower then mentioned above then make sure you change it, but if they have a larger value then it is safe to leave it as it is.
Make the kernel parameters changes effective immediately:
# /sbin/sysctl -p
Creating groups and oracle user
#/usr/sbin/groupadd oinstall
#/usr/sbin/groupadd dba
#/usr/sbin/groupadd oper
#/usr/sbin/useradd -g oinstall -G dba,oper –d /u01 oracle
#/usr/bin/passwd oracle
Passwd:oracle
#mkdir -p /u01/app/oracle/product/11.2.0/db_1
#chown -R oracle:oinstall /u01
#chmod -R 775 /u01
#mkdir -p /u01/app/oraInventory
#chown -R oracle:oinstall /u01/oraInventory
#chmod -R 775 /u01
Shell limits for the user Oracle
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Where "nproc" is the maximum number of processes available to the user and "nofiles" is the number of open file descriptors.
#vi /etc/pam.d/login
session required pam_limits.so
#vi /etc/selinux/config
SELINUX=disabled
Install necessary packages for Oracle.
Put the Linux Media into DVD and go to the "Server" directory.
For RHEL 5 (32-bit):
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5
libaio-0.3.106
libaio-0.3.106
libaio-devel-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-4.1.2
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11
#reboot
#xhost +
#su – oracle
$xclock (clock shld come)
$pwd
/u01
$echo $SHELL
/bin/bash
$vi .bash_profile
# .bash_profile
ORACLE_HOSTNAME=ecs01.ecsme.com
export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_HOME
ORACLE_SID=prd
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
umask 022
$cd /u01
$ls
linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
$unzip linux_11gR2_database_1of2.zip
$unzip linux_11gR2_database_2of2.zip
$cd database/
$./runInstaller
Configuration Security updates – Next
Install database software only – Next
Single Instance Database Installation – Next
Product Language – English - Next
Enterprise Edition – Next
Installation Location
Oracle base=/u01/app/oracle
Oracle Home=/u01/app/oracle/product/11.2.0/db_1
Create Inventory
Inventory Directory=/u01/app/oraInventory
oraInventory group name = oinstall
Operating System Groups
Oracle dba =dba
OS oper = oper
Checking for Prerequistes – Next
Finish
Installation Begins
Execute the configuration scripts as root after installation.
#/u01/app/oraInventory/orainstRoot.sh
#/u01/app/oracle/product/11.2.0/db_1/root.sh
In the above if u get any errors check for the below
1.File system mounting
2.File Permissions
3.Make sure that Oracle Software is not corrupted and shld be supported by the machine.
Physical RAM:
# grep MemTotal /proc/meminfo
1805312
Swap Memory:
# grep SwapTotal /proc/meminfo
4096532 kb
#mkdir /u01
Creating /u01 File System
Fdisk /dev/sda
Command:n
First cylinder:
Last cylinder:+27g
Command:w
#partprobe /dev/sda13
#Mkfs.ext3 /dev/sda13
Mounting File System
#Mount /dev/sda13 /u01
#Vi /etc/fstab
/dev/sda13 /u01 ext3 defaults 1 2
#df –h /u01
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 27G 166M 26G 2% /u01
#Vi /etc/hosts
192.168.1.1 ecs01.ecsme.com ecs01 ecs01
#Vi /etc /sysconfig/network
Hostname=ecs01.ecsme.com
Neat-tui
Static ip 192.168.1.1
Netmask:255.255.255.0
#service network restart
# uname -r
2.6.18-194.el5xen
Adding Linux Kernel Parameters to support Oracle
#vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
Note: we may find the parameters mentioned above already present in the /etc/sysctl.conf file. If they have a value lower then mentioned above then make sure you change it, but if they have a larger value then it is safe to leave it as it is.
Make the kernel parameters changes effective immediately:
# /sbin/sysctl -p
Creating groups and oracle user
#/usr/sbin/groupadd oinstall
#/usr/sbin/groupadd dba
#/usr/sbin/groupadd oper
#/usr/sbin/useradd -g oinstall -G dba,oper –d /u01 oracle
#/usr/bin/passwd oracle
Passwd:oracle
#mkdir -p /u01/app/oracle/product/11.2.0/db_1
#chown -R oracle:oinstall /u01
#chmod -R 775 /u01
#mkdir -p /u01/app/oraInventory
#chown -R oracle:oinstall /u01/oraInventory
#chmod -R 775 /u01
Shell limits for the user Oracle
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Where "nproc" is the maximum number of processes available to the user and "nofiles" is the number of open file descriptors.
#vi /etc/pam.d/login
session required pam_limits.so
#vi /etc/selinux/config
SELINUX=disabled
Install necessary packages for Oracle.
Put the Linux Media into DVD and go to the "Server" directory.
For RHEL 5 (32-bit):
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5
libaio-0.3.106
libaio-0.3.106
libaio-devel-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-4.1.2
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11
#reboot
#xhost +
#su – oracle
$xclock (clock shld come)
$pwd
/u01
$echo $SHELL
/bin/bash
$vi .bash_profile
# .bash_profile
ORACLE_HOSTNAME=ecs01.ecsme.com
export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_HOME
ORACLE_SID=prd
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
umask 022
$cd /u01
$ls
linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
$unzip linux_11gR2_database_1of2.zip
$unzip linux_11gR2_database_2of2.zip
$cd database/
$./runInstaller
Configuration Security updates – Next
Install database software only – Next
Single Instance Database Installation – Next
Product Language – English - Next
Enterprise Edition – Next
Installation Location
Oracle base=/u01/app/oracle
Oracle Home=/u01/app/oracle/product/11.2.0/db_1
Create Inventory
Inventory Directory=/u01/app/oraInventory
oraInventory group name = oinstall
Operating System Groups
Oracle dba =dba
OS oper = oper
Checking for Prerequistes – Next
Finish
Installation Begins
Execute the configuration scripts as root after installation.
#/u01/app/oraInventory/orainstRoot.sh
#/u01/app/oracle/product/11.2.0/db_1/root.sh
In the above if u get any errors check for the below
1.File system mounting
2.File Permissions
3.Make sure that Oracle Software is not corrupted and shld be supported by the machine.
Friday, June 25, 2010
How to reset the Root password in Sun Solaris (SPARC)
There is every little chance that one loses or rather forgets the root password of his Sun Solaris servers. In the event, this happens, there is a way out of it. Well the way is to reset the password as there is no way to recover it
Ofcourse, it is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.
Boot the server with a Sun Solaris Operating System CD (I'm using a Solaris 10 CD but doesn't matter really) or a network boot with a JumpStart server from the OBP OK prompt.
OK boot cdrom -s
or
OK boot net -s
This will boot the server from the CD or Jumpstart server and launch a single user mode (No Password).
Mount the root file system (assume /dev/dsk/c0t0d0s0 here) onto /a
# mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
# vi /a/etc/shadow
Now, exit the mounted filesysten, unmount the root filesystem and reboot the system to single-user mode booting of the disk.
# cd /
# umount /a
# init s
This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.
This should allow you to login to the system. Once in, set the password and change to multi-user mode.
NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.
# passwd root
# reboot
Ofcourse, it is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.
Boot the server with a Sun Solaris Operating System CD (I'm using a Solaris 10 CD but doesn't matter really) or a network boot with a JumpStart server from the OBP OK prompt.
OK boot cdrom -s
or
OK boot net -s
This will boot the server from the CD or Jumpstart server and launch a single user mode (No Password).
Mount the root file system (assume /dev/dsk/c0t0d0s0 here) onto /a
# mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
# vi /a/etc/shadow
Now, exit the mounted filesysten, unmount the root filesystem and reboot the system to single-user mode booting of the disk.
# cd /
# umount /a
# init s
This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.
This should allow you to login to the system. Once in, set the password and change to multi-user mode.
NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.
# passwd root
# reboot
How to Reset/Recover the Root password in Sun Solaris (x86)
There is every little chance that one loses or rather forgets the root password of his Sun Solaris servers.
In the event, this happens, there is a way out of it. Well the way is to reset the password as there is no way to recover it. Ofcourse, it is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.
Boot the server with a Sun Solaris Operating System CD (I'm using a Solaris 10 CD but doesn't matter really) or a network boot with a JumpStart server. Change the Boot order accordingly in your x86 system and start the server and launch a single user mode (No Password).
In Solaris 10, you have the default Fail Safe boot option in the Boot Loader. With this you do not need a CD or JumpStart server as selecting it will launch the Single-User shell. I haven't used the early Solaris versions on an x86 system so if anyone knows it is availabe then please post your comments.
When you boot from the CD, select the option for the Sigle-user mode (Option 6 on Solaris 10 CD)
This will look for the currently installed Solaris OS on your system and prompts a Yes/No question to mount the Root filesystem as a Read/Write file system onto /a.
Select yes to mount the root file system (/dev/dsk/c0t0d0s0 here) on /a. If you select No, no harm as you still can mount it manually using:
mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
# vi /a/etc/shadow
Now, exit the mounted filesysten, unmount the root filesystem and reboot the system to single-user mode booting of the disk.
# cd /
# umount /a
# init s
This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.
This should allow you to login to the system. Once in, set the password and change to multi-user mode.
NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.
# passwd root
# reboot
------------or---------
"default Fail Safe boot option" ,very easy method to recover the passwd.
In the event, this happens, there is a way out of it. Well the way is to reset the password as there is no way to recover it. Ofcourse, it is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.
Boot the server with a Sun Solaris Operating System CD (I'm using a Solaris 10 CD but doesn't matter really) or a network boot with a JumpStart server. Change the Boot order accordingly in your x86 system and start the server and launch a single user mode (No Password).
In Solaris 10, you have the default Fail Safe boot option in the Boot Loader. With this you do not need a CD or JumpStart server as selecting it will launch the Single-User shell. I haven't used the early Solaris versions on an x86 system so if anyone knows it is availabe then please post your comments.
When you boot from the CD, select the option for the Sigle-user mode (Option 6 on Solaris 10 CD)
This will look for the currently installed Solaris OS on your system and prompts a Yes/No question to mount the Root filesystem as a Read/Write file system onto /a.
Select yes to mount the root file system (/dev/dsk/c0t0d0s0 here) on /a. If you select No, no harm as you still can mount it manually using:
mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
# vi /a/etc/shadow
Now, exit the mounted filesysten, unmount the root filesystem and reboot the system to single-user mode booting of the disk.
# cd /
# umount /a
# init s
This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.
This should allow you to login to the system. Once in, set the password and change to multi-user mode.
NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.
# passwd root
# reboot
------------or---------
"default Fail Safe boot option" ,very easy method to recover the passwd.
Subscribe to:
Posts (Atom)