Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2007 16:49:14 -0400
From:      "Tamouh H." <hakmi@rogers.com>
To:        "'Jerry McAllister'" <jerrymc@msu.edu>, "'Chuck Swiger'" <cswiger@mac.com>
Cc:        'Marcelo Maraboli' <marcelo.maraboli@usm.cl>, freebsd-questions@freebsd.org
Subject:   RE: pwd.db too big for / partition
Message-ID:  <20070319204915.A107E13C4BD@mx1.freebsd.org>
In-Reply-To: <20070319194549.GA5491@gizmo.acns.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
>=20
> On Mon, Mar 19, 2007 at 10:39:18AM -0700, Chuck Swiger wrote:
>=20
> > On Mar 19, 2007, at 7:54 AM, Marcelo Maraboli wrote:
> > >my / partition has only 73.196 Mbytes available and since I have=20
> > >22.000 users, I now cannot change anyone?s password..
> > >
> > >root@server:~$ passwd marcelo.maraboli Changing local password for=20
> > >marcelo.maraboli New Password:
> > >Retype New Password:
> > >
> > >/: write failed, filesystem is full
> > >pwd_mkdb: write old: No space left on device
> > >passwd: pam_chauthtok(): error in service module
> > >
> > >How can I rezise the "/" partition or move the spwb.db and pwd.db=20
> > >files to another partition ?? (each of them is 44 Mbytes)
> >=20
> > You certainly don't want to move the password files out of /etc--=20
> > you'll render the machine unbootable as it needs to find=20
> them on the=20
> > root partition.  The only approach I see which is likely to be=20
> > workable would be to backup the system, repartition the=20
> disks with a=20
> > larger root partition, and restore from backups.
>=20
> I agree.
>=20
> > However, in theory, if you had free disk space, you could=20
> use growfs=20
> > to expand the root partition without repartitioning, but I=20
> am dubious=20
> > about using that command against /.
>=20
> I believe, with growfs, the space that you add must be contiguous
> with the partition it is joining.   So, unless there is a partition
> that could be shrunk next to root, (maybe swap is there) it=20
> wouldn't work.
> If there is room - maybe by mucking with swap if it is the=20
> next partition, then it might be do-able.  But, I would also=20
> be leary of doing it with /.
>=20
> ////jerry
>=20
> >=20
> > --
> > -Chuck

Well, I had a VM laying around so thought to fire it up and do some =
testing. I know this is absurd abit but I wanted to see the effect of =
doing symlinks with pwd.db files.

- I was able to copy /etc/pwd.db /etc/spwd.db to /var/etc/ =20
- Then I deleted /etc/pwd.db and /etc/spwd.db
- created ln -s /var/etc/pwd.db /etc/pwd.db   and ln -s /var/etc/spwd.db =
/etc/spwd.db
- changed the root password, worked!
- Even rebooted the system and was able to successfully able to login
- All worked fine except, I noticed after running passwd to reset a user =
password, the system copied pwd.db and spwd.db over the symlinks so I =
always was ending up with /etc/pwd.db and /etc/spwd.db  files

I guess this method will solve your space problem if there is a way to =
make the system follow the symlink instead of overwriting it everytime a =
password is changed/created.

Tamouh





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070319204915.A107E13C4BD>