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

Use existing glauth environment? #13

Closed
surfrock66 opened this issue May 18, 2021 · 4 comments
Closed

Use existing glauth environment? #13

surfrock66 opened this issue May 18, 2021 · 4 comments

Comments

@surfrock66
Copy link

I have an existing glauth environment that I would like to manage with glauth-ui. It's using just the config file. I don't quite understand from the README but it seems that when you set this up, you create a blank glauth environment then this exports a .cfg which can be used. Is it possible to import from an existing glauth environment?

@traverseda
Copy link
Contributor

traverseda commented May 18, 2021

Right now all the user information, stuff like passwords or usernames, need to exist in glauth-ui's database. There's no support for importing from an existing glauth config file.

How big is your config file? If it's only a dozen users you could do something like this by hand by reading through the config file and using something like this sqlite gui to create database entries that match your glauth config. Everything except the password can be set via glauth-ui, for the password you'd need to take the password from the config and put it directly into the database, otherwise the UI would try to hash the password again.

@sonicnkt
Copy link
Owner

sonicnkt commented May 18, 2021

like @traverseda said, there is no working import yet.
I have this on my road map and even some basic import code available (not public yet since broken in parts, especially groups, and not ui for it yet) but since not all glauth user options (SSH Keys, 2FA, Home Folder, etc) are implemented yet this wouldnt work for all setups anyway.

If you dont need more than the currently implemented user options i could maybe implement a working import function but this would take some days since im quite busy atm on my day job.

@surfrock66
Copy link
Author

I think my understanding was that glauthui would work with existing glauth, and the missing attributes could be managed in a config file. For example, I could create users and manage passwords in the ui, then edit the cfg file for the home directory and other attributes. If that's not the case, I'll probably have to hold off until glauth-ui is a little more full featured as I do need to manage those posix attributes and they're already defined in my cfg file.

@sonicnkt
Copy link
Owner

at the moment it rewrites the whole conifg file from scratch as this was the easiest method and i wouldnt have to write a special parser that replaces only certain lines etc.
There is some unmerged code for glauth that support dbs as backend and this would make the method you described a lot easier to implement but as it wasnt officially available i wrote the ui as it is today.

If you could supply a more advanced config file (with any imporant/secure info removed) it would help me to see what may be needed for more advanced setups. Like i wrote in the README, i have no use for those (yet) as i am mainly using this for services where im only checking for names and groupmembership.

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

No branches or pull requests

3 participants