Greetings,
Thanks to persons who responded:
Sigismondo Boschi <net1701_at_comune.bologna.it>
Paul Tyler <pct_at_lister.anp.ansto.gov.au>
Kurt Carlson <sxkac_at_java.sois.alaska.edu>
davis_at_decatl.alf.dec.com
Murthy Hebbar <murthy_at_dicer.incyte.com>
My apologies if I missed any one who replied
I have the solution to my problem. Alan Davis gave it to me. Following
is his answer:
*************** SOLUTION (From: davis_at_decatl.alf.dec.com) *************
Christophe,
This is a well-known problem that dates back to Ultrix and
BSD. Here is the workaround :
WORKAROUND:
The workaround is to modify the adduser script to use "awk" instead of "cut"
as follows:
1. For those lines with cut -d: -f4:
change cut to awk
change -d: to -F:
change -f4 to '{print $4}'
2. Also change the ed lines to use sed instead:
# ed /etc/ptmp/group > /dev/null << EOF
# /^${LOGGROUP}:/s/\$/,${USER}/
# g/:,/s//:/
# w
# q
#EOF
sed "/^${LOGGROUP}:/s/\$/,${USER}/" /etc/group | \
sed "/:,/s//:/" > /etc/ptmp/group
3. Also change the following ed lines to use sed instead:
# ed /etc/ptmp/group > /dev/null << EOF
# /^${GROUP}:/s/\$/,${USER}/
# g/:,/s//:/
# w
# q
# EOF
sed "/^${GROUP}:/s/\$/,${USER}/" /etc/group | \
sed "/:,/s//:/" > /etc/ptmp/group
Alan Davis/dusg
********************** END SOLUTION *****************************
My original request was:
> I am using a modified 'adduser' script to add new users under NIS. Now
> I am unable to update the /var/yp/src/group file because I have lines
in this
> file those length are greater than 512 bytes: I have groups with near
> 100 users each. ed is used to process the passwd and group files and now
> ed can't read the group file because of the length of some lines.
>
> Is there a way to solve my problem ? Where can I find a version of ed
> which can process lines greater than 512 bytes ?
>
> Do I need to rewrite my adduser script using an other text editor ?
>
> Thanks in advance.
***
Christophe DIARRA
Institut de Physique Nucleaire
Bat 100 - S2I
91406 ORSAY Cedex
Tel: (16 1) 69 41 65 60
E-mail: diarra_at_ipno.in2p3.fr
***
Received on Wed Sep 25 1996 - 16:44:31 NZST