[kde-linux] KDM and dynamically created users?

Dimitry Golubovsky golubovsky at gmail.com
Wed Dec 2 17:20:40 UTC 2009


Is this possible to delegate the authentication function from KDM to a
custom script assuming that the user who is trying to log in is not
known to the system at the moment, and will be dynamically created
during the authentication phase?

Assume a diskless PC running Linux (not just an X-terminal) and KDE,
for mostly single-user operation. When logging in, user supplies their
name, hostname where the home directory is, and password. An account
for this user is created locally, and user's home directory is mounted
via sshfs (if such mount is not possible, the user is not
authenticated). Then KDE starts as usual. When KDE session completes,
user's home directory is unmounted, and account deleted from the PC.

It currently works using a login script running on a text console.
User's credentials are obtained using the textmode dialog program, and
if authentication is successful, X server is started with KDE.

Can the same be done using KDM to collect credentials?

What I am trying to achieve in ideal:

1. KDM displays its usual greeter to input username (in the form
"user at host") and password.

2. The user account does not exist yet, so KDM should not attempt to
authenticate the user. Instead it should remove the greeter dialog and
run a special script that would get the credentials on stdin (better)
or via environment variables (worse).

3. The script does the rest of the job to authenticate the user
against the hostname they provided, mount home directory, start user
session, etc.

4. Upon return from the script (user session ended), KDM displays the
greeter again. Go to 1.

I tried to find the information about "PluginsLogin" in the KDM
handbook [1 chapter 5], but it is not very specific on the matter. Is
there any example of such custom login plugin?

Or, is this not doable with KDM at all, and writing my own login
dialog program would be a better way?


[1] http://docs.kde.org/kde3/en/kdebase/kdm/index.html (I use KDE 3.5)

Dimitry Golubovsky

Anywhere on the Web

More information about the kde-linux mailing list