Primary Content: Home

Passwd: Authentication token manipulation error – Ubuntu

You probably encountered this error while trying to reset the password on a Ubuntu system.

root@u13-04:~# passwd nyuser

Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

This is the result of trying to work on a file system while mounted as read-only. The solution is a simple one. Before making changes to the users password mount the filesystem as read-write which allows for the necessary changes to be made.

mount -o rw,remount /

Now try to change the users passwords again.

root@u13-04:~# passwd nyuser

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Can Not Add SSH Key To Ubuntu

4/17/16 – Fixed formatting.

I wanted to add an SSH key to a new minimal Debian VM install, but attempting to add the key resulted in a No such file or directory error.

sudo cat id_rsa.pub >> .ssh/authorized_keys
cat: id_rsa.pub: No such file or directory

The error was the result of the non-existent authorized_keys file which is where SSH key happens to be stored.

If we look inside the ~/.ssh directory you will notice the missing authorized_keys file.

ls ~/.ssh
known_hosts

To be able to store the SSH key create the missing authorized_keys in the right location and with the right permission.

Move to the directory where key files are stored for the user.

cd ~/.ssh

Create necessary file.

touch authorized_keys

Assign permission to file.

chmod 600 authorized_keys

Copy SSH key to authorized_keys file.

cat id_rsa.pub >> .ssh/authorized_keys

Optional, but I recommend removing the key since it’s no longer needed.

rm id_rsa.pub

Restart the service.

sudo service ssh restart

How to Print on an Envelope with LibreOffice

Printing on an envelope with LibreOffice is actually easy, the hardest part being handling the envelope after printing is done.

Here’s what you will need:

  • LibreOffice Writer
  • Regular envelop(mine is a type #10)
  • Printer(Mine is a Samsung laser printer)

Obviously before starting the the tutorial insert the envelope on your printer paper tray, the position may vary depending on your printer. In my printer the envelopes are loaded sideways. Also keep in mind that laser printers will warm the envelope glue which will become somewhat sticky, just make sure that once the envelope is out of the printer you separate the flap to prevent it from sticking to the envelope permanently.

Printing on Envelopes

Open LibreOffice Writer and click on Insert > Envelope

A new window opens. There are two boxes where you will input the typical information that goes into an envelope. The Addressee information goes on the top and the sender information on the bottom.

On the top of the window click on the Format tab, this tab allows you to select the envelope type. Note: In my case I use envelope type #10 commonly received in the mail.

Change any field you consider necessary. When done click on Insert. This will insert the envelope information into a document.

Now you can once again review the information(again), if you spot any mistakes you can still make changes. If everything is accurate click on the Printer icon to print the information in the envelope.

And here is the result.

If you have any comments use the section below to leave one. Thank you.

SSH Permission Denied (publickey)

Had a peculiar problem last week where the computer at home I use to pull backups from a remote VPS could not longer SSH into the remote system.

user@deb7h:~$ ./vps-01-backup-www.sh
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9]

After looking at directory permissions on both systems and user credentials as the possible source of the problem I came across this post where it recommends that permission for the private key file be set to 600.

chmod 600 ~/.ssh/id_rsa

The change in permission worked, perhaps the file had too high of a permission number which in not allowed.

As to how this happen I have no idea, but I probably must have carelessly changed the permission at some point. This happen in a Debian Wheezy system.

How to Split Files with the Split command in Linux

Split is a useful Linux command used to split files into chunks of various sizes. The Split command is a straight forward utility all you do is specify the target size of each chunk in bytes (-b) followed by the name of the file to be split.

split -b 200m -d ubuntu-12.04.2-server-amd64.iso

The 657MB Ubuntu ISO was split into four chunks. Notice the incremental numbering.

x00  x01  x02  x03

To join all the files back together we use another utility, cat will look for all files starting with X*, regroup them, and output the results in to the file ubuntu-12.04.2-server-amd64.iso.

cat x* > ubuntu-12.04.2-server-amd64.iso

Split is a simple utility that can split files of any size into more manageable chunks. I regularly use split when I am forced to download files over unreliable connections and with no possibility of transfering with Rsync.

Reference

http://linux.die.net/man/1/split

Artic Alumina Thermal Paste

You know I was skeptical when I bought a cheap tube of Artic Alumina thermal paste from Newegg.com for around 4 dollars (shipping included). But after using it on a older Intel E3200 CPU I’m quite pleased with what I received for the four bucks, the temperatures on the CPU with Artic Alumina and the stock heat sink stay at around 38 to 42°C under load.

By the way I had re-seat the E3200 due to dust accumulation (yeah, it was that bad).

If you are looking for cheap thermal paste, the Artic Alumina seems to be a good buy, you’ll probably get around two applications from the tube.