From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 20 22:40:08 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9236716A4CE for ; Sun, 20 Mar 2005 22:40:08 +0000 (GMT) Received: from outgoing.redshift.com (outgoing.redshift.com [207.177.231.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5285543D1D for ; Sun, 20 Mar 2005 22:40:08 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (216-228-19-21.dsl.redshift.com [216.228.19.21]) by outgoing.redshift.com (Postfix) with SMTP id A6C9997023; Sun, 20 Mar 2005 14:40:03 -0800 (PST) Message-Id: <3.0.1.32.20050320144012.00a5f3f8@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Sun, 20 Mar 2005 14:40:12 -0800 To: "H. S." , freebsd-hackers@freebsd.org From: ray@redshift.com In-Reply-To: <49296.81.84.174.5.1111346817.squirrel@mail.revolutionsp.co m> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: passwd & permissions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2005 22:40:08 -0000 This may be partially related to the fact that I believe the system generates those files automatically from /etc/master.passwd. So if you change the perms on /etc/passwd, then when the system comes along and regenerates the files from /etc/master.passwd, it would change the permissions during that process I would think. I've never looked into the details of how it all happens (as far as master.passwd vs. passwd), but this might be something to check into, as it could relate to your situation. Ray At 01:26 PM 3/20/2005 -0600, H. S. wrote: | Hey, | | I'm using FreeBSD on various servers for many time now, and there is | something that always bothered me. It is related to /etc/passwd and | /etc/pwd.db permissions. | | I have custom (0640) permissions on these files. However, each time a user | changes his/her password, the system will reset the password file | permissions back to the original (rw r r). I'm not much of a programmer, | but I tried to change passwd.c source to do a execl() at the end of the | file (calling chmod). After trying it, the permissions were reset anyway, | so I added a perror("execl") and it says permission denied. Should be | because passwd dropped privileges at that part of the program. I've | thought about a cron job to fix the permissions every X minutes, but I'd | like a more "clean" option to this. | | Where in the system can I change the permission-reset behaviour ? This | also happens, for example, with /usr/local/sbin/ (rwx rx x are my | permissions) after I upgrade any port, it will be rwx rx rx , and | /usr/local/www too. | | I've edited the mtree/ files as it sounded like a good lead, but the | behaviour remains. | | What should I do ? | | Thanks. | | _______________________________________________ | freebsd-hackers@freebsd.org mailing list | http://lists.freebsd.org/mailman/listinfo/freebsd-hackers | To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" | |