How to reset your Linux Password

If you’ve ever forgotten your Linux password, chances are you’ve needed to either restore your Linux installation.  Hopefully this solution will save you from having to reinstall Linux in the event that you forget your password.

Reset your Linux password using Grub:

When your machine boots into Grub, you’ll want to press “e” to edit the grub boot linux.

After pressing “e”, navigate to the kernel line and add the word “single” to the end of the long string.

Press “b” to boot into single user mode.

You should then be taken directly to a root user shell, where you can then type passwd, and change your root password.

After you’ve reset your root password, type reboot at the shell to leave single user mode.

How to configure synergy on Mac OSX and Windows XP

At the office I use both my Macbook Pro running OSX 10.6.3 and a Windows XP box side by side, each with separate monitors.  In the beginning I would use my Mac as my primary desktop, and VNC into my XP machine to avoid using two keyboards and mice.  This configuration worked well, but was a pain to have to open VNC to control my Windows XP desktop.  Then I discovered synergy+ which allowed me to use only one keyboard and mouse, and control both screens as if they were one machine, moving the mouse freely to each one as if I had dual monitors. From the synergy+ website:

Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It’s intended for users with multiple computers, where each system uses its own display. It’s a little like having a 2nd or a 3rd desktop…

How to configure synergy on Mac OSX

I’m running the synergy+ server on Mac OSX 10.6.3, since that is my primary machine.

First, download synergy+ for the Mac, then download synergy+ again on the Windows machine.

Once installed on both machines, you will need to create a synergy configuration file on the server (Mac).  Here is what mine looks like:

section: screens
alt = super
super = alt
section: links
right = windows-workstation
left = macbook-pro.local

The config file is pretty straight forward. The first section, called screens, is where you list the hostnames (computer names) for screen1 and screen2, in this case, my macbook-pro is screen1, and my windows workstation is screen2.  The alt=super and super=alt lines are two tricks I found that will allow the Windows key on my keyboard to function properly.  In the next section, called links, you define the layout of the two screens. In my config, my macbook screen is on the left, and my windows machine is on the right, as you can see defined in the config above.

Save the config file as synergy.conf and place it anywhere you’d like.

Now that you have the synergy server configured, you need to start it.  Open a terminal, and run the following command:

synergys -f --config /path/to/synergy.conf

The -f option will run the synergy server in the foreground, in case you need to debug anything.

How to connect to your new Mac OSX synergy server from Windows

Now that you have the synergy server running on your mac, you need to connect to it via the synergy application in Windows.

If you didn’t do it in the earlier step, download synergy+ for Windows and install it.

Next, open Synergy+ and select “Use another computer’s shared keyboard and mouse (client)” and type in the IP or hostname of your mac and click Start.

If all steps were followed correctly, you should now be sharing the keyboard and mouse, and should be able to move your mouse to each screen as if you had a dual monitor setup.

Start synergy server when a user logs in

The last thing you’ll want to do is to make sure synergy starts every time you log in. To do this, you’ll want to create a LoginHook

First, launch a terminal window and become root:

sudo su -

Create a folder to store your LoginHook script:

mkdir -p /Library/LoginWindow

In this folder, create a file called that contains the following text:

prog=(/usr/local/bin/synergys --config /path/to/synergy.conf)

