fab-user
[Top][All Lists]
Advanced

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

[Fab-user] Putting a local file owned by root?


From: Simpson Lachlan
Subject: [Fab-user] Putting a local file owned by root?
Date: Mon, 14 Dec 2015 03:23:47 +0000

I'm trying to use Fabric to deploy SLURM on new worker nodes.

As part of this process, I need to copy a file from the head node (with 
fabfile) to the worker node. The file is owned by root locally.

I started out with
    put('/etc/munge/munge.key', '/etc/munge/munge.key', use_sudo=True, 
mirror_local_mode=True)
but I think I've just discovered that use_sudo=True is a reference to the 
remote, not the local.

Then I found some discussion around 
    with settings(user='<username>'):
so I tried that wrapped around the put, with username=root, and this failed 
when the login prompt asked for a non existent root password on the remote 
server.

How can I run a local sudo user?

Am I asking too much - should I build it part by part? (ie, use local to cp 
file to user's ~/tempfile.key, put file, adjust remote perms, use local to 
remove temp file)

Cheers
L.
This email (including any attachments or links) may contain
confidential and/or legally privileged information and is
intended only to be read or used by the addressee.  If you
are not the intended addressee, any use, distribution,
disclosure or copying of this email is strictly
prohibited.
Confidentiality and legal privilege attached to this email
(including any attachments) are not waived or lost by
reason of its mistaken delivery to you.
If you have received this email in error, please delete it
and notify us immediately by telephone or email.  Peter
MacCallum Cancer Centre provides no guarantee that this
transmission is free of virus or that it has not been
intercepted or altered and will not be liable for any delay
in its receipt.




reply via email to

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