Search This Blog


Friday, February 19, 2016

HowTo moving to Stack Exchange

For some time I've been using and posting 'How To' material to Stack Exchange. For now a few new topics to get ready for a short talk on opensource.

Thursday, January 2, 2014

HowTo Clean One Account, All of Google in Firefox

Add Greasemonkey to Firefox

Installing Greasemonkey Scripts

Google Account Chooser Cleaner

One account. All of Google.

We've remembered your account on this device to make your future sign-ins easier. Just enter your password to sign back in.
This is the new Google way, locking your account to a device and making it impractical to log onto multiple accounts on the same machine. Flushing the browser cache, history, and cookies doesn't clear it. Besides making gmail accounts difficult to use. Nowadays, one has to wonder the motives behind forcing a userid to a specific device.

The three steps listed above provide a method to clean this feature, and let you log out and log into different accounts.

Tuesday, July 9, 2013

How to Add a PPA to Ubuntu

How to Add a PPA to Ubuntu | OMG! Ubuntu!
Gitolite on Ubuntu: No admin key given

This adds the extra steps to bring in a ppa, install a new package, and reconfigure something like Gitolite3.

Replace ppa:snapy/ppa with your launchpad.
Replace gitolite3 with your package.

First, find a package you  want. I generally check to see if it's in the next release; easier to upgrade later.

From a terminal window:

    sudo add-apt-repository ppa:snapy/ppa
    sudo apt-get update
    sudo apt-cache gencaches
    apt-cache search gitolite3
    sudo apt-get install gitolite3

Then, after setup is finished, you can run the command sudo dpkg-reconfigure gitolite and it will prompt you to provide:
  1. The user which gitolite will use
  2. The directory which that user use to store all its files (gitolite config, gitolite managed repositories, etc)
  3. (And the most important) the public key of the user whom will be the first administrator in gitolite, which you may either put the public key (just a single line starts with ssh-rsa or path to the file which contains the public key)

Thursday, May 2, 2013

HowTo fix yum error: unpacking of archive failed on nfs4 directory.

Bug 210945 – yum update gives error: unpacking of archive failed on file /home: cpio: chown

My Jenkins yum updates on Fedora 18 have been failing for a while. Finally have a fix that works.

My /var/lib/jenkins directory is an NFS4 mount to a local server.
The first error on yum update was chown permissions. This was fixed by no_root_squash on the server.
To duplicate, from root try to do a chown in /var/lib/jenkins.

(fix no-permission problem)
On the local server:

/srv  *(rw,fsid=0,sync,nohide,crossmnt,insecure,no_subtree_check,no_root_squash)
/srv/jenkins *(rw,sync,nohide,insecure,no_subtree_check,no_root_squash)

The next error on chown/cpio was "invalid argument". There are some older threads about a kernel problem and null characters in uid/gid, another about nfs4 problems etc. The best fix becomes avoiding the problem :)

(fix chown invalid argument problem in yum)

%_netsharedpath /var/lib/jenkins

At this point rpm will ignore doing chown's and yum is happy.

You might do the second step first to fix the yum problem, but the no_root_squash fix may avoid other problems if that is how you are using your mounted directory.

Some say no_root_squash is a security problem, so either lock down what servers can mount your directory (change * in /etc/exports above), or avoid the problem with netsharedpath.

Monday, December 3, 2012

HowTo: Fix Fedora 17 FTP server on VM

vsftpd saying 500 OOPS: priv_sock_get_cmd (after update?..) (Page 1) / Networking, Server, and Protection / Arch Linux Forums

There is an obscure, non selinux, problem with Fedora vsftpd when running on a VM.

Below is a one line fix that will save you lots of debug time :)

The log file will report various selinux failures, but that is NOT the problem. The ftp sessions will get a few error messages, and be dropped from the server.

It occurs when running Fedora in a VM.

yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf
# Workaround for 500 OOPS: priv_sock_get_cmd

Friday, November 9, 2012

HowTo: Volume Control/Icon in Ubuntu 10.04

Volume Control/Icon is gone (Ubuntu 10.04)

The alsa sound driver, and volume control icon don't always work in 10.04.

First, You may have this, or may not, but the Volume Control needs to be running.

Click on System>Preferences>Startup Applications
Click +Add, then input:
Name: Volume Control
Command: gnome-volume-control-applet
Comment: Launch volume control applet

Next, The top bar panel needs the volume and login icon. It's done with something called Indicator.
(Someone else already asked why it's called "indicator" :) )

Right Click on Panel (Top Bar)
Click Indicator Applet
Click Add button

You may need to reboot to take effect.

Wednesday, November 7, 2012

HowTo: Restore an Ubuntu system with a bad kernel, broken network driver, unbootable system.

When you lose a network driver, or have a bad kernel for some reason, this will get you going.

You are starting a working system, then setting up the essentials to chroot into your broken system. The kernel, drivers and things you need are borrowed from the working system. Then you can reinstall packages, until it's working again.

First boot from a Live Ubuntu DVD/USB. Select Try without installing. Open a terminal, and follow the instructions in the Link. Your mileage may vary, I'll try an example with sda1 boot, and sda2 root filesystem.

 # Mount the root filesystem to /mnt
 mount /dev/sda2 /mnt
 # Check /mnt for a root filesystem (bin var etc ...)
 ls /mnt
 # Mount the boot partition to /mnt/boot
 mount /dev/sda1 /mnt/boot
 # Check /mnt/boot for kernels, if not, figure out where they are.
 ls /mnt/boot
 # Mount the system partitions from the Host OS.
 mount --bind /proc /mnt/proc
 mount --bind /sys /mnt/sys
 mount --bind /dev /mnt/dev
 # Chroot to your linux where everything works now...
 chroot /mnt
 # now you at / in your old linux.
 # set the environment
 mount -t devpts none /dev/pts
 export HOME=/root
 export LC_ALL=C
 # Verify you have a working network

At this point you can apt-get packages and fix your system.

--- after chroot
# See what kernels you already have.
ls /boot
# See what kernels you might want.

apt-cache search linux-image
# Depending on space in /boot, install an old and new one you might like
# An old generic one in the preempt list might not appear in the regular list
apt-get install linux-image-<2 .6.32-36=".6.32-36">-generic

You can fix about anything wrong with a bad system with this!