Bug 492274
Summary: | Augeas can't write sudoers | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Sergio Pascual <sergio.pasra> | ||||||
Component: | augeas | Assignee: | David Lutterkort <lutter> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | el5 | CC: | apevec, hbrock, lutter | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-24 16:38:46 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Can you also add the following to commands at the end of your little test script: augtool> print /files/etc/sudoers/spec[last()] augtool> print /augeas/files/etc/sudoers and add that output from the EL5 machine. # augtool augtool> set /files/etc/sudoers/spec[801]/user foo augtool> set /files/etc/sudoers/spec[last()]/host_group/host ALL augtool> set /files/etc/sudoers/spec[last()]/host_group/command ALL augtool> print /files/etc/sudoers/spec[last()] /files/etc/sudoers/spec /files/etc/sudoers/spec/user = "foo" /files/etc/sudoers/spec/host_group /files/etc/sudoers/spec/host_group/host = "ALL" /files/etc/sudoers/spec/host_group/command = "ALL" augtool> print /augeas/files/etc/sudoers /augeas/files/etc/sudoers /augeas/files/etc/sudoers/path = "/files/etc/sudoers" /augeas/files/etc/sudoers/lens /augeas/files/etc/sudoers/lens/info = "/usr/share/augeas/lenses/sudoers.aug:339.10-.57" /augeas/files/etc/sudoers/lens/id = "0x81095a8" /augeas/files/etc/sudoers/error = "parse_failed" /augeas/files/etc/sudoers/error/pos = "1848" /augeas/files/etc/sudoers/error/message = "Short iteration" augtool> save Saving failed augtool> Created attachment 336986 [details]
Ouput of strace with print /files/etc/sudoers and print /augeas/files/etc/sudoers
The problem is that the sudoers lens fails reading the sudoers file on startup (the failure is around character 1848 in the file) - that's what the entries under /augeas/files/etc/sudoers/error are saying When you subsequently change some entries and try to save, the tree is incomplete and saving fails for that reason. The big question now is why it's not reading your sudoers file - we have a bunch of fixes queued up for 0.5.0 that _might_ address that. Is your sudoers changed in any way or is it the stock file from EL5 ? Just to be sure, I uninstalled sudo and then reinstalled again, augeas is still failing in the same place, in the sudoers from rpm without modification Could you try again with augeas-0.5.0 ? If it still fails, please add the result of "print /augeas//error" to this bug. David, it works with augeas 0.5.0. Thanks |
Created attachment 336775 [details] Output of strace This works fine in fedora 10 and 9 # augtool augtool> set /files/etc/sudoers/spec[801]/user foo augtool> set /files/etc/sudoers/spec[last()]/host_group/host ALL augtool> set /files/etc/sudoers/spec[last()]/host_group/command ALL augtool> save Saved 1 file(s) augtool> but it's not working in el5 # augtool augtool> set /files/etc/sudoers/spec[801]/user foo augtool> set /files/etc/sudoers/spec[last()]/host_group/host ALL augtool> set /files/etc/sudoers/spec[last()]/host_group/command ALL augtool> save Saving failed augtool> Versions: augeas-0.3.6-2.el5 sudo-1.6.8p12-12.el5 The ouput of strace augeas is attached