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 [email protected]')
    ?????  I need to somehow supply the kerberos password here ????
    run('hadoop fs -count -q /user/srisrini')

-- 
Thanks,
Srini. <http://csc.lsu.edu/%7Essrini1/>
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to