Saturday, July 26, 2008

linux:ssh:kerberos

Installing proper kereros and connecting with fermilab by ssh are always a bit tricky. Sometimes it needs old version openssh, sometimes it needs more... I don't know. One guy from Fermilab has a post talking about his experience based on ubuntu:

http://ubuntuforums.org/showthread.php?t=486284

I didn't follow his steps (since I just installed a new system, I need to install what I need). The basic idea is:

  • install openssh (I installed newest one)
  • install krb5
  • sudo apt-get install krb5-user
  • copy configure file (/etc/krb5.conf) from any computer of fermilab to your local computer (in the same location)
then you could connect !

Although you could connect, please make sure you have right parameters both in ssh_config and sshd_config due to Fermilab security policy. I have a problem with it (once log in to one computer of clued0, I type klist, nothing found). I got the solution from kerberos-users of fnal:
===
Make sure your SSH client configuration in ssh_config (usually in /etc/ssh/)
contains the lines

GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
===

Computer:laptop: buy a new laptop, Lenovo T61

Yesterday I got my new laptop: Lenovo thinkpad T61. I am a thinkpad fan and always crazy about its classic design. IBM thinkpad was gone for ever while this branch was sold to Lenovo. My old one is thinkpad T41 following me for more than 4 years. Until now it is still very stable even after several strong damages by my honey heart (you know what this means :-) ). Before it was acted by falling down, I made an order to my new one: T61, yes, Lenovo T61.

Looking: thicker than T41. I guess designers wanna better air flow... although T41 is also very good in emiting heats unlike some other brands (the name beginning with 'com', you know this ;-p) which can be able to be a good heater in winter. Of course, the computer is very solid in looking, feeling and essence.

Layout: I may take a while to be used it. The new layout seems better. for example, mic slot is closer to your ears, more USBs, _shielded_ top light (previous one has a light too, but it is facing your eyes when you looked at it)...

....

Tuesday, July 8, 2008

Shell:Bash:replace substring in string

${string/substring/replacement} Replace first match of $substring with $replacement
${string//substring/replacement} Replace all matches of $substring with $replacement
${string/#substring/replacement} If $substring matches front end of $string, substitute $replacement for $substring
${string/%substring/replacement} If $substring matches back end of $string, substitute $replacement for $substring


Refer to the link for more information.

Locations of visitors to this page