Selasa, 15 Juni 2010

Reset ROOT password in openSUSE

Don’t have to mention the panic that kicks in when you have forgot or misplaced your root user password. Like most other operating systems, openSUSE helps you to recover or reset the root password from the console.
Please try the following to reset/recover root password. This should work on openSUSE 11.0 & openSUSE 10.x (tested on openSUSE 10.3):

1. Boot the system and select the normal boot menu from the list. Once selected, in the “Boot Options” box type

“init=/bin/bash” if you are using GRUB Boot loader
“linux init=/bin/bash” if you are using LILO Boot Loader




This will launch you straight into a Bash shell prompt which comes up even before the Single User mode loads and has the “/” root file system mounted.

Do a mount command to check if the root file system “/” is mounted as Read-Write. In my system, it indeed mounted as Read-Write.



Else, you may need to remount the “/” file system with read-write as follows:

opensuse11:~ # mount -o remount,rw /

Now, simply type the passwd command and enter a new password:

opensuse11:~ # passwd
Changing password for root
New Password:
Reenter New Password:
Password changed

Reboot the system and you are back in business.
opensuse11:~ # reboot

Senin, 01 Februari 2010

Setting IP Address di RedHat

Setting IP Address di Redhat selain bisa dilakukan via Desktop bisa juga dilakukan via Console.
Pertama, login sebagai administrator (su -) lalu masuk ke folder /etc/sysconfig/network-scripts/

[root@server ~]# cd /etc/sysconfig/network-scripts/
[root@server network-scripts]# vi ifcfg-eth0 --> untuk melihat konfigurasi pada ethernet-0

DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.255.255
HWADDR=00:xx:xx:xx:xx:xx
IPADDR=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.1.2


Untuk mengganti / edit file tersebut, tekan tombol I untuk INSERT, lalu sesuai IP address yang
diinginkan.

Setelah selesai tekan tombol ESCAPE (Esc), kemudian tekan tombol Shift + ":" lalu ketik wq untuk keluar dengan mode simpan.
:wq

Kemudian ENTER untuk keluar dan kembali ke mode prompt

Ket :

w = write / menyimpan

q = quit / keluar


Untuk mengetahui perubahan yang sudah kita lakukan, maka lancard harus direstart terlebih dahulu

[root@server network-scripts]# /etc/init.d/network restart

Shutting down interface eth0: [ OK ]

Shutting down loopback interface: [ OK ]

Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0

[ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]


Setelah direstart baru kemudian kita ketik perintah ifconfig dan hasilnya kurang lebih seperti di bawah ini.

[root@server network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:xx:xx:xx:xx:xx
inet addr:192.168.1.5 Bcast:192.168.255.255 Mask:255.255.255.0
inet6 addr: fe80::221:9bff:fefa:7c90/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1116040 errors:0 dropped:0 overruns:0 frame:0
TX packets:1293107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:110703954 (105.5 MiB) TX bytes:1000908053 (954.5 MiB)
Interrupt:169

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:187148 errors:0 dropped:0 overruns:0 frame:0
TX packets:187148 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1808772989 (1.6 GiB) TX bytes:1808772989 (1.6 GiB)