4

Do NOT Use This Perl Module: Passwd::Unix


Posted by Artem Russakovskii on April 22nd, 2008 in Linux, Programming

Updated: April 29th, 2008

Update: The author of the module contacted me the same day and promised to fix it in the next version. Version 0.40 was indeed on cpan as promised, but I haven't tested it yet.

Passwd::Unix will corrupt your /etc/shadow file and rearrange login names and their corresponding password hashes.

The current version of Passwd::Unix corrupted my /etc/shadow upon only
calling the passwd() function. Immediately users started to report not
being able to login.

After examining the situation, I found that Passwd::Unix rearranges all
users in /etc/shadow in some way, but it only does it to the
usernames, and not the password hashes. Thus, you will get corrupted accounts. Moreover,
users are now able to login to one OTHER account, not …

Read the rest of this article »

3

How To Delete All Messages From A Folder In Pine


Posted by Artem Russakovskii on March 23rd, 2008 in Linux

Pine is a UNIX command line mail application. So how do you delete all messages in a folder?

The combination is

1
; A A D

If after pressing ; you see

1
[Command ";" not defined for this screen. Use ? for help]

then you don't have a check in the "Enable aggregate command set" settings checkbox. To enable it, go to the main menu (M) -> Setup (S) -> Config (C) and scroll down to "Enable aggregate command set". Then press X (to check it), E (Exit). Now repeat the above….

Read the rest of this article »

24

Watch – A Useful Linux Command You May Have Never Heard Of


Posted by Artem Russakovskii on August 4th, 2007 in Linux

Updated: November 9th, 2007

How many times did I want to watch a directory waiting for a file to appear in it? Constant ls, for example, quickly got boring. A quick Perl script that would reload ls every 5 seconds… yeah it works but it takes a while to type up, and often enough I'm too lazy for that. And then I found 'watch' – a utility that comes with most *nix distros. Look at this beauty [man watch]:

NAME
watch – execute a program periodically, showing output fullscreen

SYNOPSIS
watch [-dhvt] [-n ] [–differences[=cumulative]] [–help]
[–interval=] [–no-title] [–version]

DESCRIPTION
watch runs command repeatedly, displaying its output (the first screen
full).
This allows you to watch the program output change over time.
By default, …

Read the rest of this article »