Skip to content

Instantly share code, notes, and snippets.

View spiderfingers's full-sized avatar

spiderfingers

View GitHub Profile
@spiderfingers
spiderfingers / fabric.py
Created September 12, 2013 12:29
fabric upload SSH key
def UploadSSHPubKey():
_Home = os.environ['HOME']
_PubKeyFile = _Home + "/.ssh/id_rsa.pub"
_PubKey = open(_PubKeyFile, 'r').read().strip('\n')
with cd('~'):
run('mkdir -p .ssh')
run('chmod 700 .ssh')
append('.ssh/authorized_keys', _PubKey)
@spiderfingers
spiderfingers / upload-ssh-keys.py
Created September 12, 2013 07:12
first python sctipt) checks if RSA is created and uploads public keys to remote host
#!/usr/bin/python
# puts current user's public key to remote host
# andy slepuhin, devops
# 2013-09-11, wargaming.net
import os, optparse
parser = optparse.OptionParser()
parser.add_option('-l', '--login', help='username', dest='Login')
@spiderfingers
spiderfingers / smb.cfg
Created February 29, 2012 09:39
smb.conf QNAP NAS TS-859 PRO +
[global]
passdb backend = smbpasswd
workgroup = NAS
security=user
server string=NAS Server
encrypt passwords = Yes
username level = 0
map to guest = Bad User
null passwords = yes
max log size = 10