can't login as anyone - not even as root!

horio shoichi bugsgrief at bugsgrief.net
Fri Aug 29 00:43:43 PDT 2003


On Thu, 28 Aug 2003 21:40:20 -0700 (PDT)
Dave Banning <sky_tracker at yahoo.com> wrote:
> Thanks, Sunil for the steps, but I have tried that already.
> 
> When I get to the # prompt in single user mode, I cannot use 
> the passwd command. I get the error;;
> 
> passwd: error opening database: /etc/pwd.db: Permission denied
> passwd: /etc/master.passwd: unchanged
> 
> and permissions are as follows;
> 
> # ls -tld /etc
> drwxr-xr-x  17  root  wheel  2560  Aug 28 09:16 /etc
> 
> # ls -tld /etc/pwd.db
> drw---r-- 1 root wheeel  40960 Aug 28 09:12 /etc/pwd.db
> 
> I -can- execute vipw and change passwords. It updates all the files
> master.passwd, spwd.db, passwd, and pwd.db without error.
> 

I think the /etc/pwd.db line should contain at least two errors.
If they aren't transcription errors one of them can be disastrous.

1) is there wheeel group, really ?

2) pwd.db is, as the name suggests, a file. The line should start with '-'.
   If it is a directory, it would have at least one permission 'x'.
   
   Mine is like this: 

	%ls -l /etc/pwd.db
	-rw-r--r--  1 root  wheel  40960 Jun 24 15:11 /etc/pwd.db


If pwd.db is indeed like that try remove it and do pwd_mkdb.


horio shoichi

> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 



More information about the freebsd-questions mailing list