The X-Auth-Token is what you get back from the authentication call you're trying to make -- try removing the header completely. If you're still getting a 401 error back, either your username or password is wrong, your tenant name is wrong, or you haven't granted "adminUser" any role(s) on "adminTenant".<br clear="all">
<div><br></div>-Dolph<br>
<br><br><div class="gmail_quote">On Mon, Oct 1, 2012 at 7:30 PM, Ahmed Al-Mehdi <span dir="ltr"><<a href="mailto:ahmed@coraid.com" target="_blank">ahmed@coraid.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Hi Joe,</div><div><br></div><div>Actually, the curl command with the "X_Auth_Token" is my weak attempt to try to find a solution.  I am actually issuing the following command (per recommendation from the OpenStack document - "Install and Deploy Manual – Red Hat Ubuntu"):</div>
<div><br></div><div><div>root@bodega:~# curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials": {"username": "adminUser", "password": "secretword"}}}' -H "Content-type: application/json" -H "X_Auth_Token: ahmedadmintoken" <a href="http://10.176.20.158:35357/v2.0/tokens" target="_blank">http://10.176.20.158:35357/v2.0/tokens</a> | python -mjson.tool</div>
<div class="im"><div>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current</div><div>                                 Dload  Upload   Total   Spent    Left  Speed</div></div><div>100   231    0   116  100   115  12927  12816 --:--:-- --:--:-- --:--:-- 14500</div>
<div class="im"><div>{</div><div>    "error": {</div><div>        "code": 401, </div><div>        "message": "The request you have made requires authentication.", </div><div>        "title": "Not Authorized"</div>
<div>    }</div><div>}</div></div></div><div><br></div><div>Regards,</div><div>Ahmed.</div><div><br></div><div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> heckj <<a href="mailto:heckj@mac.com" target="_blank">heckj@mac.com</a>><br><span style="font-weight:bold">Date: </span> Monday, October 1, 2012 5:23 PM<br><span style="font-weight:bold">To: </span> Ahmed Al-Mehdi <<a href="mailto:ahmed@coraid.com" target="_blank">ahmed@coraid.com</a>><br>
<span style="font-weight:bold">Cc: </span> "<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>" <<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>><br>
<span style="font-weight:bold">Subject: </span> Re: [Openstack] Enabling logging in keystone.<br></div><div><div class="h5"><div><br></div><div><div style="word-wrap:break-word">
Ahmed - 
<div><br></div><div>The header that's supposed to have the token within it is labelled "X-Auth-Token', not "X_Auth_Token".  Unless you're really comfortable with the protocol, I'd recommend using the keystone CLI from the python-keystoneclient to do your verifying, using
 it's debugging (which is to show you the curl output that you did below).</div><div><br></div><div>-joe </div><div><br></div><div><div><div>On Oct 1, 2012, at 5:12 PM, Ahmed Al-Mehdi <<a href="mailto:ahmed@coraid.com" target="_blank">ahmed@coraid.com</a>> wrote:</div>
<blockquote type="cite"><div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif"><div>Hello,</div><div><br></div><div>I am trying to verify the installation of keystone.  When I try to run some "curl" commands, I get the following error message:</div>
<div><br></div><div><div>root@bodega:~/ahmed/keystone-init# curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials": {"username": "adminUser", "password": "secretword"}}}' -H "Content-type: application/json" -H "X_Auth_Token: ahmedadmintoken"
<a href="http://10.176.20.158:35357/v2.0/tokens" target="_blank">http://10.176.20.158:35357/v2.0/tokens</a> | python -mjson.tool</div><div>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current</div>
<div>                                 Dload  Upload   Total   Spent    Left  Speed</div><div>100   231    0   116  100   115  15205  15074 --:--:-- --:--:-- --:--:-- 16571</div><div>{</div><div>    "error": {</div>
<div>        "code": 401, </div><div>        "message": "The request you have made requires authentication.", </div><div>        "title": "Not Authorized"</div><div>    }</div>
<div>}</div></div><div><br></div><div><br></div><div>I don't see any message in the /var/log/keystone/logging.conf file.   I can pass "-debug" option to keystone to enable debugging, but I am not sure how to do that from curl.  Following is content of /etc/keystone/logging.conf file:</div>
<div><br></div><div><div>root@bodega:~# cat /etc/keystone/logging.conf </div><div>[loggers]</div><div>keys=root</div><div><br></div><div>[formatters]</div><div>keys=normal,normal_with_name,debug</div><div><br></div><div>[handlers]</div>
<div>keys=production,file,devel</div><div><br></div><div>[logger_root]</div><div>level=WARNING</div><div>handlers=file</div><div><br></div><div>[handler_production]</div><div>class=handlers.SysLogHandler</div><div>level=ERROR</div>
<div>formatter=normal_with_name</div><div>args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)</div><div><br></div><div>[handler_file]</div><div>class=FileHandler</div><div>level=DEBUG</div>
<div>formatter=normal_with_name</div><div>args=('/var/log/keystone/keystone.log', 'a')</div><div><br></div><div>[handler_devel]</div><div>class=StreamHandler</div><div>level=NOTSET</div><div>formatter=debug</div>
<div>args=(sys.stdout,)</div><div><br></div><div>[formatter_normal]</div><div>format=%(asctime)s %(levelname)s %(message)s</div><div><br></div><div>[formatter_normal_with_name]</div><div>format=(%(name)s): %(asctime)s %(levelname)s %(message)s</div>
<div><br></div><div>[formatter_debug]</div><div>format=(%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s</div><div>root@bodega:~# </div></div><div><br></div><div>Any help would be greatly appreciated.</div>
<div><br></div><div>Regards,</div><div>Ahmed.</div><div><br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br></blockquote></div><br></div></div></div></div></div></span></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br>