try surrounding the entire string with single quotes instead of double quotes. My terminal is a bit rusty but I seem to remember it treats it differently with single quotes.
by entire string I meant the file path. like this:
fmsadmin certificate create '/CN=www.briggsassociates.info/O=Briggs&Associates/C=US/ST=Georgia/L=Alpharetta'
fmsadmin certificate create ‘/CN=briggsassociates.info/O=Briggs&Associates, Inc./C=US/ST=Georgia/L=Alpharetta’
-bash: Associates,: command not found
fmsadmin: Invalid subject attribute
error: 11 (invalid name)
it looks like the ampersand is terminating the string to me...
Yeah, definitely appears that way. I just noticed you have a space in there, did you try escaping those characters as well before?
EG: fmsadmin certificate create "/CN=briggsassociates.info/O=Briggs\&Associates,\ Inc./C=US/ST=Georgia/L=Alpharetta”
there’s a comma and period in there as well that might be suspicious.
backslash is still a valid character escape in terminal AFAIK.
I think Mike's idea is a good one, but that you need to check the quote char that you are using. It looks to me like you've got a single curly quote, and not the Unicode 0027 quote that the Terminal will be looking for.
To illustrate, here's the result I see by running an echo command in the Terminal, using the same string, but enclosed in the different styles of quotes:
1) Using curly quotes breaks (similar to what you posted above):
~ cc$ echo ‘foo&foo’
-bash: foo’: command not found
+ Done echo ‘foo
2) Using "regular" single quote chars works as expected:
~ cc$ echo 'foo&foo'
fmsadmin certificate create /CN=www.briggsassociates.info/O=Briggs\&Associates/C=US/ST=Georgia/L=Alpharetta
works to actually create the csr and serverKey...
now i must ask Comodo if this will be ok for my company. The ampersand breaks the quotes and the single quotes. I did not know you could escape the space. gotta try that too...
it is possible that you are correct, I am on mac and I don't know if my quote is curly?
I type the long string into the text edit program and then copy paste into terminal...
Thanks Steve, good tip. I wonder if it’s just technet converting what he copied and pasted?
@Charles & Mike,
It's always possible that the forum software is changing some chars on us, but from what I am observing of my post above, it mostly gets the chars as I entered them in my post.
I do think that Mike's idea of quoting the string is heading in a real good direction, it's just a matter of making sure we can get some single quote chars around the string before we give up.
If you are using TextEdit, you might try making sure that your document is set to plain text (not rich text format), and moreover, you might have a preference set to use "smart quotes", which could be replacing a single quote char with its curly counterpart.
Here is a screenshot of my TextEdit preferences where I have smart quotes turned off (for just this type of reason):
I'll bet with a little bit of experimentation you could determine if TextEdit is changing your quotes on you and thus breaking your Terminal command. I suspect that it is.
p.s. If you throw your quote char into the data viewer, i.e. Code( "'" ), you should get a value of 39 if it is a single quote char that you want in this case.