Replies: 7 comments 3 replies
-
@schwos can you share your details on how you got this working? I'm struggling with the same prefix issues, and the same error. |
Beta Was this translation helpful? Give feedback.
-
+1, would also like to understand how this works or is configured. I've hunted through the code and it seems to be related to the LDAP group (providing the DN), but doesn't seem to actually do anything when applied. I was hoping for a way to automatically assign groups to users. |
Beta Was this translation helpful? Give feedback.
-
hello guys ! note: the comparison is case insensitive but i recommend to use ascii characters only, for both sftp groups and ldap groups example this is evaluated before require_groups |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
it was a good idea to switch to AD for tests puposes. maybe prefix acts just as a filter for ldap query... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Was looking into this the other day and just wanted share my experience. I have been using the env lines in /etc/sftpgo/env.d/sftpgo-plugin-auth and during my testing I defined this: I now created three groups in the AD called: I also created the same groups in SFTPGO (exactly the same names as in the AD). Now if I add the user test to the sftpgo_primary_test in the AD, it will be added to the group sftpgo_primary_test in SFTPGO as a primary group for user test. It works the same way with the other groups. Another thing to keep in mind is that if you ex. Create the group sftpgo_membership_test in the AD and add user test to this group but do NOT add the group sftpgo_membership_test to SFTPGO, the user will not be able to log in! So a AD group that matches the configured group prefix MUST also exist in SFTPGO. Another finding is that if you use this env: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can someone let me know if the SFTPGO_PLUGIN_AUTH_PRIMARY_GROUP_PREFIX is actually a prefix to a set of groups for example GROUPPREFIX_ or is is a full group name? I have been hitting my head against the wall for a bit and looking at the debug output and doesn't matter what way I put it I am not getting the result expected.
{"level":"debug","time":"2024-05-20T20:51:13.995","sender":"connection_failed","client_ip":"x.x.x.x","username":"demo_user","login_type":"password","protocol":"HTTP","error":"NOT NULL constraint failed: users_groups_mapping.group_id"}
That environment variable appears to be miss leading.
Lastly;
Do we just put the prefix in if it is a prefix or do we put the entire group name as:
cn=groupname, ou=groups, dc=domainname, dc=org etc..
edit:
After some trial and error I believe we determined how this is setup. It is just the group itself.
Beta Was this translation helpful? Give feedback.
All reactions