Recent Articles

Ancient Unix
I had noticed The Computer History Simulation Project some time ago, but I never got around to doing anything with it. This July Fourth, with nothing else pressing me, I decided to take a more in depth look.

Puppy Linux
It sounds like a toy, doesn't it? "Puppy Linux". So cute, and when it first boots you'll hear "Woof-Woof" as a help screen opens.

Selinux On FC5
Selinux can be confusing, but it's ordinary and default configuration is actually pretty simple...

Mount --bind
Most Linux and Unix file systems don't allow hard links to directories...

GNOME Released With New Search
Version 2.14 of GNOME's desktop for Linux or UNIX systems contains a new integration of a desktop...

Microsoft Open Port 25 To Hackers
For once, the correct definition of hackers applies here; the new Port 25 website from Microsoft offers communications from...

Tar Wild Card Interpretation
I had this email earlier this week:
I am trying to restore a file "GL050". I can see it on the tape listing, but I can't get edge to find it. I have tried listing it the following ways...

Tomorrows's Date
At How can I find tomorrow's or yesterday's date in a script?, some anonymous person left what I consider to be a stupid comment.

Red Hat’s New Linux Software Development Tools
San Francisco based Linux dudes Red Hat announced a "Integrated Virtualization" strategy on Tuesday. This new tool should simplify deployment in a new virtualization environment. They claim this will allow customers to deploy resources at minimal cost...

07.26.06


Linux Libuser

By A.P. Lawrence

The other day I had started typing "ls" while sshed to a RedHat machine and had only typed the "l" when I suddenly decided I needed to switch away to look at something else.

On the Mac, you switch to other running apps with Apple-TAB, but I managed to hit the TAB first and somehow managed to "bounce" it.

Of course the Linux bash shell responded as it should have, listing "l" commands for me. As it also beeps after the first tab, and as I was expecting to switch away, naturally the list caught my attention more than it might have otherwise. This happened to be an older machine so the "l" list was short enough to just display without asking me if I really wanted to see all the possibilities. If it hadn't been, I probably just would have said "N". But there they were, "l" commands.

Two of them caught my eye: "lchfn" and "lchsh". What the heck are those, I wondered?

Neither had man pages and when I tried "lchfn --help" it wasn't very helpful. Attempting "lchfn -i" asked for a password but wouldn't authenticate me. I decided it was time to get back to whatever it was I had been trying to do before this side trip.

However, I remembered that, and later in the day I logged into a new Fedora Core 5 box. This had the same two commands and a few more: luseradd and luserdel were two I noticed right away. The Fedora also had man pages, but these were even more puzzling. The commands obviously served the same functions as their equivalents without the leading "l", but the man pages were much shorter. And there was another difference: at the end of each man page, where other commands might say "System Management Command" and a date, these all said "libuser".


Huh? What's "libuser"?

A visit to /usr/share/doc/libuser-0.54 enlightened me a little, as did the accidental discovery of libuser.conf in /etc. Apparently libuser is RedHat's attempt to bring user management tasks under one unifying library. The docs say:

The libuser library implements a standardized interface for manipulating and administering user and group accounts. The library uses pluggable back-ends to interface to its data sources. Sample applications modeled after those included with the shadow password suite are included.

It makes sense to consolidate this stuff , and a search of Google seems to show that other distros may be picking up on this as well: there's a Debian version and you'll find "libuser-perl" in Ubuntu (I'm not certain that's directly related but it definitely serves the same function).

So the question is: are we supposed to be using this stuff? Apparently higher level tools may use this library: I think I'm reading correctly that RedHat's text and gui tools call routines from libuser. Should "luseradd" replace "useradd"?

Apparently not quite yet. The README on FC5 says:

This package is still under development, but the API appears to have settled to the point where it's reasonable to write applications with it.

So, the mystery of "lchfn" and "lchsh" was solved. The "libuser" concept is apparently still in progress, but may be completely deployed someday.


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

About LinuxDeveloperNews
Get the lastest information on current changes in the Linux Development World.

LinuxDeveloperNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxDeveloperNews.com WirelessProNews.com
CProgrammingTrends.com DevWebPro.com


-- LinuxDeveloperNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
© 2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



LinuxDeveloperNews News Archives About Us Feedback LinuxDeveloperNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact