Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we login to MAAS web UI, we can see the user MAAS Key in the Preferences page. Is there any chance to cat it as a text via console command maas shell?!

share|improve this question

maas shell

>>> from apiclient.creds import convert_tuple_to_string
>>> from django.contrib.auth.models import User
>>> from maasserver.models.user import get_creds_tuple
>>> admin = User.objects.get(username='admin')
>>> token = admin.tokens.all()[0]
>>> print convert_tuple_to_string(get_creds_tuple(token))
share|improve this answer
>>> from apiclient.creds import convert_tuple_to_string Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named apiclient.creds – Yasser Zamani Apr 27 '13 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.