Re: pwd.db too big for / partition

2007-03-19 Thread Chuck Swiger

On Mar 19, 2007, at 7:54 AM, Marcelo Maraboli wrote:

my / partition has only 73.196 Mbytes available and since I
have 22.000 users, I now cannot change anyone´s password..

[EMAIL PROTECTED]:~$ passwd marcelo.maraboli
Changing local password for 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 files to another partition ?? (each of them is 44 Mbytes)


You certainly don't want to move the password files out of /etc--  
you'll render the machine unbootable as it needs to find them on the  
root partition.  The only approach I see which is likely to be  
workable would be to backup the system, repartition the disks with a  
larger root partition, and restore from backups.


However, in theory, if you had free disk space, you could use growfs  
to expand the root partition without repartitioning, but I am dubious  
about using that command against /.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pwd.db too big for / partition

2007-03-19 Thread Robert Huff
Chuck Swiger writes:

  However, in theory, if you had free disk space, you could use
  growfs to expand the root partition without repartitioning, but I
  am dubious about using that command against /.

Certainly, the consequences if Something Went Horribly Wrong(tm)
would be quite painful.


Robert Huff
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pwd.db too big for / partition

2007-03-19 Thread Jerry McAllister
On Mon, Mar 19, 2007 at 10:39:18AM -0700, Chuck Swiger wrote:

 On Mar 19, 2007, at 7:54 AM, Marcelo Maraboli wrote:
 my / partition has only 73.196 Mbytes available and since I
 have 22.000 users, I now cannot change anyone?s password..
 
 [EMAIL PROTECTED]:~$ passwd marcelo.maraboli
 Changing local password for 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 files to another partition ?? (each of them is 44 Mbytes)
 
 You certainly don't want to move the password files out of /etc--  
 you'll render the machine unbootable as it needs to find them on the  
 root partition.  The only approach I see which is likely to be  
 workable would be to backup the system, repartition the disks with a  
 larger root partition, and restore from backups.

I agree.

 However, in theory, if you had free disk space, you could use growfs  
 to expand the root partition without repartitioning, but I am dubious  
 about using that command against /.

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 wouldn't work.
If there is room - maybe by mucking with swap if it is the next partition,
then it might be do-able.  But, I would also be leary of doing it with /.

jerry

 
 -- 
 -Chuck
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: pwd.db too big for / partition

2007-03-19 Thread Tamouh H.
 
 On Mon, Mar 19, 2007 at 10:39:18AM -0700, Chuck Swiger wrote:
 
  On Mar 19, 2007, at 7:54 AM, Marcelo Maraboli wrote:
  my / partition has only 73.196 Mbytes available and since I have 
  22.000 users, I now cannot change anyone?s password..
  
  [EMAIL PROTECTED]:~$ passwd marcelo.maraboli Changing local password for 
  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 
  files to another partition ?? (each of them is 44 Mbytes)
  
  You certainly don't want to move the password files out of /etc-- 
  you'll render the machine unbootable as it needs to find 
 them on the 
  root partition.  The only approach I see which is likely to be 
  workable would be to backup the system, repartition the 
 disks with a 
  larger root partition, and restore from backups.
 
 I agree.
 
  However, in theory, if you had free disk space, you could 
 use growfs 
  to expand the root partition without repartitioning, but I 
 am dubious 
  about using that command against /.
 
 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 
 wouldn't work.
 If there is room - maybe by mucking with swap if it is the 
 next partition, then it might be do-able.  But, I would also 
 be leary of doing it with /.
 
 jerry
 
  
  --
  -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/  
- 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


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pwd.db too big for / partition

2007-03-19 Thread Chuck Swiger

On Mar 19, 2007, at 1:49 PM, Tamouh H. wrote:
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/
- 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


I invite you to repeat the experiment when there is an issue with / 
var which prevents it from being mounted cleanly until, say, a manual  
fsck is completed  :-/


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pwd.db too big for / partition

