LXC, why you no have single executable?

Decided to play with LXC again.

Installation on Ubuntu
$ sudo apt-get install lxc

I tried to know what are the features of the software once installed. Usually I just type the command on my console and it is supposed to give the help and description or something.

root@nayar-laptop:~$ lxc
No command 'lxc' found, did you mean:
Command 'llc' from package 'llvm' (universe)
Command 'lc' from package 'mono-devel' (main)
Command 'axc' from package 'afnix' (universe)
Command 'lpc' from package 'lprng' (universe)
Command 'lpc' from package 'lpr' (universe)
Command 'lpc' from package 'cups-bsd' (main)
lxc: command not found

To find the appropriate commands to be used, have to find the executables in /usr/bin

$ ls /usr/bin/ | grep lxc

There I got all the executables I needed to know.

lxc-attach
lxc-autostart
lxc-cgroup
lxc-checkconfig
lxc-clone
lxc-config
lxc-console
lxc-create
lxc-destroy
lxc-device
lxc-execute
lxc-freeze
lxc-info
lxc-ls
lxc-monitor
lxc-snapshot
lxc-start
lxc-start-ephemeral
lxc-stop
lxc-unfreeze
lxc-unshare
lxc-usernsexec
lxc-wait

Or I could have done. Totally forgot that.
man lxc

I now gives all the details about the software. But I am used to have a single executable with the actions passed as parameters. Would it be better if lxc-info was like lxc info?

Docker has a single executable command to run. Anyways. Gotta play with LXC now.

HTML5: Labels

W3School has this code snippet for doing Checkboxes

The result is like this
I have a bike
I have a car

Problem is, people have to specifically click on the checkbox. Lazy people like me would like little cursor movement as possible. Use of labels[1] is important.

Now that I added label tags, click on the label and the checkbox gets activated. Same applies for Radio buttons


Installing AMD Radeon proprietary driver on Kubuntu

Trying the driver from AMD’s website, I got the following error message:

snapshot8

Log files said dh-modaliases was not installed.

# apt-get install dh-modaliases

Running the install script again:
snapshot8

Again failed. Said execstack not found. Grrr

apt-get install execstack

And then, it compiles with a single thread

snapshot8

I hate it when programs or not multithreaded :@

snapshot8

After compile it all, Lo! It’s old

snapshot8

Finally decided to try :-/

# apt-get install fglrx

snapshot8

Let’s try a reboot. Maybe it might solve it.

snapshot8

Yes it did!!!

New Mobile: Alcatel One Touch Pop D3

After more than 2 years of suffering with my LG Optimus L5, which is made by the evil himself, i finally bought another mobile. You might be thinking it must be the latest trendy one. But no. It is among the cheapest phone on the market right now. I bought it for Rs 3048. I’m totally satisfied with it.

Auto brightness
image
Yep. It has a light sensor integrated.

Camera
From the lock screen, i can just swipe left and the camera opens in less than 2-3 seconds. The camera quality is very usable. It is 5MP actually and also has a front VGA camera which can be used for video calls. Can’t be used for selfies though (not a fan of selfies anyways).
image

720p video recording
The rear camera can record codes videos by 1280x720p which is not bad at this price.

Dual Core 1.3GHz, 500MB
Moving from a 800MHz CPU in my old LG Optimus L5, i find this phone to be a breeze. Browsing the Web, launching apps, multi tasking is no issue. I remind you again that i was previously using the most crappy phone ever made. The RAM seems OK with Facebook, Gmail, whatsapp, KDE Connect, music running in the background while doing other stuffs in the foreground.

image

image

Lots of built in apps
The phone comes with a huge amount of bundlewares. They are not bad actually but i uninstalled most of them and disabled those that couldn’t be uninstalled. Thanks Android for adding the disable feature.

image

image

Charging light
When connected through USB, a small LED is lit. Can’t find a setting to disable it. Have to keep the mobile upside down at during charging.

snapshot1

 

Face unlock

I saw it got the Face unlock capability. Didn’t want to risk trying it for fear that i might not get back in :3

Verdict:
If you need a phone without anything fancy that is usable without slimming your wallet, I’d recommend this phone. 🙂

Secure Gate or Secure Safe?

Me, Nadim and Ish were having a little talk about how to store passwords in databases.

Traditionally, passwords for a user are hashed using an algorithm such as MD5 and SHA-1 and then the hash gets stored in the database. Since hashing is a 1 way function, you cannot have a function MD5-reversed for example in which you pass in the hash and it will give you the original password. However, using rainbow tables we can try to find the original password.

Another issue with this is that if an attacker gains access to the database, if 2 persons use the same passwords, the hashes will be the same.

The use of a salt passwords can help to make current pre-computed rainbow tables. Me and Nadim were this discussing whether each user should have a different salt or not? And should the salt also be stored in database?

I think the most secure way would be to have 1 common salt for all, 1 salt for each user and then run the hashing algorithm to get the hash to be stored in the database. The common salt should be stored in a text file so as the attacker having the database cannot have the common salt unless he has access to the server file-system itself.

Enter Ish Sookun
Ish was of opinion that if your system is secure enough, there is not need to secure and encrypt the database.

If the database has been configured to accept only the IP of the web server, all files have been rightly chmodded, only the needful php libraries are installed, if all unused ports are blocked correctly, it doesn’t matter whether passwords are stored even in plain text.

He says what’s the point of having a secure safe which cannot be broken if your front gate is open, doors are open, you have no camera in your house. Eventually, the ones who steal your safe will use grinders to open it!

On another extreme, if you have the most secure gate, it doesn’t matter if you walk naked inside and leave your money scattered everywhere on the floor since no one can get past your gate.

Conclusion
I don’t think all companies can have the funds to hire a System Administrator with the caliber of Ish Sookun. If all do, there is only 1 Ish.

Security should be multi-layer IMO. Because we never know when your main gate might be breached.

There was a time the Great Wall of China could be used to defend. But since drones and satellites were invented, all walls are basically useless nowadays.