Your message dated Sun, 4 Dec 2005 12:08:02 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#341938: add utility to create local home directory for 
nis-users
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 4 Dec 2005 10:36:51 +0000
>From [EMAIL PROTECTED] Sun Dec 04 02:36:51 2005
Return-path: <[EMAIL PROTECTED]>
Received: from anancy-152-1-68-5.w81-49.abo.wanadoo.fr ([81.49.142.5] 
helo=palavas.ippon)
        by spohr.debian.org with esmtp (Exim 4.50)
        id 1EirEh-0005yx-Fh
        for [EMAIL PROTECTED]; Sun, 04 Dec 2005 02:36:51 -0800
Received: from root by palavas.ippon with local (Exim 3.36 #1 (Debian))
        id 1EirGr-00063T-00; Sun, 04 Dec 2005 11:39:05 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: add utility to create local home directory for nis-users
Message-ID: <[EMAIL PROTECTED]>
X-Mailer: reportbug 3.18
Date: Sun, 04 Dec 2005 11:39:05 +0100
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-7.5 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: nis
Version: 3.15-3
Severity: wishlist
Tags: patch

I am using NIS to centrally maintain a list of users who share a set of
notebooks. Each notebook is setup as a nis slave server, so it knows
about all users in the nis database, even when not connected to the
network.
The problem with a notebook is that it will not always be on the
network. Therefore a user in the nis database needs a home directory
locally on that notebook
The following shell script tries to create home directories for each
user in the database, unless it already exists.
May I suggest to add this script as a part of the NIS utilities?

cat yp-homedir
#! /bin/bash
# create a local home directory for a user in the nis database
# use /etc/skel as a reference
cd /etc/skel
for i in `ypcat passwd|awk -F : '{print $1}'`;
do
home=`ypcat passwd|grep ^$i|awk -F : '{print $6}'`
echo "$i -> $home"
if [ ! -d $home ]; then
echo "creating homedir for nis-user $i in $home"
mkdir -m u=rwx,g=rx,o= $home
chown $i:$i $home
find | cpio -pdv -R $i.$i $home
fi
done

Thanks
Remy

-- Package-specific info:

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages nis depends on:
ii  debconf [debconf-2.0]         1.4.61     Debian configuration management sy
ii  libc6                         2.3.5-8.1  GNU C Library: Shared libraries an
ii  libgdbm3                      1.8.3-2    GNU dbm database routines (runtime
ii  libslp1                       1.2.1-3    OpenSLP libraries
ii  make                          3.80-11    The GNU version of the "make" util
ii  netbase                       4.23       Basic TCP/IP networking system
ii  portmap                       5-16       The RPC portmapper
ii  sysvinit                      2.86.ds1-6 System-V like init

nis recommends no packages.

-- debconf information excluded

---------------------------------------
Received: (at 341938-done) by bugs.debian.org; 4 Dec 2005 12:08:17 +0000
>From [EMAIL PROTECTED] Sun Dec 04 04:08:17 2005
Return-path: <[EMAIL PROTECTED]>
Received: from cassiel.sirena.org.uk ([80.68.93.111] ident=Debian-exim)
        by spohr.debian.org with esmtp (Exim 4.50)
        id 1EisfA-0006ke-LZ
        for [EMAIL PROTECTED]; Sun, 04 Dec 2005 04:08:17 -0800
Received: from 82-41-255-123.cable.ubr04.edin.blueyonder.co.uk ([82.41.255.123] 
helo=lorien.sirena.org.uk)
        by cassiel.sirena.org.uk with esmtpsa 
(TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32)
        (Exim 4.50)
        id 1EisXN-00030T-3Q
        for [EMAIL PROTECTED]; Sun, 04 Dec 2005 12:00:17 +0000
Received: from raphaela (raphaela.sirena.org.uk [192.168.56.10])
        by lorien.sirena.org.uk (Postfix) with ESMTP id 31F342AD22
        for <[EMAIL PROTECTED]>; Sun,  4 Dec 2005 12:08:03 +0000 (GMT)
Received: by raphaela (Postfix, from userid 1000)
        id 14704FAD7F; Sun,  4 Dec 2005 12:08:02 +0000 (GMT)
Date: Sun, 4 Dec 2005 12:08:02 +0000
From: Mark Brown <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Bug#341938: add utility to create local home directory for 
nis-users
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX"
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
X-Cookie: Smile!  You're on Candid Camera.
User-Agent: Mutt/1.5.11
X-Spam-Score: -2.4 (--)
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02


--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 04, 2005 at 11:39:05AM +0100, [EMAIL PROTECTED] wrote:

> The following shell script tries to create home directories for each
> user in the database, unless it already exists.

For populating the home directories from /etc/skel pam_mkhomedir and
autodir seem like better solutions to this problem - they will create
the directories as they are needed rather than requiring the admin to
remember to run a script.

Trying to copy network home directories on to the machine would be
asking for trouble as soon as someone makes changes: you have to worry
about merging things back and forth.

--=20
"You grabbed my hand and we fell into it, like a daydream - or a fever."

--huq684BweRXVnRxX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQCVAwUBQ5LcHw2erOLNe+68AQK06QP/eg0QfBtFkZMqkVte7lwLSnN656GEd+ul
L088iVJtCvxZANl4wWiGWfgori/WKZxJMn1x55S1vmpF/oSjlBGs4hBc1HQdFeJv
LOGkMGOThC9qEUGtE38acuBfaKBZJJjLylrOXhAk/iTQa22lFlvSuRxw0BVyIvzT
ZqJ6Urc0yCk=
=r9VE
-----END PGP SIGNATURE-----

--huq684BweRXVnRxX--


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to