Debian bug report logs - #1500, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1500: adduser makes a .bash_profile in the invoking user's directory
Reply-To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Resent-From: Ian Jackson <iwj10@cus.cam.ac.uk>
Resent-To: debian-devel@pixar.com
Resent-Date: Thu, 28 Sep 1995 11:18:07 GMT
Resent-Message-ID: <debian-bugs-handler.1500.B09281117530@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: adduser
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Thu, 28 Sep 1995 11:18:07 GMT
Received: with rfc822 via encapsulated-mail; Thu, 28 Sep 1995 11:17:51 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syGwj-000F08C; Thu, 28 Sep 95 04:16 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA22432
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 04:15:49 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0syGwd-000C0JC; Thu, 28 Sep 95 12:16 BST
Received: by chiark
	id <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 28 Sep 95 12:13 BST
Message-Id: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
Date: Thu, 28 Sep 95 12:13 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>

Package: adduser
Version: 1.94-1

I recently used the adduser script for the first time in a while, and
was most puzzled when bash stopped executing my .profile.

Eventually I tracked it down to a rogue .bash_profile file that had
been created by some program.  I deleted the .bash_profile, and bash
worked properly again.

I just ran adduser again and it put the .bash_profile back !

My cwd and HOME were all set to /u/ian, and I have used the
adduser.conf variable to set the home directories to appear under /u.
The user whose account I was creating didn't have their .bash_profile
edited by adduser to make the umask 002 (it should have been edited,
since I have usergroups turned on).

I suspect the lack of a directory name in a destination filename
somewhere.

Ian.


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Jackson <iwj10@cus.cam.ac.uk>
Subject: Bug#1500: Acknowledgement (was: adduser makes a .bash_profile in the invoking user's directory)
In-Reply-To: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
References: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1500" or "Re: Bug#1500" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1500: adduser makes a .bash_profile in the invoking user's directory
Reply-To: iwj10@thor.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-From: iwj10@thor.cam.ac.uk (Ian Jackson)
Resent-To: debian-devel@pixar.com
Resent-Date: Thu, 28 Sep 1995 14:18:04 GMT
Resent-Message-ID: <debian-bugs-handler.1500.B09281405250@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: adduser
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Thu, 28 Sep 1995 14:18:04 GMT
Received: with rfc822 via encapsulated-mail; Thu, 28 Sep 1995 14:05:23 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syJZ6-000EyUC; Thu, 28 Sep 95 07:03 PDT
Received: from hammer.thor.cam.ac.uk by pixar.com with SMTP id AA29201
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 07:03:36 -0700
Received: by hammer.thor.cam.ac.uk
	(Smail-3.1.29.0 #77) id m0syJZ1-000JfRC; Thu, 28 Sep 95 15:03 BST
Message-Id: <m0syJZ1-000JfRC@hammer.thor.cam.ac.uk>
Date: Thu, 28 Sep 95 15:03 BST
From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
In-Reply-To: <11479@toto.iv>
References: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
	<cMqEAc7hg7@muskogee.elmail.co.uk>

I reported that adduser creates a .bash_profile file in the invoking
user's current directory.  On examining the code, it seems that if
/etc/skel contains a .login or a .profile it will write those too.

Below is a patch that I believe will fix the problem.  It also adds a
new feature: after creating a new user, adduser will run
/usr/local/sbin/adduser.local if it exists, passing as arguments the
new username, its uid and its gid.

Ian.

--- /usr/sbin/adduser   Mon Jul 10 02:10:53 1995
+++ adduser     Thu Sep 28 14:59:59 1995
@@ -671,14 +671,14 @@
                $this_file = $home_dir . "/" . $file;
                if (-f $this_file) {
                    open (FILE, "$this_file") || die "open: $!";
-                   open (NEWFILE, ">$file.new") || die "open: $!";
+                   open (NEWFILE, ">$this_file.new") || die "open: $!";
                    while ($line = <FILE>) {
                        $line =~ s/umask 0([267])\1/umask 00$1/;
                        print NEWFILE $line;
                    }
                    close FILE;
                    close NEWFILE;
-                   rename ("$file.new", "$file") || die "rename: $!";
+                   rename ("$this_file.new", "$this_file") || die "rename: $!";
                }
            }
        }
@@ -719,6 +719,11 @@
     }
     print "done.\n";
     &clean_up();
+    if (-f "/usr/local/sbin/adduser.local") {
+        exec("/usr/local/sbin/adduser.local",
+             $new_name, $new_uid, $new_gid);
+        die "exec adduser.local: $!";
+    }
     exit 0;
 }



Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@thor.cam.ac.uk (Ian Jackson)
Subject: Bug#1500: Info received (was Bug#1500: adduser makes a .bash_profile in the invoking user's directory)
In-Reply-To: <m0syJZ1-000JfRC@hammer.thor.cam.ac.uk>
References: <m0syJZ1-000JfRC@hammer.thor.cam.ac.uk>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1500" or "Re: Bug#1500" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1500: adduser makes a .bash_profile in the invoking user's directory
Reply-To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Resent-From: Ian Jackson <iwj10@cus.cam.ac.uk>
Resent-To: debian-devel@pixar.com
Resent-Date: Fri, 29 Sep 1995 03:03:02 GMT
Resent-Message-ID: <debian-bugs-handler.1500.B09290249120@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: adduser
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Fri, 29 Sep 1995 03:03:02 GMT
Received: with rfc822 via encapsulated-mail; Fri, 29 Sep 1995 02:49:10 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syVUd-0001ceC; Thu, 28 Sep 95 19:48 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA06455
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 19:47:48 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0syVUa-000BzQC; Fri, 29 Sep 95 03:48 BST
Received: by chiark
	id <m0syUvE-0002ZbZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Fri, 29 Sep 95 03:11 BST
