≡ Menu

linux user

Download Of The Day: Firefox 13 – Linux / Windows / Mac OS X

Firefox version 13.0 has been released and available for download. Firefox 13.0 is the fastest and smartest web browser. You will see new tab and home page user interface. The Home Page now includes icons at the bottom of the page to give you easy access to bookmarks, history, settings, add-ons, downloads and sync preferences with one-click shortcuts. This version is a major upgrade and includes features such as updated developer tools, SPDY, and few other updates.
[click to continue…]

Linux / UNIX Desktop Fun: Let it Snow On Your Desktop

Feeling lonely this holiday season? Try Xsnow. This little app will let it snow on the Unix / Linux desktop. Santa and his reindeer will complete your festive season feeling with moving snowflakes on your desktop, with Santa Claus running all over the screen.
[click to continue…]

BBC's Rory Cellan-Jones: Not Happy With Ubuntu Linux

BBC’s blogger Rory Cellan-Jones took Ubuntu Karmic Koala for 24 hours test drive and predicated that – “… Ubuntu will remain a very niche product – but it’s Google’s Android which could bring open-source to the mass consumer market“.
[click to continue…]

The Seven Habits Of Highly Effective Linux User

This blog post documents couple of good habits to become a highly effective Linux user:

Switching to Linux can be very daunting, most seasoned Linux users experienced that first hand. After all, at some point they were also “noobs”. However, the Linux community has excelled in making the switch for beginners as easy as possible by providing guides, howtos, tweaks, and general advocacy articles. When I first made the switch 3 years ago, I found the community welcoming me with open hands on forums, IRC channels, and E-mail, I was surprised how helpful these penguins were!

=> The 7 Habits of Highly Effective Linux Users

Ubuntu Linux Getting Ready For Average User

The latest beta of the popular Ubuntu Linux distribution offers updated features and good support for new Linux user. It appears that Ubuntu is getting ready for masses. From the article:

If there is a single complaint that is laid at the feet of Linux time and time again, it’s that the operating system is too complicated and arcane for casual computer users to tolerate. You can’t ask newbies to install device drivers or recompile the kernel, naysayers argue.

Of course, many of those criticisms date back to the bad old days, but Ubuntu, the user-friendly distribution sponsored by Mark Shuttleworth’s Canonical Ltd., has made a mission out of dispelling such complaints entirely.

Linux Illegal Codecs and adoption problem

So Do Illegal codecs (shady definition [1]) scare you as a Linux user? According to Adrian Kingsley-Hughes:

… I’m especially interested in rolling out Ubuntu onto older PCs and notebooks where installing Windows will put too much of a strain on the hardware. But there’s one aspect of Ubuntu, and Linux in general for that matter, that’s putting me off. This is the fact that to play a DVD or use WMA/WMV files I have to install codecs that are technically illegal to use.

Linux has a number of really strong points that go beyond the price (reliability, ease of use and low hardware requirements to name but a few), but the operating system falls short when it comes to legally supporting file formats such as MP3, WMA/WMV and DVDs. It’s not that you don’t have support for these formats available, it’s that adding support means entering into some really shady legal territory…

A good question, what do you think? Should patent holder care more about codecs or all downloaded music / mp3 and other formats? One can convert his / her collection to open formats. Luckily in my country there is no such stupid law exists.

Illegal Codecs Put Me Off Linux (via /.)

[1] In many countries (outside USA) codecs are not illegal.

Search for all account without password and lock them

For security, reason it is necessary to disable all account(s) with no password and lock them down. Solaris, Linux and FreeBSD provide account locking (unlocking) facility.

Lock Linux user account with the following command:

passwd -l {user-name}

For unlocking the account use:

passwd  -u {user-name}

-l : This option disables an account by changing the password to a value, which matches no possible encrypted value.

Lock FreeBSD user account with the following command:

pw lock {username}

FreeBSD unlocking the account use:

pw unlock {username}

Lock Solaris UNIX user account with the following command:

passwd -l {username}

Lock HP-UX user account with the following command:

passwd -l {username}

For unlocking the HP-UX account you need to edit /etc/passwd file using text editor (or use SAM):

vi /etc/passwd 

However, how will you find out account without password? Again, with the help of ‘passwd -s’ (status) command you can find out all passwordless accounts.

Linux display password status

passwd -S {user-name}

-S : Display account status information. The status information consists of total seven fields. The second field indicates the status of password using following format:

  • L : if the user account is locked (L)
  • NP : Account has no password (NP)
  • P: Account has a usable password (P)
# passwd -S radmin

radmin P 10/08/2005 0 99999 7 -1

Solaris UNIX display password status

passwd -s {user-name}

-s : Display account status information using following format:

  • PS : Account has a usable password
  • LK : User account is locked
  • NP : Account has no password

I have already written about small awk one line approach to find out all passwords less accounts.

Automated Scripting Solution
However, in real life you write a script and execute it from cron job. Here is small script for Linux:

USERS="$(cut -d: -f 1 /etc/passwd)"
for u in $USERS
passwd -S $u | grep -Ew "NP" >/dev/null
if [ $? -eq 0 ]; then
passwd -l $u

FreeBSD script:

USERS="$(awk -F: 'NF > 1 && $1 !~ /^[#+-]/ && $2=="" {print $0}'
/etc/master.passwd | cut -d: -f1)"
for u in $USERS
pw lock $u

Sun Solaris script:

USERS=`passwd -sa | grep -w NP | awk '{ print $1 }'`
for u in $USERS
passwd -l $u

You can easily add email alert support to script so that when ever scripts finds passwordless account(s) it will send an email alert. See the complete working example of script here.