From owner-freebsd-questions Thu Jan 11 13:15:55 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hemi.metrotv.com (unknown [209.98.153.188]) by hub.freebsd.org (Postfix) with SMTP id EF9B137B400 for ; Thu, 11 Jan 2001 13:15:33 -0800 (PST) Received: (qmail 81342 invoked by uid 1009); 11 Jan 2001 21:33:20 -0000 Received: from unknown (HELO ?209.98.153.38?) (209.98.153.38) by mail.metrotv.com with SMTP; 11 Jan 2001 21:33:20 -0000 User-Agent: Microsoft-Entourage/9.0.2509 Date: Thu, 11 Jan 2001 15:16:06 -0600 Subject: Re: Help. /etc/pwd.db.: Permission denied From: Eric Long To: Message-ID: In-Reply-To: <01011111541200.02377@galaxy.anchoragerescue.org> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The machine is colocated, so I am waiting to see if I have any other options. However, how is this going to fix the permission problems? -Eric > > > ---------- Forwarded Message ---------- > Subject: Re: Help. /etc/pwd.db.: Permission denied > Date: Thu, 11 Jan 2001 11:49:33 -0900 > From: Beech Rintoul > To: Eric Long > > > Try this: > > boot into single user...... > > boot: -s > mount -u / > mount /usr / > passwd root > > ^D > > Hope that helps :) > > On Thursday 11 January 2001 11:31, you wrote: >> For some unknown reason, my passwd file got corrupted today. I found out >> by not being able to su to root. I can, however, ssh into the box with >> root, so I have root access to make any appropriate changes. >> >> I think I have gone through every FreeBSD related conversation on the web >> that deals with pwd.db, master.passwd, passwd, and spwd.db and still cannot >> figure out how to fix this. >> >> I ran pwd_mkdb -C /etc/passwd and came up with a corrupted line. It >> happened to be the line in the passwd file that root is defined on. I have >> restored these files numerous times (pwd_mkdb -p /etc/master.passwd and >> from master.passwd backups) and have been able to correct this corruption. >> pwd_mkdb -C /etc/passwd no longer produces errors, but I still cannot su to >> root, nor can I change passwords on any account. >> >> su'ing to root results in a "Sorry" message even though I am entering the >> correct password. >> >> Here's what happens when I try to change a password: >> >> # passwd >> passwd: error opening database: /etc/pwd.db.: Permission denied >> passwd: /etc/master.passwd: unchanged >> # >> >> I have a few other FreeBSD boxes running and have verified that permissions >> are correct. To do further tests, I changed all passwd, master.passwd, >> pwd.db, and spwd.db to world read/write to see if I could get around the >> Permission denied message. It worked...sort of. I could go through the >> password changing prompts, but after entering the verification of the new >> password, I got another permission denied message for /etc/pw.bleh where >> "bleh" was what seemed to be a few random characters each time I tried >> doing this. >> >> Furthermore, normally when su'ing alread as root, nothing happens. After >> the passwd file problems (but even now that it's fixed) I get this: >> >> # su >> su: setgroups: Operation not permitted >> su: Jan 11 15:23:33 boxname su: initgroups(root,0): Operation not permitted >> setusercontext: Operation not permitted >> # >> >> >> My permissions are correct, I have verified this by comparing them to other >> working FreeBSD boxes I run. My passwd file isn't corrupted anymore, my >> master.passwd file is also fine. >> >> Does anyone know what is wrong? >> >> Thanks in advance, >> >> -Eric >> >> >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-questions" in the body of the message > > -- > > ------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message