Oliver, On Wed, Aug 17, 2011 at 7:50 AM, Olivier Bilodeau <[email protected]> wrote: >>>> What is the syntax to add a user from the command line? >>>> >>>> I was using this: /usr/local/pf/bin/pfcmd node edit 00:21:9b:3d:65:7b >>>> status="reg",pid="test.user" >>>> >>>> that worked in previous versions but in 2.2.1 it no longer works >>> >>> It should still work, what error do you get? grammar error? >>> >>> Maybe the parser got corrupted, can you try: >>> >>> $ cd /usr/local/pf >>> >>> # This is all on one line: >>> $ /usr/bin/perl -w -e 'use strict; use warnings; use diagnostics; use >>> Parse::RecDescent; use lib "./lib"; use pf::pfcmd::pfcmd; >>> Parse::RecDescent->Precompile($grammar, "pfcmd_pregrammar");' >>> >>> $ mv pfcmd_pregrammar.pm lib/pf/pfcmd/ >>> >>> and try again. >> >> That did not help, I do not get any errors. It looks like it should >> work however the node never changes to "reg" it always remains >> unregistered. >> > > Anything in logs/packetfence.log? > > Does it work through the Web Admin GUI? > > How about without the . in the pid?
Yes, there is something in the logs. I did not see it before as my production box is very noisy especially now that school is starting. Here is what I see: Aug 17 08:09:56 pfcmd(0) INFO: pfcmd calling node_modify for 00:21:9b:3d:65:7b (main::command_param) Aug 17 08:09:56 pfcmd(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf/node`, CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) Aug 17 08:09:56 pfcmd(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf/node`, CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) Aug 17 08:09:56 pfcmd(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf/node`, CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) Aug 17 08:09:56 pfcmd(0) ERROR: Database issue: We tried 3 times to serve query node_modify_sql called from pf::node::node_modify and we failed. Is the database running? (pf::db::db_query_execute) This was with a user without a dot in the pid, the results are the same with a dot in the pid. Everything works fine when going though the web gui. -- _ /-\ ndrew Niemantsverdriet Academic Computing (406) 238-7360 Rocky Mountain College 1511 Poly Dr. Billings MT, 59102 ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Packetfence-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/packetfence-users
