From owner-freebsd-questions Wed Aug 5 13:23:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA18763 for freebsd-questions-outgoing; Wed, 5 Aug 1998 13:23:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from silver.teardrop.org (silver.teardrop.org [169.197.56.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA18737 for ; Wed, 5 Aug 1998 13:23:14 -0700 (PDT) (envelope-from sno@teardrop.org) Received: from localhost (sno@localhost) by silver.teardrop.org (8.x.x/8.x.x) with SMTP id NAA18437; Wed, 5 Aug 1998 13:22:58 -0700 (MST) Date: Wed, 5 Aug 1998 13:22:58 -0700 (MST) From: James Snow To: djv@bedford.net cc: freebsd-questions@FreeBSD.ORG Subject: Re: Weird /home problem In-Reply-To: <199808051832.OAA21740@lucy.bedford.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 5 Aug 1998 djv@bedford.net wrote: > I have the feeling that the login database may be unsynchronized, > -- reason: you've been busy there, possibly not using vipw, etc etc. > That /etc/passwd, /etc/master.passwd, /etc/spwd.db and /etc/pwd.db are > not in agreement is my hypothesis. This was mine and several others' first thought, but I have only used vipw in editing the password database. (No addusers, nothing.) I've also duplicated this on a local FreeBSD 3.0 machine. Here is exactly what I did. I would be really interested to know if this did not produce the same problem for other people. Created a new group entry, buggy - /etc/group: (dork being the user to be added) buggy:*:5000:dork Run vipw and put the enter the following line: dork::1005:5000:Dork:/home/buggy/dork:/usr/local/bin/tcsh Verify that /home is 755 - chmod 755 /home Make the sub of home - mkdir /home/buggy Set its perms - chown root:buggy /home/buggy ; chmod 750 /home/buggy Then the user - mkdir /home/buggy/dork ; chown dork:buggy /home/buggy/dork chmod 700 /home/buggy/dork Then when he logs in, he gets: No home directory. Logging in with home = "/". and the logs get: login: _secure_path: cannot stat /home/buggy/dork/.login_conf: Permission denied > Use vipw to edit master.passwd, make some inconsequential change, > (delete some character and restore it), and exit vipw. I think > that you may have changed home directories in /etc/passwd, not > using vipw. Verify that the homedirs are correctly set when viewed > with vipw. Tried this and it had no effect. > The error message you're getting is consistent with logging > in to a non-existent directory. But why does login behave differently when called at actual login and when called from the command line immediately after the botched login? That is, it doesn't find $home after logging in, but subsequently typing 'login' and logging in again works perfectly. My thoughts on that would be that a user-id or group-id is not set when the user is first telnetting it from the outside world, but that after his botched login it is set, and the subsequent call to login pulls it from his environment settings or something along those lines. I've not extensively examined the source for login, so I apologize if any of that was infeasible, impossible, impractical, etc. > Before doing anything, try using 'finger someuser' to see what home > directory finger reports. Manually compare /etc/passwd and /etc/master.passwd. This reports correctly for all users. > Note that /etc/passwd is a _constructed_ file -- it is the sanitized > result of using vipw on /etc/master.passwd pwd.db and spwd.db are > also _constructed_. Does running vipw perhaps not reconstruct these entirely from scratch? Can I make it do so? > After all that hot air, I sure hope that's the problem. I wish it was. Thanks very much for your help though. > I cannot account for that. I can't duplicate your problem, even with > these new ownerships and permissions. If the steps at the top of this don't do it I'll be quite suprised. > Hmm, you're not running NIS, are you? Nope. Thanks again, James Snow To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message