Monthly Archives: September 2013

Booting Raspbian from USB

As I did not have a 2GB SD card lying around, I decided to look up if it was possible to boot from a combination of an SD card and USB. From my readings, it appears that this is a good idea too. SD Cards have a very limited life, it appears.

After digging through several tutorials, I found this one that’ll work well on Linux. I’ve yet to try it out (waiting for Rasbian to download), but I’m pretty sure this one will work.

Learning about Networking

I’m stumped. I’ve hit a wall and this one’s an old one. Back in the day when I was taking networking courses, I always had a sinking feeling whenever my instructor started on this topic. Today as I struggle with mastering linux, I’ve hit the same wall, but this time I hope to bust through it.

Here’s the course I’m going through. Hope it helps you somewhere!

http://www.trainsignal.com/course/141/tcpip-and-networking-fundamentals

The actual videos are linked from this page.

Learning about Networking

I’m stumped. I’ve hit a wall and this one’s an old one. Back in the day when I was taking networking courses, I always had a sinking feeling whenever my instructor started on this topic. Today as I struggle with mastering linux, I’ve hit the same wall, but this time I hope to bust through it.

Here’s the course I’m going through. Hope it helps you somewhere!

http://www.trainsignal.com/course/141/tcpip-and-networking-fundamentals

SSH without a password

I’m working my way through the Debian Administrator’s manual and came across an amazing tidbit of information about ssh: you don’t need to enter your password all-the-bloody-time! Now, I’ve been using ssh for almost 2 years and never bothered to go through the man file, so I was pleasantly surprised, and made a note to look it up.

And I did. And it was bloody simple! In a moment, I’ll share it with you, but frankly, that’s one thing about linux – you’re always learning. I’ve fiddling with it for 2 years and I still feel like I’m a hack, a n00b! That’s the bad part, but the good part is, I think I know a lot more about the innards of linux than I did of Windows.

So, here’s the how bit.

$ssh-keygen

Run this on the machine you want to ssh in from. Your public and private keys will be generated and stored into the .ssh folder in your home directory (i.e. ~/.ssh). The relevant file is id_rsa.pub – this is your public key. Now, on your destination server, the one you want to ssh into, you add should the contents of this file to the ~/.ssh/authorized_keys file.

In short, append the remote id_rsa.pub to host authorized_keys file.

In my case I had no authorized_keys file, so I copied the id_rsa.pub file and renamed it to authorized_keys.

If you don’t have a .ssh folder, in your home directory, don’t hesitate to create the folder.

To test it out, I then tried a new ssh connection and voila, no password prompt.

In cases where this doesn’t work there are a few things that must be in order, so do look at the manpage for ssh or ping me in case you run into issues. And I think it’s in cases where it doesn’t work, that you learn the most!

SSH without a password

I’m working my way through the Debian Administrator’s manual and came across an amazing tidbit of information about ssh: you don’t need to enter your password all-the-bloody-time! Now, I’ve been using ssh for almost 2 years and never bothered to go through the man file, so I was pleasantly surprised, and made a note to look it up.

And I did. And it was bloody simple! In a moment, I’ll share it with you, but frankly, that’s one thing about linux – you’re always learning. I’ve fiddling with it for 2 years and I still feel like I’m a hack, a n00b! That’s the bad part, but the good part is, I think I know a lot more about the innards of linux than I did of Windows.

So, here’s the how bit.

$ssh-keygen

Run this on the machine you want to ssh in from. Your public and private keys will be generated and stored into the .ssh folder in your home directory (i.e. ~/.ssh). The relevant file is id_rsa.pub – this is your public key. Now, on your destination server, the one you want to ssh into, you add should the contents of this file to the ~/.ssh/authorized_keys file.

In short, append the remote id_rsa.pub to host authorized_keys file.

In my case I had no authorized_keys file, so I copied the id_rsa.pub file and renamed it to authorized_keys.

To test it out, I then tried a new ssh connection and voila, no password prompt.

In cases where this doesn’t work there are a few things that must be in order, so do look at the manpage for ssh or ping me in case you run into issues. And I think it’s in cases where it doesn’t work, that you learn the most!

Minidlna Tip

When using minidlna, you’ll often run into a situation where the damn database is out of date. To figure out where your database is, linux users should look in the /etc/minidlna.conf file.

cat /etc/minidlna.conf | grep db_dir

The command above will show you where the database is located. InĀ  my case it’s /var/lib/minidlna

So, if you want to avoid a screw-up and issues with this database, the command to run is

sudo -u minidlna minidlna -R

What that does is runs the command "minidlna -R" as the user minidlna. By default minidlna runs under this account. Refer the the minidlna.conf file in case you find that the database runs under another account. Hopefully this’ll save you some pain.

Minidlna rocks. I’ve got to get around to getting the transcode op running. Getting better with linux, but still a way away.

India and Privacy

If you think the NSA’s record on personal privacy is bad, I think the Indian government should raise your hackles. Everywhere I turn, I see erosion of privacy.

In the papers today the Vaishno Devi board proudly touts the fact that they’ll be implementing a system to create a database all pilgrims who visit Vaishno Devi. It will include their photographs and personal data.

Additionally, police blame WhatsApp as the technology that allowed circulation of a video that they claim incited violence. I guess it’ll be monitored soon.

In addition, the government has been rolling out a Unique ID program, known as Aadhar. So, now in addition to your address proof, your id proof, and lord knows what else, you’ll need an Aadhar ID too. And the scary part is that despite the Aadhar program being labeled "optional"(voluntary), the government is proceeding with making it mandatory for various services.

Gas subsidy is now linked to Aadhar, among other services, despite the fact that the government has been notified by the courts that doing so is unconstitutional. However, such details don’t seem to bother the current government, and frankly, with the choices of political parties in India, and the general apathy, who cares?

More madness as reported by Usha Ramanathan.