You can run these commands from the proxy server or any server with access to the Identity Service.
First, export the swift admin password (setup previously) in a variable so it can be re-used.
$ export ADMINPASS=secrete![[Note]](../common/images/admon/note.png)
Note If you do not wish to have the swift admin password stored in your shell's history, you may perform the following:
$ export SWIFT_PROXY_CONF="/etc/swift/proxy-server.conf export ADMINPASS=$( grep admin_password ${SWIFT_PROXY_CONF} | awk '{ print $NF }' )Run the swift CLI, swift, with the correct Identity service URL. Export the information for ADMINPASS using
$ export ADMINPASS=secrete.$ swift -V 2.0 -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS statGet an X-Storage-Url and X-Auth-Token:
$ curl -k -v -H 'X-Storage-User: demo:admin' -H 'X-Storage-Pass: $ADMINPASS' http://<AUTH_HOSTNAME>:5000/auth/v2.0Check that you can HEAD the account:
$ curl -k -v -H 'X-Auth-Token: <token-from-x-auth-token-above>' <url-from-x-storage-url-above>Use swift to upload a few files named ‘bigfile[1-2].tgz’ to a container named ‘myfiles’:
$ swift -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS upload myfiles bigfile1.tgz $ swift -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS upload myfiles bigfile2.tgzUse swift to download all files from the ‘myfiles’ container:
$ swift -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS download myfiles
![]() | Note |
|---|---|
If you are using swauth in preference to the
OpenStack Identity service, you should use the
|

