Posted by Kairo Araujo on 24 de junho de 2010
Many times is necessary identify who eth (eth0, eth1, eth2, … , ethN) correspond to physical interface.
For this you can use the ethtool
ethtool -p ethN
example:
ethtool -p eth0
One or more LEDs on the specific physical ethernet port are blinking now.
Posted by Kairo Araujo on 23 de junho de 2010
Remember this is a very intrusive configuration.
Look your security policies with atention.
1. Make de keys using ssh-keygen
On the “Enter passphrase” question leave black and enter.
# ssh-keygen -t dsa -f ~/.ssh/id_dsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_dsa.
Your public key has been saved in /home/user1/.ssh/id_dsa.pub.
The key fingerprint is:
87:52:b6:ec:c9:1f:f2:ce:be:d7:33:e9:1b:2b:33:dd user1@myserver1
2. Copy the public key for the server you want to have direct access.
# scp .ssh/id_dsa.pub user1@myserver2:~/.ssh/authorized_keys_temp
On myserver2 increse autorized_keys
# cat ~/.ssh/authorized_keys_temp >> ~/.ssh/authorized_keys
Remove temporary authorized_keys
# rm ~/.ssh/authorized_keys_temp
TIP: On RHEL 5 You can use ssh-copy-id
# ssh-copy-id -i ~user1/.ssh/id_dsa.pub user1@myserver2
Posted by Kairo Araujo on 22 de junho de 2010
On this example I´m using two servers named of myserver1 and myserve2 and the user is user1.
1. Install rsh-server
# yum install rsh-server -y
Loaded plugins: rhnplugin, security
Repository 'RHEL5LocalRepository' is missing name in configuration, using id
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rsh-server.x86_64 0:0.17-40.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================
Package Arch Version Repository Size
=======================================================================================================
Installing:
rsh-server x86_64 0.17-40.el5 RHEL5LocalRepository 40 k
Transaction Summary
=======================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 40 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : rsh-server 1/1
Installed:
rsh-server.x86_64 0:0.17-40.el5
Complete!
2. Enable services
# chkconfig rsh on
# chkconfig rlogin on
# chkconfig rexec on
# chkconfig nscd on
# chkconfig xinetd on
3. Reestart xinetd and nscd
# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
# /etc/init.d/nscd restart
Stopping nscd: [ OK ]
Starting nscd: [ OK ]
4. Edit /etc/securetty and add rsh, rlogin and rexec
# vi /etc/securetty
Put on end of file:
rsh
rlogin
rexec
5. Create file ~user1/.rhosts (user1 is my user example)
# vi ~user1/.rhosts
Put on end of file:
myserver2 user1
Change the permission of file
# chmod 600 ~user1/.rhost
6. Testing
On myserver2 with user1 create a file testing.file
# touch testing.file
Uses the rcp:
# rcp testing.file myserver1:tested.file
Look if file are created using the rexec
# rsh myserver1 ls -l ~user1
Posted by Kairo Araujo on 13 de maio de 2010
How to identify/get QLogic WWN on Red Hat Enterprise Linux 5 (RHEL5).
First identify your installed or recognized
# lspci | grep -i fibre
04:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
04:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
On Red Hat Enterprise Linux 5 (5.x) is on /sys/class/fc_host/hostX/port_name
(X is your device 1,2,3,…N)
For get use:
cat /sys/class/fc_host/hostX/port_name
Sample with multiple HBA (Fibre) QLogic
# ls /sys/class/fc_host/
host3 host4 host5 host6
# cat /sys/class/fc_host/host[3-6]/port_name
0x2100001b32936e24
0x2101001b32b36e24
0x2100001b32932821
0x2101001b32b32821
On Red Hat Enterprise Linux 4 (AS/ES) is on /proc/scsi/qla2xxx/1 (1,2,3,..N)
Sample:
# egrep [node|port] /proc/scsi/qlx2xxx/0
scsi-qla0-adapter-node=200000e08b1c19f2;
scsi-qla0-adapter-port=210000e08b1c19f2;
Posted by Kairo Araujo on 10 de fevereiro de 2009
Installing IBM lin_tape on Linux (Red Hat Enterprise Linux)
Steps for install lin_tape and lin_taped
1. Download the lin_tape source and lin_taped from ftp://ftp.software.ibm.com/storage/devdrvr/Linux/lin_tape_source-lin_taped/
lin_tape-X.YY.Z-W.src.rpm.bin
lin_taped-X.YY.Z-rhel[V].arch.rpm.bin
Samples for version 1.20.0-1
lin_tape-1.20.0-1.src.rpm.bin
lin_taped-1.20.0-rhel4.x86_64.rpm.bin
2. Rebuild lin_tape rpm source
# rpmbuild --rebuild lin_tape-X.YY.Z-W.src.rpm.bin
(mais…)