# # Linux libuser
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Linux libuser

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© July 2006 Anthony Lawrence
July 2006

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.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Linux libuser


Inexpensive and informative Apple related e-books:

El Capitan: A Take Control Crash Course

Photos for Mac: A Take Control Crash Course

Take control of Apple TV, Second Edition

Take Control of iCloud, Fifth Edition

iOS 10: A Take Control Crash Course





More Articles by © Anthony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Today’s computers are not even close to a 4-year-old human in their ability to see, talk, move, or use common sense. One reason, of course, is sheer computing power. It has been estimated that the information processing capacity of even the most powerful supercomputer is equal to the nervous system of a snail—a tiny fraction of the power available to the supercomputer inside [our] skull. (Steven Pinker)




Linux posts

Troubleshooting posts


This post tagged:

Linux



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode