fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] multiple levels of login


From: Srivathsan Srinivas
Subject: [Fab-user] multiple levels of login
Date: Sat, 31 Mar 2012 17:50:04 -0700

Hi,
    I am a new user of Fabric and it is wonderful using it. I am now able to login to a set of hosts and run some basic commands. However, I do not know how to do the following:
- login to a set of hosts.  (I can do this nicely)
- Once I am logged in to one of them, I have to :
           a) do a "kinit <user-name>@<domain-name>.com"
           b) This kerberos authentication will ask for a password (different from login/ssh password). Fabric must enter this password and enter.How to do this??

So, how do I do this kind of dual-layer login? An example script:


import sys
import time, string, datetime
import os.path

from fabric.api import *
from fabric.operations import local, put
from apscheduler.scheduler import Scheduler

from configobj import ConfigObj
from fabric.contrib.files import contains, exists, sed

config = ConfigObj('./config.txt')

def get_cred():
    env.password = config['test_pass']
    env.hosts = config['test_host']
    env.user = config['test_user']

def kinit_test():
    run('kinit address@hidden')
    ?????  I need to somehow supply the kerberos password here ????
    run('hadoop fs -count -q /user/srisrini')

--
Thanks,
Srini.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]