Friday 20 January 2012

Manual OpenSSH install breaks X11 forwarding (xauth)

Well, after much searching why X11 forwarding was broken when I installed latest OpenSSH from source on ubuntu, I had hit a blank. xauth was installed, sshd was pointing to it, -vvv showed up nothing.
Well, it turned out I had just done the usual configure --prefix=/usr and the install had put all the defaults in /usr/etc/ssh without X11Forwarding being set!

Note to self - make sure you put --syscondir=/etc/ssh as well!!

Without ssh forwarding working properly, stuff like NX just doesn't work.

Wednesday 4 May 2011

Installing Clearcase/Clearquest on Ubuntu 10.04

Just a couple of pointers if you ever need to install CC/CQ 7.1.2.02  on ubuntu 10.04.
First and foremost, their instructions for installing CC on a 64 bit system are missing a vital step. They tell you to install the 32 bit compat libraries (fair enough) and libstdc++5 amongst other things. Well, libstdc++5 is no longer available with 10.04 so they messed up there (and their binaries are built against it). Just follow the instructions at http://www.hackourlife.com/ubuntu-10-04-lucid-lynx-libstdc-so-5/ for how to get around the problem. Easy enough really.
Now, CQ. Set up your repositories from the IBM Installation manager with the patch as well but there are a few issues you’'ve got to be aware of. Firstly, the install fails because it can’t install gsk7bas-7.0-4.11.i386.rpm. Well, it’s a debian system so that would be correct.
Anyway, it does come with rpm but you have got to make sure you do a …...
sudo rpm –rebuilddb

first. That still won'’t get you out of the woods as installing an rpm on ubuntu/debian requires the use of –--force-debian
So ...
sudo bash
cd /usr/bin
mv rpm rpm.real
cat > rpm << EOF
#!/bin/bash
# Wrapper script to force RPM installs on Debian based systems
/usr/bin/rpm.real --force-debian $*
EOF
chmod 755 rpm
 
and then try the install again.
Well, it seems to work, but I can’t tell until I have a license server :)

Thursday 21 April 2011

Re-installing vmware modules on linux

This took me a little while to find. If you start up vmplayer after a reboot and the vmware kernel modules are missing viz. not loaded, the easiest way to solve this is :-

sudo vmware-modconfig --console --install-all

You should get something like ...

Stopping VMware services:
   VMware USB Arbitrator                                               done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Installed vmmon pre-built module
Installed vmnet pre-built module
Installed vmblock pre-built module
Installed vmci pre-built module
Installed vsock pre-built module
Starting VMware services:
   VMware USB Arbitrator                                               done
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   Shared Memory Available                                             done


Changing the username, UID and GID default rules on linux

I always forget this one but certain companies I work for have a username, UID standard which doesn't comply with the POSIX norm.
I've seen several people on forums saying they have hacked the tools to accomplish this but there is no need. Just edit /etc/login.defs

BTW, to see what files useradd looks at, just use :-

strace -e trace=file useradd somebody

Forcing ethernet duplex and speed during startup on linux (Suse)

a) Modify /etc/sysconfig/network/config file to have
  following options set to 'yes'.

GLOBAL_POST_UP_EXEC="yes"
GLOBAL_PRE_DOWN_EXEC="yes"

b) Create a script file (E.g, ethtool-settings) in
  /etc/sysconfig/network/if-up.d directory with required ethtool commands.

E.g, the file can contain the following ethtool command -

  /usr/sbin/ethtool -s ethX speed 10

c) Set the mode of the file to 755.
#chmod +755 ethtool-settings

Converting java JKS key store DER format to PEM

openssl x509 -out ca.pem -outform pem -text -in ca.der -inform der

after extracting using keytool obviously.

Also see http://mark.foster.cc/kb/cacert-keystore-extraction.html

Syncing a clearcase view with a changed stream

cleartool chstream -gen viewname
cleartool setcs -stream