Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you create new users? #206

Open
marcinpolanski opened this issue Jan 26, 2023 · 15 comments
Open

Can you create new users? #206

marcinpolanski opened this issue Jan 26, 2023 · 15 comments
Labels
good first issue Good for newcomers

Comments

@marcinpolanski
Copy link

Is there a way that you can create and remove users?

@alagoutte
Copy link
Contributor

Hi @marcinpolanski, there is a draft PR for this but not yet ready to be include (need some change @CedricMoreau !)

#190

@marcinpolanski
Copy link
Author

Awesome!
Is there an eta on when this will be available?

@alagoutte
Copy link
Contributor

Awesome! Is there an eta on when this will be available?

No really ETA for this feature, need some (re)work before merge...

But you can already try if you want !

@marcinpolanski
Copy link
Author

how do I try it out?

@alagoutte
Copy link
Contributor

how do I try it out?

Hi you need to use local.ps1 from this branch #206 (comment) (you can copy the file and replace on PowerFGT moduler folder and need to import-module with -force)

@marcinpolanski
Copy link
Author

is there an option to create a remote radius user?

@alagoutte
Copy link
Contributor

is there an option to create a remote radius user?

Yes using Add-FGTLocalUser -radius XXXX -...

with XXXX the name of RADIUS server (on config user radius)

@marcinpolanski
Copy link
Author

awesome thanks! Got it to work. Is there an option to add a user to a user group?

@alagoutte
Copy link
Contributor

awesome thanks! Got it to work. Is there an option to add a user to a user group?

No yet but you can look what you make for Add Member on Address Groups ( https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/firewall/addressgroup.ps1#L105) it is the same fro User Group using PUT call with uri api/v2/cmdb/user/group/XXXX (where XXXX is the group name)

@alagoutte alagoutte added the good first issue Good for newcomers label Apr 15, 2024
@marcinpolanski
Copy link
Author

any update on this?

@alagoutte
Copy link
Contributor

any update on this?

Work in progress... it is now possible to add User Local (password) (Thanks @CedricMoreau and soon User LDAP (#259) (@CedricMoreau) and User Group (#261)

but also need to release a new release... (before end of year i hope...)

@marcinpolanski
Copy link
Author

marcinpolanski commented Sep 5, 2024

I have copied the "Add-FGTFirewallAddressGroupMember" function, renames it to "Add-FGTFirewallUserGroupMember" and changed the $uri. Should this work now?
image

When testing i am getting this error:
{643E7BD9-C15F-4CC2-A0FF-11BE51AE6A8A}

@alagoutte
Copy link
Contributor

You need to remove [ValidateScript...] line and it will be work

it is planned to add on #261

@alagoutte
Copy link
Contributor

I fixed the validate error, now getting a new error: {643E7BD9-C15F-4CC2-A0FF-11BE51AE6A8A}

It is the same error...

@marcinpolanski
Copy link
Author

Yes sorry... ignore that, I made it work!
Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants