Can't save to NC: error operator does not exist: character varying = bytea Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Try to resynch in Global to an NC, or even save a person to the NC and get:

error operator does not exist: character varying = bytea
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.

If the admin user on the NC doesn't have a username/password:

begin;
update person set s2ncpassword=set_password ('xxxx'), s2ncusername ='admin' where id =1;
insert into persontorole (personid, roleid) values (1, 4);
commit;

Where xxxx equals the password.

On really old versions, it's 
set s2ncpassword=password('xxxx')