Ever noticed the different colors on parts of Power5 systems? Some parts are orange, others are blue. Orange means: you can touch it, open it, remove it, even if the system is running. Blue means: don't touch it if the system is active.
CTRL-ALT-F1: Switch to Linux command line; no login possible. If you then click on CTRL-ALT-DEL the system will reboot.
CTRL-ALT-F2: Takes you back to the Xserver window.
CTRL-ALT-BACKSPACE: Kills of the Xserver and will start a new -fresh- one, so you can login again.
A very usefull command to list microcodes is lsmcode:
# lsmcode -c
Let's say you wish to calculate with dates within a Korn Shell script, for example "current date minus 7 days". How do you do it? There's a tiny C program that can do this for you, called ctimed. You can download it here: ctimed.tar.
Executable ctimed uses the UNIX Epoch time to calculate. UNIX counts the number of seconds passed since Januari 1, 1970, 00:00.
So, how many seconds have passed since 1970?
# current=`./ctimed now`
This should give you a number well over 1 billion.
How many seconds is 1 week? (7 days, 24 hours a day, 60 minutes an hour, 60 seconds an hour):
# let week=7*24*60*60
# let aweekago="$current-$week"
Convert this into human readable format:
# ./ctimed $aweekago
You should get something like:
Sat Sep 17 13:50:26 2005To create a printer queue that dumps it contents to /dev/null:
# /usr/lib/lpd/pio/etc/piomkpq -A 'file' -p 'generic' -d '/dev/null' -D asc -q 'qnull'
This command will create a queue named "qnull", which dumps its output to
/dev/null.
To print to a file, do exactly the same, except, change
/dev/null to the
/complete/path/to/your/filename you like to print to. Make sure the file you're printing to exists and has the proper access rights.
Now you can print to this file queue:
# lpr -Pqfile /etc/motd
and the contents of your print will be written to a file.
If you wish to put AIX files on a CD, you *COULD* use Windows. But, Windows files have certain restrictions on file length and permissions. Also, Windows can't handle files that begin with a dot, like ".toc", which is a very
important file if you wish to burn installable filesets on a CD.
How do you solve this problem?
- Put all files you wish to store on a CD in a separate directory, like: /tmp/cd
- Create an ISO file of this directory. You'll need mkisofs to accomplish this. This is part of the AIX Toolbox for Linux. You can find it in /opt/freeware/bin.
# mkisofs -o /path/to/file.iso -r /tmp/cd
- This will create a file called file.iso. Make sure you have enough storage space.
- Transfer this file to a PC with a CD-writer in it.
- Burn this ISO file to CD using Easy CD Creator or Nero.
- The CD will be usable in any AIX CD-ROM drive.
If you wish to be able to access an HMC from the command line, without the need of logging in, you can use ssh (secure shell).
Set-up a secure shell connection to your HMC:
# ssh userid@hostname
You will have to enter a password to get into your HMC.
To allow your root user direct access to the HMC without the need of logging in, you'll have to update the
authorized_keys2 file in the
.ssh subdirectory of the home directory of your HMC user. There's a problem: a
regular user only gets a restricted shell on an HMC and therefore is unable to edit the
authorized_keys2 file in subdirectory
.ssh. In an HMC version 3 it is possible to disable the restricted shell for users by editing file
/opt/hsc/data/ssh/hmcsshrc. In an HMC version 4 and up you no longer get root access (except, you may get it, by contacting IBM), so you can no longer edit this file.
But there's another way to accomplish it.
Let's say your hmc user ID is
hmcuser and you were able to logon to the HMC called
hmcsystem using this ID and a password (like described above).
First, get a valid
authorized_keys2 file, that allows root at your current host access to the HMC. Place this file in
/tmp.
Then, use
scp to copy the
authorized_keys2 file to the HMC:
# scp /tmp/authorized_keys2 hmcuser@hmcsystem:~hmcuser/.ssh/authorized_keys2
[Enter your hmcuser's password, when required]
Now, just test if it works:
# ssh hmcuser@hmcsystem date
You should now be able to access the system without entering a password.
IBM License Use Management (LUM) is the IBM product for technical software license management deployed by most IBM use-based priced software products, such as the C Compiler.
More info on:
License Use Management
License Use Management - Library
How to copy a filesystem from one server to another:
Make sure you can execute a remote shell on the target host (by adding an entry of the source host in the /.rhosts file). Login to the source system as root and enter:
# (cd LOCAL_MOUNTPOINT && tar cpvBf - . ) | rsh REMOTEHOST 'cd REMOTE_MOUNTPOINT && tar xpvBf -'
For ssh, use the following command:
# tar -cf - myfiles | ssh user@host "umask 000 ; cat | tar -xpf -"
You might also have run into the problem that, when FTP'ing CD software on a Windows PC to a remote AIX system, files with lowercase names suddenly change to uppercase file names. This is how to copy the complete contents of a CD on a Red Hat Linux system to a remote AIX system as a tar file:
- Login as root on the Linux system.
- Mount the CD-ROM:
# mount /mnt/cdrom
# cd /mnt/cdrom
- Tar the contents:
# tar -cvf - . | ssh userid@hostname "cd /path/to/where/you/want/it/on/the/target/system ; cat > filename.tar"
- Unmount the CD-ROM:
# cd /
# umount /mnt/cdrom
Important note: make sure you can write with your user-ID in the target folder on the target system. Otherwise your tar file might end up in the home directory of the user-ID used.
First, install OpenSSH and OpenSSL on two UNIX servers, serverA and serverB. This works best using DSA keys and SSH2 by default as far as I can tell. All the other HOWTOs I've seen seem to deal with RSA keys and SSH1, and the instructions not surprisingly fail to work with SSH2.
On each server type ssh someserver.example.com and make a connection with your regular password. This will create a .ssh dir in your home directory with the proper permissions. On your primary server where you want your secret keys to live (let's say serverA), type:
# ssh-keygen -t dsa
This will prompt you for a secret passphrase. If this is your primary identity key, use an empty passphrase (which is not secure, but the easiest to work with). If this works right, you will get two files called id_dsa and id_dsa.pub in your .ssh dir.
Copy the id_dsa.pub file to the other host's .ssh dir with the name
authorized_keys2:
# scp ~/.ssh/id_dsa.pub serverB:.ssh/authorized_keys2
Now serverB is ready to accept your ssh key.
For a test, type:
# ssh serverB
This should let you in without typing a password or passphrase.
Hooray! You can ssh and scp all you want and not have to type any password or passphrase.
Number of results found: 469.
Displaying results: 281 - 290.