Message-Id: <m0syUvE-0002ZbZ@chiark.al.cl.cam.ac.uk>
Date: Fri, 29 Sep 95 03:11 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>
In-Reply-To: <m0syGyf-0007bXC@grus.cus.cam.ac.uk>
References: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
	<m0syGyf-0007bXC@grus.cus.cam.ac.uk>

Here is a better version of my patch, which also supplies the home
directory to adduser.local.

Ian.

--- /usr/sbin/adduser	Mon Jul 10 02:10:53 1995
+++ /usr/local/sbin/adduser	Thu Sep 28 19:31:07 1995
@@ -671,14 +671,14 @@
 		$this_file = $home_dir . "/" . $file;
 		if (-f $this_file) {
 		    open (FILE, "$this_file") || die "open: $!";
-		    open (NEWFILE, ">$file.new") || die "open: $!";
+		    open (NEWFILE, ">$this_file.new") || die "open: $!";
 		    while ($line = <FILE>) {
 			$line =~ s/umask 0([267])\1/umask 00$1/;
 			print NEWFILE $line;
 		    }
 		    close FILE;
 		    close NEWFILE;
-		    rename ("$file.new", "$file") || die "rename: $!";
+		    rename ("$this_file.new", "$this_file") || die "rename: $!";
 		}
 	    }
 	}
@@ -719,6 +719,11 @@
     }
     print "done.\n";
     &clean_up();
+    if (-f "/usr/local/sbin/adduser.local") {
+        exec("/usr/local/sbin/adduser.local",
+             $new_name, $new_uid, $new_gid, $home_dir);
+        die "exec adduser.local: $!";
+    }
     exit 0;
 }



Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Jackson <iwj10@cus.cam.ac.uk>
Subject: Bug#1500: Info received (was Bug#1500: adduser makes a .bash_profile in the invoking user's directory)
In-Reply-To: <m0syUvE-0002ZbZ@chiark.al.cl.cam.ac.uk>
References: <m0syUvE-0002ZbZ@chiark.al.cl.cam.ac.uk>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1500" or "Re: Bug#1500" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: sr1@irz301.inf.tu-dresden.de (Sven Rudolph)
In-Reply-To: <199510231447.PAA14353@irz101.inf.tu-dresden.de>
References: <199510231447.PAA14353@irz101.inf.tu-dresden.de> <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
Subject: Bug#1500: marked as done (was: adduser makes a .bash_profile in the invoking user's directory)

Your message dated Mon, 23 Oct 1995 15:47:45 +0100
with message-id <199510231447.PAA14353@irz101.inf.tu-dresden.de>
and subject line Bug#1500: adduser makes a .bash_profile in the invoking user's directory
has caused the attached bug report to be marked as done.

It is your now responsibility to ensure that the bug report is dealt
with.

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

Ian Jackson
(maintainer, debian-bugs)

Received: with rfc822 via encapsulated-mail; Thu, 28 Sep 1995 11:17:51 GMT
From cus.cam.ac.uk!iwj10 Thu Sep 28 04:16:09 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syGwj-000F08C; Thu, 28 Sep 95 04:16 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA22432
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 04:15:49 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0syGwd-000C0JC; Thu, 28 Sep 95 12:16 BST
Received: by chiark
	id <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 28 Sep 95 12:13 BST
Message-Id: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
Date: Thu, 28 Sep 95 12:13 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: adduser makes a .bash_profile in the invoking user's directory

Package: adduser
Version: 1.94-1

I recently used the adduser script for the first time in a while, and
was most puzzled when bash stopped executing my .profile.

Eventually I tracked it down to a rogue .bash_profile file that had
been created by some program.  I deleted the .bash_profile, and bash
worked properly again.

I just ran adduser again and it put the .bash_profile back !

My cwd and HOME were all set to /u/ian, and I have used the
adduser.conf variable to set the home directories to appear under /u.
The user whose account I was creating didn't have their .bash_profile
edited by adduser to make the umask 002 (it should have been edited,
since I have usergroups turned on).

I suspect the lack of a directory name in a destination filename
somewhere.

Ian.


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Jackson <iwj10@cus.cam.ac.uk>
Subject: Bug#1500 acknowledged by developer (was: adduser makes a .bash_profile in the invoking user's directory)
References: <199510231447.PAA14353@irz101.inf.tu-dresden.de> <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>
In-Reply-To: <m0syGtj-0002ZeZ@chiark.al.cl.cam.ac.uk>

This is an automatic notification regarding your bug report.

Responsibility for it has been taken by one of the developers, namely
sr1@irz301.inf.tu-dresden.de (Sven Rudolph).

You should be hearing from them with a substantive response shortly, if
you have not already done so.  If not, please contact them directly,
or email debian-bugs@pixar.com or myself.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov