--- Borsenkow Andrej <[EMAIL PROTECTED]> wrote:
> > Every time I upgrade the damn "setup" packages it trashes my passwd
> > file.  This problem gets reported over and over and over and over
> > again on this list and it still happens.  I always have to back to
> > passwd.org and get some of the accounts back.
> > 
> > Can we please stop this madness?
> > 
> 
> It never did it for me (and judging by small number of reports for
> others) so what so different in your password file?

It does for me every time I upgrade the setup rpm. Any way, there are four
issues I can think of regarding the password and group files:

1. addition/removals of permanent system accounts, ex. recent addition of gica
2. changes in UID/GID of permanent system accounts, ex. change the floppy group
GID from 80 to 70
3. preservation of rpm added system accounts, ex. pppusers, xfs, etc.
4. preservation of user added accounts, ex foo, bar, etc.

I would say management of 1 and 2 under a development distro like cooker can be
tricky, since the changes are to be made differ depending on the version
installed vs the one to be installed, and on cooker there could potentially be
lots of versions. However, I think that for released versions of mandrake,
updates of the setup rpm should work flawlessly; at least within all versions
of a major release (for example 8.0-->8.1, 8.0-->8.2 8.1-->8.2, etc.)

Now, what most people bith about is 3 and 4, and in my opinion these are no
brainers unless their UID/GID conflict with a permanet system account.

My temporary solution is to use the following script to compare the installed
files against the master files, and edit the installed files maually:

[root@fulgore:~/rsync]# more ./acc_compare 
#!/bin/bash

PWD=/etc/passwd
GRP=/etc/group
MPWD=/usr/share/base-passwd/passwd.master
MGRP=/usr/share/base-passwd/group.master

TMPDIR=/tmp
PTMP=$TMPDIR/$0.pcurrent
MPTMP=$TMPDIR/$0.pmaster
GTMP=$TMPDIR/$0.gcurrent
MGTMP=$TMPDIR/$0.gmaster

gawk -F: '{print $1":"$3}' $PWD |sort > $PTMP
gawk -F: '{print $1":"$3}' $MPWD |sort > $MPTMP

gawk -F: '{print $1":"$3}' $GRP |sort > $GTMP
gawk -F: '{print $1":"$3}' $MGRP |sort > $MGTMP

echo "Changes in accounts:"
echo "--------------------"
echo
echo "unique in         unique in"
echo " current           master"
echo "---------         ---------"
echo
comm -3 $PTMP $MPTMP
rm -f $PTMP $MPTMP

echo
echo "_______________________________________________"
echo
echo

echo "Changes in groups:"
echo "------------------"
echo
echo "unique in         unique in"
echo " current           master"
echo "---------         ---------"
echo
comm -3 $GTMP $MGTMP
rm -f $GTMP $MGTMP
[root@fulgore:~/rsync]# 


=====
________________________
Eugenio Diaz, BSEE/BSCE   
Linux Engineer
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Reply via email to