Do NOT Use This Perl Module: Passwd::Unix

Tuesday, April 22nd, 2008

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 their own,
depending on how the usernames got shuffled.

Thankfully, I had a recent backup but I definitely don’t want anyone
else to suffer.

I’m using perl 5.10, SUSE 10.3. If it’s incompatible with SUSE, it needs
to say so and exit.

I've filed the bug here: http://rt.cpan.org/Public/Bug/Display.html?id=35323.

You have been warned.

cpan - The Perl Module Manager

Friday, October 12th, 2007

Updated: March 19th, 2008

cpan is a perl module manager. To get into cpan, login as root and type in

cpan

Install a module:

cpan install MODULE

Upgrade a module:

cpan upgrade MODULE

Reinstall a module or force install in case of failed tests:

force install MODULE

See a list of upgradable modules:

r

See cpan configuration (that's the letter 'o'):

o conf

Update an option in cpan configuration:

o conf OPTION_NAME OPTION_VALUE

It is always nice to:

upgrade CPAN
install Bundle::CPAN

If there's an error making a Perl module, it can be caused by a missing make path in cpan configuration. In cpan, type in:

o conf

which will show all cpan options, then:

o conf make /usr/bin/make
o conf commit

A good option is:

o conf prerequisites_policy follow

By default, cpan will prompt to install every dependecy while installing a module. This option will automatically install dependencies without prompting.