Skip to contentSkip to conversation

nss-mysql and useradd

DISCUSSION Piotr Szczap 2 participants 4 messages Oct 17, 2005 – Oct 18, 2005

lore
Share & tools
lore
#0 lore raw

-----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-----

#1 lore raw
Quoted 11 lines · Piotr Szczap

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.

Signature · 1 line
Glynn Clements <[email protected]>
#2 lore raw
Quoted 12 lines · Glynn Clements
Quoted 9 lines · Piotr Szczap

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
Quoted 7 lines
Quoted 2 lines

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.

#3 lore raw
Quoted 13 lines · Piotr Szczap
Quoted 13 lines
Quoted 11 lines

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?

Quoted 7 lines
Quoted 2 lines

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.

Signature · 1 line
Glynn Clements <[email protected]>