Bug 430709
| Summary: | ipa-addgroup behaviour is inconsistent | ||
|---|---|---|---|
| Product: | [Retired] freeIPA | Reporter: | David O'Brien <daobrien> |
| Component: | ipa-admintools | Assignee: | Rob Crittenden <rcritten> |
| Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 1.0 | CC: | benl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | freeipa-2.0.0-1.fc15 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-03-27 07:16:20 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 246164, 429034 | ||
Looks like there was a typo in the file when I did a replace to use
ipavalidate.String instead of ipavalidate.ipastring.
diff -r fc901c4cde81 -r 1fd6752e3193 ipa-admintools/ipa-addgroup
--- a/ipa-admintools/ipa-addgroup Thu Jan 31 10:52:05 2008 -0500
+++ b/ipa-admintools/ipa-addgroup Thu Jan 31 10:59:38 2008 -0500
@@ -71,7 +71,7 @@ def main():
cont = True
else:
cn = args[1]
- if (ipavalidate.ipastsring(cn, notEmpty=True)):
+ if (ipavalidate.String(cn, notEmpty=True)):
print "Please enter a value"
return 1
This was committed in changeset 613.
This will fix passing the group name on the command-line.
The requirement of quotes around the description is due to the shell. It
interprets anything with a space as a separate argument. Putting quotes around
something tells the shell "treat this as a single arg". There is nothing we can
do about it.
QA Verified on May 28, 2008 (Yi) Build used: May 28, 2008 (i386) Test as below: ipaserver[05/28/08 11:17] ipa-addgroup -d "this is 'a quote', but it should be ok" grp001 grp001 successfully added ipaserver[05/28/08 11:18] ipa-findgroup grp001 dn: cn=grp001,cn=groups,cn=accounts,dc=ipaqa,dc=com GID: 1100 Full Name: grp001 Description: this is 'a quote', but it should be ok |
Description of problem: - No facility to pass the group name on the command line - If you use -d groupDescription then you need to "Quote names with spaces". - If you use the command in interactive mode, there is no need to quote group names with spaces. - If you try to pass the group name on the command line after the description you get an ugly error: # ipa-addgroup -d "all members of finance" finance Traceback (most recent call last): File "/usr/sbin/ipa-addgroup", line 118, in <module> sys.exit(main()) File "/usr/sbin/ipa-addgroup", line 71, in main if (ipavalidate.ipastsring(cn, notEmpty=True)): AttributeError: 'module' object has no attribute 'ipastsring' Version-Release number of selected component (if applicable): http://apoc.dsdev.sjc.redhat.com/tet/results/FC7/i386/2008-01-28_03_01-build/dist How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: