From: Glynn Clements Subject: Re: nss-mysql and useradd Date: Tue, 18 Oct 2005 19:24:04 +0100 Message-ID: <17237.15812.692940.593301@cerise.gclements.plus.com> References: <4353A70B.4040103@poczta.onet.pl> <17236.62379.932907.182968@cerise.gclements.plus.com> <435526C3.4090304@poczta.onet.pl> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <435526C3.4090304@poczta.onet.pl> Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: Piotr Szczap Cc: linux-admin@vger.kernel.org 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