2007-03-19 Thread Derek Ragona
I have moved my root partition on one server.  I copied the entire 
partition to a new partition on a different drive using cpio as I wanted 
/dev moved too.  At the time this was running 4.x.


After moving the root partition I rebooted and made sure the new partition 
was still fine.  Then I changed both /etc/fstab files to mount the new 
root, and gave the old root a new mount point.


On the root of the old root I added a boot.config file to tell the loader 
the correct drive and slice to boot from.


After another reboot, I was using the new root partition.  I keep the old 
one there for the boot.config.  It like your's is too small do much else 
with given the huge drives we install these days.


As for your old root, you should try to clear any space you can.  I would 
look for any log files you can purge, etc, to get some working space.


-Derek


At 09:54 AM 3/19/2007, Marcelo Maraboli wrote:

Hi

my / partition has only 73.196 Mbytes available and since I
have 22.000 users, I now cannot change anyone´s password..

[EMAIL PROTECTED]:~$ passwd marcelo.maraboli
Changing local password for 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 files to another partition ?? (each of them is 44 Mbytes)

thanks.
--
MSc. Marcelo Maraboli Rosselott
Jefe Area de Redes y Comunicaciones  (Network  UNIX Systems Engineer)
Ingeniero Civil Electronico, CISSP  (Electronic Engineer, CISSP, MSc.)

Direccion Central de Servicios Computacionales (DCSC)
Universidad Tecnica Federico Santa Maria phone: +56 32 2654071
Chile.http://www.usm.cl http://elqui.dcsc.utfsm.cl
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pwd.db too big for / partition

2007-03-19 Thread Marcelo Maraboli



Tamouh H. wrote:

On Mon, Mar 19, 2007 at 10:39:18AM -0700, Chuck Swiger wrote:


On Mar 19, 2007, at 7:54 AM, Marcelo Maraboli wrote:
my / partition has only 73.196 Mbytes available and since I have 
22.000 users, I now cannot change anyone?s password..


[EMAIL PROTECTED]:~$ passwd marcelo.maraboli Changing local password for 
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 
files to another partition ?? (each of them is 44 Mbytes)
You certainly don't want to move the password files out of /etc-- 
you'll render the machine unbootable as it needs to find 
them on the 
root partition.  The only approach I see which is likely to be 
workable would be to backup the system, repartition the 
disks with a 

larger root partition, and restore from backups.

I agree.

However, in theory, if you had free disk space, you could 
use growfs 
to expand the root partition without repartitioning, but I 
am dubious 

about using that command against /.

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 
wouldn't work.
If there is room - maybe by mucking with swap if it is the 
next partition, then it might be do-able.  But, I would also 
be leary of doing it with /.


jerry


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



Thanks Tamouh for the test !

I did think of this, but after testing WHY changing a password resulted
in no space available, I realized that FreeBSD updates the
/etc/master.passwd file, makes a backup copy of the 2 .db files,
then runs pwd_mkdb, which creates new .db files and finally it
erases the 2 backup .db.

So, since each .db is 44Mbytes, in the middle of the process I
have 4 x 44 Mbyte files which cannot fit into 73Mbytes available space.

Since it remakes the .db files, it steps on top of your symlinks

I'm realizing that I'll have to install the system again in
a separate disk, and then plug it into my server and mount the
original disks as other partitions and copy the config files..

thanks.
--
MSc. Marcelo Maraboli Rosselott
Jefe Area de Redes y Comunicaciones  (Network  UNIX Systems Engineer)
Ingeniero Civil Electronico, CISSP  (Electronic Engineer, CISSP, MSc.)

Direccion Central de Servicios Computacionales (DCSC)
Universidad Tecnica Federico Santa Maria phone: +56 32 2654071
Chile.http://www.usm.cl http://elqui.dcsc.utfsm.cl
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]