[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] help passing a hashed password
From: |
Marshel Helsper |
Subject: |
Re: [Fab-user] help passing a hashed password |
Date: |
Wed, 5 Jun 2013 16:12:13 -0400 |
Would this work?
sudo("echo {password} | passwd --stdin
{user}".format(password=password,user=username))
As for being able to specify from the command line, just make sure the task
you're using has those parameters. Something like what I used to test the above
command.
@task
def change_password(user, password):
sudo("echo {0} | passwd --stdin {1}".format(password, user))
Hope that helps. The issue there, of course, is that the password isn't
pre-hashed before going across the network.
Thanks,
Marshel Helsper
QA/Release Engineer
NetProspex Inc.
address@hidden
On Jun 5, 2013, at 3:42 PM, Tim Burby <address@hidden> wrote:
> Hi All,
> I am new to fabric but I'm really appreciating the power. I'm a middling sys
> admin with sudden responsibility for about 50 servers. the Environment is
> currently handled machine by machine for authentication. How can I pass a
> hashed password to either useradd or usermod?
> I tried sudo("usermod -p 'wholebunchofhashstuff' jsmith") and sudo("usermod
> -p \'wholebunchofhashstuff\' jsmith" but both have failed. and would there
> be a way to pass the hash in from a command option? I've combed the web as
> best as I can but pure sys admin examples are never as full as I'd like.
>
> Thanks
>
> Tim
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user