Vim commnads.

You can save a lot of time when navigating through text by using appropriate movement commands.
Here are some basic commands:

e Move to the end of a word.

w Move forward to the beginning of a word.

3w Move forward three words.

b Move backward to the beginning of a word.

3b Move backward three words.

$ Move to the end of the line.

0 Move to the beginning of the line.

^ Move to the first non-blank character of the line.

) Jump forward one sentence.

( Jump backward one sentence.

} Jump forward one paragraph.

{ Jump backward one paragraph.

H Jump to the top of the screen.

M Jump to the middle of the screen.

L Jump to the bottom of the screen.

20 or 20 Move 20 pages up.

10 or 10 Move 10 pages down.

G Jump to end of file.

1G Jump to beginning of file the same as gg.

10G Jump to line 10.

'm Jump to the beginning of the line of mark m.

`m Jump to the cursor position of mark m.

'' Return to the line where the cursor was before the latest jump.

`` Return to the cursor position before the latest jump.

% Jump to corresponding item, e.g. from an open brace to its matching closing brace.

Source link

Ubuntu, Citrix, and SSL-error 61

I just attempted to install the newest Linux Citrix ICA client on my machine, and upon a successful install, an error similar to this one popped up when trying to run the client from Firefox:

SSL error
Contact your help desk with the following information:
ble, ble ...
the issue of the server's security certificate (SSL error 61).

The solution is to make Firefox’s certificates accessible to Citrix, like so:


sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts

I didn’t test it on the Debian yet.

Accessing GroupWise User Accounts.

Is it possible to access someone’s account without user knowing? Yes, it is possible.
This is a easy way:

1. Go to ConsoleOne, right-click the user object then click Properties.
2. Click GroupWise > Account to display the Account page.
3. Fill out the field "LDAP-Authentication:", use an Account with a
known password i.E.
"cn=admin,o=company,c=ie"
4. Click Ok/Apply

Now you can use the password from “cn=admin” to login as the user.

Grep is your friend :-)

Let’s say you have a running server and you notice that something in the server is not working well, so you want to search a log file for errors:

grep "error" somelogfile.log

This returned no results. This could be because grep being case-sensitive, let’s add the case-insensitivity flag:

grep –i "error" somelogfile.log

If the word “error” in any casing appears in the log file, you’ll see the relevant lines in the console. This is not the only way for the program to inform you there’s a problem, there are other words which might be relevant. You don’t want to search for them one by one:

grep –Ei "error|blocked|panic" somelogfile.log

The “E” flag indicates the use of regular expressions, which will allow you to use the pipe sign, dollar sign and other useful regex.

Now, you finally get the result you wanted, but you can only see one line of it and you want to know what it’s all about, so you can do this:

grep –A 10 –B 20 "Error" somelogfile.log

Mounting a NetWare volume on a Linux box

To mount a NetWare volume on a Linux box, the ncpfs must to be installed on a Linux box.
For a “rpm” distribution:

yum install ncpfs

For a “deb” distribution:

apt-get install ncpfs

then try mount the volume on the Linux box:

ncpmount -A 192.168.1.25 -S name_of_netware_server -V volumin_to_mount -U username.context -P password /mnt

to add this to /etc/fstab please use the following:

nbcs_data_server/xxhr.genacc.ndsadmin /share/Shared/XXHR/EBSPROD ncp volume=data/Shared/XXHR/EBSPROD,uid=ebsprod,gid=dba,mode=660,owner=root,A=nbcs_gisdata_server,passwdfile=/etc/edirpass 0 0

and create an edirpass password file in /etc/edirpass

echo "nbcs_gisdata_server/xxhr.genacc.ndsadmin:password" >> /etc/edirpass

Broken Grub menu – Debian.

Broken Grub menu: boot to the menu, drop to a consloe and boot Debian direct.
Sometimes the only thing that works when you boot is the Grub menu appears on your screen.
When you see Grub’s boot menu on your screen, instead fo selecting a boot item, press the “c” key.
That brings up a messages like this:

GNU GRUB version 1.99-14
Minimal BASH-like line editing is supported. For the firs word,
TAB lists possible command completions. Anywhere else TAB lists
posssible device or file completions. ESC at any time exits.

grub>

Now carry out the following commands at the grub prompt:

grub> search.file /sbin/init
hd0,msdos1
grub> search.file /boot/grub/device.map
hd0,msdos1
grub> search.file /vmlinuz
hd0,msdos1

Whatever you use, will ok. What we looking for is:
– Grub pointer to my Debian installation on drive number 1, partition number 1, your pointer
will be different from my example (hd0,msdos1)
– UUID assigned to this partition 625b756b-737e-4502-a914-9d351d50603a


grub> ls (hd0,msdos1)
Partition hd0,msdos1: Filesystem type ext2 - Last modification time
2012-01-11 10:57:44 Wednesday, UUID 625b756b-737e-4502-a914-9d351d50603a -
Partition start at 2048 - Total size 40134656 sectros
grub> set root='(hd0,msdos1)'
grub> linux /boot/vmlinuz-{press TAB key}
Possible files are:
vmlinuz-2.6.32-5-686 vmlinuz-3.2.0-1-686-pae
grub> linux /boot/vmlinuz-3.2.0-1-686-pae ro root=UUID=625b756b-737e-4502-a914-9d351d50603a
grub> initrd /boot/initrd.img-{press TAB key}
Possible files are:

initrd.img-2.6.32-5-686 initrd.img-3.2.0-1-686-pae
grub> initrd /boot/initrd.img-3.2.0-1-686-pae
grub> boot

and the machine boots 🙂

Yum local repository to be able to access a CDROM/DVD iso.

You do not have access to the network and you would like to install some packages from CDROM/DVD, please follow the instructions:

First take a backup of /etc/yum.repos.d/ then remove these repo files:
CentOS-Base.repo, CentOS-Debuginfo.repo and CentOS-Media.repo
and add a new file called CentOS_local.repo with the following lines:

[root@localhost yum.repos.d]# cat CentosOS_local.repo
[dvd]
name=Centos DVD
baseurl=file:///media #mount location
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]#

Here baseurl=file:///media is the location of CentOS iso. Now you have to mount your CentOS iso into the media folder:

[root@localhost]# mount /dev/cdrom /media

Once this is done, you can go ahead with yum to install packages from CD/DVD.

RAID in Linux, using mdadm in Linux.

Linux software RAID has nothing to do with hardware RAID controllers. You don’t need an add-on controller, and you don’t need the onboard controllers that come on most motherboards.

The RAID  devices  are virtual devices created from two or more real block devices. This allows multiple devices (typically disk drives or partitions thereof) to be combined into a single device to hold (for example) a single filesystem.
Some RAID levels include redundancy and  so  can  survive some degree of device failure.

Currently, Linux supports LINEAR md devices, RAID0 (striping), RAID1 (mirroring), RAID4, RAID5, RAID6, RAID10, MULTIPATH, FAULTY, and CONTAINER.
Continue reading “RAID in Linux, using mdadm in Linux.”