linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nss-mysql and useradd
@ 2005-10-17 13:28 Piotr Szczap
  2005-10-18 13:07 ` Glynn Clements
  0 siblings, 1 reply; 4+ messages in thread
From: Piotr Szczap @ 2005-10-17 13:28 UTC (permalink / raw)
  To: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
Is it possible to add a user when you are using nss-mysql? I know that
libnss-mysql doesn't support adding a user, but shouldn't it be possible
to add a user to the 'files' database? Currently I'm using a
nsswitch.conf file that looks like this:

passwd:         files mysql
group:          files
shadow:         files mysql

and when I do useradd testuser I get a segmentation fault. Other user
functions (passwd for the 'files', id etc ) work ok. Any suggestions?

Piotr Szczap

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDU6cLQtNF0qNPlOERAvQDAJ9pXok0fL5bMFvR8gGNM3p0z7L2SgCghS/R
ao5jJ4l+bzGq6LEIZXC0Nsk=
=jcKR
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nss-mysql and useradd
  2005-10-17 13:28 nss-mysql and useradd Piotr Szczap
@ 2005-10-18 13:07 ` Glynn Clements
  2005-10-18 16:45   ` Piotr Szczap
  0 siblings, 1 reply; 4+ messages in thread
From: Glynn Clements @ 2005-10-18 13:07 UTC (permalink / raw)
  To: Piotr Szczap; +Cc: linux-admin


Piotr Szczap wrote:

> Is it possible to add a user when you are using nss-mysql? I know that
> libnss-mysql doesn't support adding a user, but shouldn't it be possible
> to add a user to the 'files' database? Currently I'm using a
> nsswitch.conf file that looks like this:
> 
> passwd:         files mysql
> group:          files
> shadow:         files mysql
> 
> and when I do useradd testuser I get a segmentation fault. Other user
> functions (passwd for the 'files', id etc ) work ok. Any suggestions?

The NSS modules are only used for querying a database, not for
modifying it. Modifications to the user database are handled via PAM.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nss-mysql and useradd
  2005-10-18 13:07 ` Glynn Clements
@ 2005-10-18 16:45   ` Piotr Szczap
  2005-10-18 18:24     ` Glynn Clements
  0 siblings, 1 reply; 4+ messages in thread
From: Piotr Szczap @ 2005-10-18 16:45 UTC (permalink / raw)
  To: linux-admin



Glynn Clements wrote:
> Piotr Szczap wrote:
> 
> 
>>Is it possible to add a user when you are using nss-mysql? I know that
>>libnss-mysql doesn't support adding a user, but shouldn't it be possible
>>to add a user to the 'files' database? Currently I'm using a
>>nsswitch.conf file that looks like this:
>>
>>passwd:         files mysql
>>group:          files
>>shadow:         files mysql
>>
>>and when I do useradd testuser I get a segmentation fault. Other user
>>functions (passwd for the 'files', id etc ) work ok. Any suggestions?
> 
> 
> The NSS modules are only used for querying a database, not for
> modifying it. Modifications to the user database are handled via PAM.
> 


I understand that. I would like to know if it is possible to use
nss-mysql and still be able to add users the 'normal' way, using
/etc/passwd adn shadow. I don't wan't to add users to the mysql
database, only to the 'files' database.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nss-mysql and useradd
  2005-10-18 16:45   ` Piotr Szczap
@ 2005-10-18 18:24     ` Glynn Clements
  0 siblings, 0 replies; 4+ messages in thread
From: Glynn Clements @ 2005-10-18 18:24 UTC (permalink / raw)
  To: Piotr Szczap; +Cc: linux-admin


Piotr Szczap wrote:

> >>Is it possible to add a user when you are using nss-mysql? I know that
> >>libnss-mysql doesn't support adding a user, but shouldn't it be possible
> >>to add a user to the 'files' database? Currently I'm using a
> >>nsswitch.conf file that looks like this:
> >>
> >>passwd:         files mysql
> >>group:          files
> >>shadow:         files mysql
> >>
> >>and when I do useradd testuser I get a segmentation fault. Other user
> >>functions (passwd for the 'files', id etc ) work ok. Any suggestions?
> > 
> > 
> > The NSS modules are only used for querying a database, not for
> > modifying it. Modifications to the user database are handled via PAM.
> 
> I understand that. I would like to know if it is possible to use
> nss-mysql and still be able to add users the 'normal' way, using
> /etc/passwd adn shadow. I don't wan't to add users to the mysql
> database, only to the 'files' database.

Yes. useradd modifies the passwd and shadow files (and/or NDBM
equivalents) directly. It only uses NSS for checking whether the user
already exists.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-18 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-17 13:28 nss-mysql and useradd Piotr Szczap
2005-10-18 13:07 ` Glynn Clements
2005-10-18 16:45   ` Piotr Szczap
2005-10-18 18:24     ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).