### Stop any currently running Synergy client
killall ${prog[0]##*/}

### Start the new client
exec "${prog[@]}"

Make sure the script is executable:

chmod 755

Now create the actual login hook that will call the script we just created:
defaults write LoginHook /Library/LoginWindow/

That’s it! Next time you log into your mac, the synergy server will start, and your windows machine should connect.

Linux Malware – Proof that Linux is not as secure as we all think

There was an interesting post on Ask Slashdot discussing the ethics of releasing non-malicious Linux malware to simply prove a point to all of the people who rant and rave about Linux being so secure.  A developer by the name of buchner.johannes

buchner.johannes writes:

“I was fed up with the general consensus that Linux is oh-so-secure and has no malware. After a week of work, I finished a package of malware for Unix/Linux. Its whole purpose is to help white-hat hackers point out that a Linux system can be turned into a botnet client by simply downloading BOINC and attaching it to a user account to help scientific projects. The malware does not exploit any security holes, only loose security configurations and mindless execution of unverified downloads. I tested it to be injected by a PHP script (even circumventing safe mode), so that the Web server runs it; I even got a proxy server that injects it into shell scripts and makefiles in tarballs on the fly, and adds onto Windows executables for execution in Wine. If executed by the user, the malware can persist itself in cron, bashrc and other files. The aim of the exercise was to provide a payload so security people can ‘pwn’ systems to show security holes, without doing harm (such as deleting files or disrupting normal operation). But now I am unsure of whether it is ethically OK to release this toolkit, which, by ripping out the BOINC payload and putting in something really evil, could be turned into proper Linux malware. On the one hand, the way it persists itself in autostart is really nasty, and that is not really a security hole that can be fixed. On the other hand, such a script can be written by anyone else too, and it would be useful to show people why you need SELinux on a server, and why verifying the source of downloads (checksums through trusted channels) is necessary. Technically, it is a nice piece, but should I release it? I don’t want to turn the Linux desktop into Windows, hence I’m slightly leaning towards not releasing it. What does your ethics say about releasing such grayware?”

This is a great thing for the community at large to see that Linux can be exploited with malware just like it’s rival operating systems.  However, I share the same concerns the developer does.  This indeed could result in a black-hat user injecting something malicious into the code and actually turning the example into real evil malware. I’m on the fence though, maybe this is what Linux users need to prove that we aren’t like typical Windows users who click any random link and download any random software from any random untrusted third-party site.  A user who goes by the name of silentcoder wrote: “Linux users (hardly ever) download and install software from the internet. We download and install packages from repositories. The average user simply cannot tell the difference between a useful piece of freeware and a bugridden-malware-spreading piece of add-ware.”

Paranoia aside, this definitely proves that Linux is just as susceptible to malware and viruses as any other operating system.  But, as I’ve always said, viruses and malware are usually a result of user error, no matter the operating system.

What do you all think, should this type of code be released as proof of concept even if it’s risking malicious manipulation?  Should we all just start using SELinux and be done with it?

Must have Linux books for Christmas

The gift giving season is right around the corner and if you have any geeky relatives or friends, then this list of Linux books to buy for Christmas is a good reference.  Click each image to find out more.

Linux Bible 2010 Edition: Boot Up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 13 Other Distributions

Linux Administration: A Beginner’s Guide, Fifth Edition

Practical Guide to Linux Commands, Editors, and Shell Programming

How Linux Works: What Every Superuser Should Know

Linux Command Line and Shell Scripting Bible

Linux System Administration

Beginning the Linux Command Line

Pro Linux System Administration

Linux Security Cookbook

Hardening Linux

7 Must Have Linux iPhone Applications

If you’re anything like me and love tech gadgets that allow you to do almost anything..then you undoubtedly own an iPhone.  For the past year of being an iPhone owner, I’ve discovered a ton of iPhone apps that help me in my every day life.  Many of them are Linux apps.  Below you will find a list I’ve put together of must have Linux iPhone apps for you to check out.

Linux Command Reference (FREE) – This iPhone app is a handy command reference for the Linux Terminal.  Perfect for situations when you need to reference a command but you’re in the server room without your computer.

LinuxTube – This app allows you to view Linux related videos as well as chat with other Linux enthusiasts.

Server Remote – Easily monitor your Linux server from your iPhone.  This iPhone application uses the standard SSH protocol to communicate with your servers, and requires no special software to be installed on the server end.

SSH – The best SSH client I’ve found in the iPhone app store. It works over Wi-Fi, Edge, and 3G networks.

Chmod (FREE) – Very simple and straight forward reference app for determining file and directory permissions on Mac OS X, Linux and Unix.

Vi Reference – A great reference for those of us who use Vi/Vim.

UNIX Fortune – For those old school nix users, this is the entertaining fortune cookie application converted to an iPhone app.

Hopefully these Linux iPhone apps save you a little bit of time, or just provide some good old fashion entertainment, like they have me.

Do you know of any other iPhone apps available that should be added to this list? Let us know in the comments!

40 Years of Unix – A Timeline

Gary Anthes over at Computer World has a great time line of Unix from start to present.

Ever wonder about how Unix got started, not to mention all the twists and turns it took along the way? Here are some milestones of the operating system’s four-decade-long history.

Here is one I think is pretty significant:

1973 – Unix matures. The “pipe,” a mechanism for sharing information between two programs, which will influence operating systems for decades, is added to Unix. Unix is rewritten from assembler into C.

Read more..

I’m Linux

By now we’ve all seen the “I’m a PC” and “I’m a mac” ad’s on the TV and on the Internet.  Now the Linux Foundation is holding a contest and getting community members to submit their best “I’m Linux” videos and picking a winner which will be revealed in April.  Some of the videos are actually pretty cool.

Here are a few of my favorites:

For more videos and details go here.

Can Linux Save the IT Industry in this Econmic Downturn?

Over at Internet News Sean Kerner writes that the IT industry is turning to Linux in our current economic downturn.

A new report out today from IDC, sponsored by Linux vendor Novell indicates that the current economic downturn is a good thing for Linux adoption. with more than half of the IT executives surveyed planning to accelerate Linux adoption in 2009… According to IDC, in a poll of 300 IT professionals more than 72 percent reported that, “they are either actively evaluating or have already decided to increase their adoption of Linux on the server in 2009.”

I’m sure most of our readers have heard that Linux, as well as open source, is a great option during times of economic stress.  Companies and even every day users are turning to cheaper and free alternatives to expensive software and operating systems and Linux is just the right place to turn.

This is a great thing for Linux, even though it sucks for our current state of the economy.  Let’s just hope Linux can prove worthy and benefit in these tough times.

Read the full article here.

15 Facts About the Linux Kernel

Celebrating the 15 year anniversary of the Linux 1.0.0 kernel, Junauza posted a list of 15 cool facts about the Linux kernel.  Here are a few of my favorites:

- An asteroid was named after the creator of the Linux kernel.

- According to a study funded by the European Union, the estimated cost to redevelop the most recent kernel versions would be at $1.14 billion USD.

- Linux kernel 1.0.0 was released with 176,250 lines of code. The latest Linux kernel has over 10 million lines of code.

- The Linux kernel can be found on more than 87% of systems on the world’s Top 500 supercomputers.

Read the full article here.

Linux For The Masses: Are We There Yet?

LinuxHaxor recently wrote a blog post discussing how every year hundreds of writers come out of the woodwork to discuss how “this is the year for Linux” or that Linux is finally ready for the masses.

Every year, every major Linux development, every major distribution release sparks a volley of so-called expert opinion of this being finally the year of the Linux. As they provide arguments and counter-arguments over certain news of Dell/HP/IBM/Asus releasing pre-installed Linux computer; and how this will single-handedly fix every problems and finally allow Linux to take over the world.

I agree that these “expert opinions” do always contain the suggestion that this could finally be the year Linux launches into a much higher stratosphere and knocks out major competition.  However, most of these “expert opinion” articles that I read every year, or every major release, mainly focus on how Linux is getting closer to becoming a much better operating system than the competition has to offer.  Isn’t that all that really matters?

As another year is coming to an end, and another major distribution is around the corner; this might be a good time to remind everyone how next year will not be much different from this year. It took years and years of dedication and innovation for MacOS to finally reach 8% market share. Depending on your level of cynicism, Linux Desktop market share is at somewhere around 1%-5% (being generous).

Sure, lets stop looking at every single Linux advancement or breakthrough with the “this is it! we’ve done it” mentality, I can agree with that.  But really, if you look at the facts, 2008 was a great year for Linux.  In fact, the past five years have been “the year of the Linux“.  Linux will continue to grow over time.  After all, Linux is an open source operating system.  Anyone can contribute, anytime, and the number of contributors continues to grow every year.  Eventually these developers will have worked out all the pesky kinks that stop most users from switching to Linux. It’s really only a matter of time before the mainstream users decide to make the switch to the Linux operating system they keep hearing more and more about.