Solved Tor: "_tor" disappeared during update?

Must admit never seen this message before - seems very strange.
During an installation of Tor (tor-0.4.4.6...) I get the follow couple of lines:
Code:
===> Creating groups.
Using existing group '_tor'.
===> Creating users
Creating user '_tor' with uid '256'.
pw: user '_tor' disappeared during update
===> Creating homedir(s)
install: unknown user _tor
pkg: PRE-INSTALL script failed
_tor exists in both users and groups as seen here:
Code:
root@:/etc # cat group | grep tor
operator:*:5:root
_tor:*:256:
root@:/etc # cat passwd | grep tor
operator:*:2:5:System &:/:/usr/sbin/nologin
_tor:*:256:256:Tor anonymizing router:/var/db/tor:/usr/sbin/nologin
[Apologies for the formatting - cannot seem to get it to work for this message.
Maybe, I'm just having a bad day]

Is there some mixup between users and groups or something?

Any help would be appreciated.
Thanks
 
You are a genius - and very quick as well.
Thanks, but no, I'm not.

Could you point me to somewhere in the handbook (even a topic) where this is explained.
I can't remember any reference in the of /usr/doc books and articles. But It asked a few times before in the Forums.

/etc/passwd which is an ASCII file (without password ) is generated from /etc/master.passwd (encrypted password) by pwd_mkdb(8).
More info at: crypt(3), passwd(5) and pwd_mkdb(8).

In case of manually editing or replacing password file, you should manually regenerate password database.
For whatever reason there may be some inconsistency between /etc/passwd and /etc/master.passwd.
It's not specific to _tor. Anyway in such cases you should run:
/usr/sbin/pwd_mkdb -p /etc/master.passwd

Where's password database:
There're two password databases:
1. secure version: /etc/spwd.db
2. insecure one: /etc/pwd.db
More info at: db(3) and /usr/include/db.h


Here some background information:
Look at the pw_group.c in the source tree:
/usr/src/usr.sbin/pw/pw_group.c OR https://svnweb.freebsd.org/base/head/usr.sbin/pw/pw_group.c?view=markup

There's a statement, which produce that error:
Code:
if ((grp = GETGRNAM(name)) == NULL) errx(EX_SOFTWARE, "group disappeared during update");

GETGRNAM function comes from /include/grp.h with struct group * return type.

group is a structure, which is defined in the /include/grp.h:
C:
struct group {
    char    *gr_name;        /* group name */
    char    *gr_passwd;        /* group password */
    gid_t    gr_gid;            /* group id */
    char    **gr_mem;        /* group members */
};

So forth and so on. Beside the searching the web, I think to install /usr/src and search through the source files, alongside the reading manual page is always the best course of action.
 
Many thanks - will read tomorrow.
It's the end of the day here in Australia.
As said, I'm very grateful - I spend a couple of hours searching and found nothing understandable - and of course then began to worry about the integrity of my system.
Will reply tomorrow when hopefully I will have got my brain around it.
 
Back
Top