Closed zerwes closed 3 weeks ago
Evidently i was also looking.
Tried configctl auth user changed root
after adding a new base64 encoded string but that didn't trigger it 😞
https://github.com/opnsense/core/blob/24.7.1/src/opnsense/scripts/auth/add_user.php#L71 https://github.com/opnsense/core/blob/24.7.1/src/etc/inc/auth.inc#L414-L425 https://github.com/opnsense/core/blob/24.7.1/src/www/system_usermanager.php#L399
Hello @crpb
maybe local_sync_accounts()
(https://github.com/opnsense/core/blob/24.7.1/src/etc/inc/auth.inc#L243) is more what we are looking for?
Not sure when I will find the time for this, so if you finde some new hints, you eare welcome to share them, all contributions are wellcome
ok; just did a q&dirty test with apparently a good result (at least regarding the ssh keys)
@crpb if you find the time and like to do some testing, could you please create a script
synclocalaccounts.php
(on the opnsense device as root and chmod it to 700)
#!/usr/local/bin/php
<?php
require_once 'config.inc';
require_once 'auth.inc';
local_sync_accounts();
?>
deploy some user related changes via ansible to the /conf/config.xml and run the script manually afterwards and test if the user settings changed in the xml are pushed through?
Would be somehow nice if 3 lines of code will do the trick :smiley: ...
@crpb testing on the branch localaccounthandler ( #94 ) should be even easier, as the 3line-handler is already implemented there ...
at least the
authorizedkeys
key need some trigger to put the ssh keys into.ssh/authorized_keys
wip for #12