def user_password_update(user_id=None, name=None, password=None, profile=None, **connection_args):
 kstone = auth(profile, **connection_args)
 if name:
  for user in kstone.users.list():
   if (user.name == name):
    user_id = user.id
    break
 if (not user_id):
  return {'Error': 'Unable to resolve user id'}
 if (_OS_IDENTITY_API_VERSION > 2):
  kstone.users.update(user=user_id, password=password)
 else:
  kstone.users.update_password(user=user_id, password=password)
 ret = 'Password updated for user ID {0}'.format(user_id)
 if name:
  ret += ' ({0})'.format(name)
 return ret

def user_password_update ( user_id = None , name = None , password = None , profile = None , ** connection_args ) : kstone = auth ( profile , ** connection_args ) if name : for user in kstone . users . list ( ) : if ( user . name == name ) : user_id = user . id break if ( not user_id ) : return { 'Error' : 'Unable to resolve user id' } if ( _OS_IDENTITY_API_VERSION > 2 ) : kstone . users . update ( user = user_id , password = password ) else : kstone . users . update_password ( user = user_id , password = password ) ret = 'Password updated for user ID {0}' . format ( user_id ) if name : ret += ' ({0})' . format ( name ) return ret
update a users password cli examples: .