[Xorp-users] user group problem to run xorpsh

Avinash Aithal avinash_aithal@infosys.com
Mon, 06 Dec 2004 09:46:44 +0530


On Tue, 2004-11-30 at 03:04, Pavlin Radoslavov wrote:

> 
> OK, the above output seems fine. Then, I guess the problem is with
> building the UserDB from the system password and group
> files/databases. To trace the problem further, could you apply the
> following patch to rtrmgr/userdb.cc (the patch below is against the
> lastest userdb.cc: rev 1.7):

> When you run the rtrmgr, on startup you should see output like:
> 
> FOO3: UserDB::add_user(): user_id = 511, username = xorpuser
> FOO5: found user xorpuser in group xorp
> FOO5: found user <...> in group xorp
> FOO5: found user <...> in group xorp
> FOO6: add config capability for user xorpuser
> 
> If you don't see the FOO3 line for user xorpuser, then getpwent(3)
> somehow doesn't find a password file entry for user xorpuser.
> For example, could be that inside your /etc/passwd you don't have
> entry for xorpuser (e.g., if you use NIS, etc).
> 
> If you don't see the FOO5 line for user xorpuser, then the result
> returned by getgrnam(3) for group "xorp" somehow didn't contain
> entry for user xorpuser. In that case, could you verify that your
> /etc/group file contains a line for group "xorp", and that line
> lists "xorpuser".
> Here is a guess about the problem: because your xorpuser belongs to
> only one group ("xorp"), this has been recorded in the /etc/passwd
> file so "id xorpuser" shows that xorpuser belongs to group
> xorp. However, inside /etc/group there is no entry like
> xorp:x:511:xorpuser
> Apparently, the UserDB::add_user() implementation uses only
> getgrnam() to load the user->group mapping (when it should consider
> the /etc/passwd database as well). To verify that, could you use
> "vigr" and add "xorpuser" to the xorp group/line.
> E.g.: "xorp:x:511:xorpuser"
> 
> Please let me know the result.

Your observations were on target. The problem got solved after I added
'xorpuser' in the /etc/group file. Thanks for the support.

Cheers!!,
Avinash.