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

sshd lense doesn't seem to handle groups with spaces #477

Closed
davealden opened this issue Jun 27, 2017 · 4 comments
Closed

sshd lense doesn't seem to handle groups with spaces #477

davealden opened this issue Jun 27, 2017 · 4 comments

Comments

@davealden
Copy link

davealden commented Jun 27, 2017

Hi,
I'm having problems using augeas on my sshd_config which has an AllowGroup with a space:

# grep AllowGroups /etc/ssh/sshd_config
AllowGroups math-domain-users "access admins"
# augtool print /files/etc/ssh/sshd_config/AllowGroups
/files/etc/ssh/sshd_config/AllowGroups
/files/etc/ssh/sshd_config/AllowGroups/1 = "math-domain-users"
/files/etc/ssh/sshd_config/AllowGroups/2 = ""access"
/files/etc/ssh/sshd_config/AllowGroups/3 = "admins""

Help?

@davealden
Copy link
Author

Anyone? :)

@sluetze
Copy link

sluetze commented Jul 10, 2017

Hi,
afaik groups under unix should match the pattern "[_a-z][-0-9_a-z]*$?" as in libmisc/chkname.c and the lense seems to keep to that concept.

i guess the compliant way to fix it would be to fix the groupname to the matching pattern.

disclaimer: i don't work in this project

rgds
-- sluetze

@davealden
Copy link
Author

Linux allows groups with spaces - I'm not happy about that, but it is what it is. :)

Our machines are bound to our Active Directory server and the Windows folks seem to love group names with spaces. There's no way we are going to get them to do away with them.

@raphink
Copy link
Member

raphink commented Aug 9, 2017

The current allowed value is /[^ \t\n]+/ indeed. I'd welcome a PR to fix that.

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

No branches or pull requests

4 participants