Re: [gdm-list] adding a command to externaly fill the username field
- From: Bob Doolittle <Robert Doolittle Sun COM>
- To: syrius ml no-log org
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] adding a command to externaly fill the username field
- Date: Sat, 28 Jan 2006 18:21:17 -0500
This is really easy to do in a PAM module.
Solaris does this for Sun Ray thin clients
via a module called sunray_get_user.so.
Just do what you have to, and provide a
pam_sm_authenticate handler that simply
calls pam_set_item for PAM_USER and returns
PAM_IGNORE so it doesn't actually contribute
to the authentication status. Put your module
on top of gdm's PAM stack and voila!
This is a nice modular approach that doesn't
involve mucking with GDM internals, plus it's
easy for anyone to pick up your PAM module
and run it with out-of-the-box with gdm in
any Linux distro.
-Bob
syrius ml no-log org wrote:
Hi,
I'd like to be able to fill the username field externaly.
I've tried to add a new fifo command to do that without success.
I've added a GDM_SOP_DOLOGIN that takes the slave pid and the login
name as arguments.
Looking at how GDM_SOP_COMMANDS are handled in
gdm.c:gdm_handle_message I've duplicated the GDM_SOP_LOGIN test and
tried to use
d->login=g_strdup (p);
send_slave_command (d, GDM_NOTIFY_DOLOGIN);
The slave is able to receive the message, but doesn't get the login.
Anyway, it's seems that's not the good place to interact with
pam_authenticate.
At the moment, rather than doing that, i'm considering adding some
stuff in the greeter so that it tells gdm to log with a given
username. But i'm not sure this is the best way.
Before I continue to I prefer to ask here, if there could be a
better/simpler way to do that.
Any advice ?
Would it be better to write a pam library to do that ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]