Experimenting on the same topic I have also found inconsistent behaviour
with "./pfcmd import nodes /tmp/testimport.csv columns=mac,pid,category"

00:54:E8:61:32:00,auser,developer

00:F0:5D:18:93:00,anotheruser,developer

00:9a:4c:51:b7:00,andanotherone,developer

00:d8:00:e8:a5:00,opsuser,ops

It seems to only set the role (category) every second run if they're all
the same role, on alternate runs it unsets role altogether for the nodes.
If I attempt a mix of roles is seems to set one role type and unsets the
other!
I hope that I can avoid setting the role here altogether given my initial
query on using the existing source and mechanisms, but thought it worth
mentioning.

pf 10.2.0 On Debian 9.13
Thanks,
David

On Fri, Feb 26, 2021 at 2:59 PM David Harvey <[email protected]>
wrote:

> Dear Packetfence users,
>
> I'm looking for advice on updating my node owners whilst preserving or
> recalculating roles.
> With many new users working from home, their nodes have been registered as
> a default owner, with the role being manually set. Although I have a
> configured LDAP source which applies roles correctly to portal users, the
> users haven't been present to login through the portal.
>
> I'm looking to update the ownership with asset data that maps MAC to user
> using /pfcmd import nodes, but to do so requires the roles to be
> available on the csv file, or otherwise to set a default value.
>
> Is there a way to recalculate the role for a node from its owner
> information using an existing LDAP  authentication source? Sadly I don't
> think I can use "dot1x recompute role from portal" as my  my certs are
> machine certs and don't have the owner/pid present. I"ve been struggling to
> find info on the "MAC auth computer role from portal" option.
>
> Thanks in advance,
>
> David
>
>
> --
> Data Classification: Public
>
>

-- 
David Harvey
Director of Internal Technology, Thought Machine

Data Classification: Confidential

*Email*: [email protected]
*Web*: www.thoughtmachine.net

-- 
Thought Machine Group a limited company registered in England & Wales.
Registered number: 11114277. 
Registered Office: 5 New Street Square, 
London EC4A 3TW 
<https://maps.google.com/?q=5+New+Street+Square,+London+EC4A+3TW&entry=gmail&source=g>.


The content of this email is confidential and intended for the recipient 
specified in message only. It is strictly forbidden to share any part of 
this message with any third party, without a written consent of the sender. 
If you received this message by mistake, please reply to this message and 
follow with its deletion, so that we can ensure such a mistake does not 
occur in the future.
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to