[Xorp-users] user group problem to run xorpsh

Pavlin Radoslavov pavlin@icir.org
Sat, 27 Nov 2004 13:04:18 -0800


Avinash,

> I'm a newbie to this group. I just installed Xorp on a Linux machine and
> could start the xorp_rtrmgr without problems. But I'm not able to enter
> the 'configure mode' using xorpsh. I've logged in as a user who belongs
> to group 'xorp'.
>  
> Here are the relevant details:
> 
> Xorp> configure
> ERROR: You do not have permission for this operation..
> Xorp> quit
> [xorpuser@multicast rtrmgr]$ whoami
> xorpuser
> [xorpuser@multicast rtrmgr]$ id
> uid=511(xorpuser) gid=511(xorp) groups=511(xorp)
> [xorpuser@multicast rtrmgr]$
> 
> 
> Xorpsh user guide just mandates that the user belong to group 'xorp'.
> Even GID is not important. Could someone please point whats wrong? 

You have done the correct thing, so there is no obvious reason why
you are getting the above error. To track the problem, could you
apply the following simple patch to rtrmgr/xrl_rtrmgr_interface.cc:

Index: xrl_rtrmgr_interface.cc
===================================================================
RCS file: /usr/local/share/doc/apache/cvs/xorp/rtrmgr/xrl_rtrmgr_interface.cc,v
retrieving revision 1.24
diff -c -u -r1.24 xrl_rtrmgr_interface.cc
--- xrl_rtrmgr_interface.cc	19 Aug 2004 00:44:08 -0000	1.24
+++ xrl_rtrmgr_interface.cc	27 Nov 2004 20:54:10 -0000
@@ -240,6 +240,7 @@
 	return XrlCmdError::COMMAND_FAILED(response);
     }
     uint32_t user_id = get_user_id_from_token(token);
+    printf("FOO1: user_id = %u token = %s\n", user_id, token.c_str());
     if (_userdb.has_capability(user_id, "config") == false) {
 	response = "You do not have permission for this operation.";
 	return XrlCmdError::COMMAND_FAILED(response);


Then, run again the rtrmgr, and try to enable configuration
via xorpsh, and send the printf() message that starts with the
FOO1 marker. Also, please run "id xorpuser" from the terminal window
you used to start the rtrmgr and include the output in your email.

Thanks,
Pavlin