[Xorp-users] user group problem to run xorpsh

Avinash Aithal avinash_aithal@infosys.com
Mon, 29 Nov 2004 09:10:38 +0530


On Sun, 2004-11-28 at 02:34, Pavlin Radoslavov wrote:
Hi,

> > 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]$
> > 
> > 
> 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.
> 

Following message was found on the terminal where rtrmgr was started
when 'configure' command was executed from the xorpsh.

FOO1: user_id = 511 token =       
511xorpsh-25610-multicast******************58 29cd18a6e1fe27bb453aac7d9
249
[ 2004/11/29 10:31:59  WARNING xorp_rtrmgr:25406 XrlRtrmgrTarget +335
rtrmgr_base.cc handle_rtrmgr_0_1_enter_config_mode ] Handling method for
rtrmgr/0.1/enter_config_mode failed: XrlCmdError 102 Command failed You
do not have permission for this operation.

'id xorpuser' output is as follows:

[root@multicast rtrmgr]# id xorpuser
uid=511(xorpuser) gid=511(xorp) groups=511(xorp)
[root@multicast rtrmgr]#

Regards,
Avinash.