# look up account name, which must exist
pw_info = pwd.getpwnam(name)
uid = pw_info[2]
# look up account name, which must exist
pw_info = pwd.getpwnam(name)
uid = pw_info[2]
pw_dir = pw_info[5]
# populate account's .ssh/authorized_keys file
dot_ssh = os.path.join(pw_dir,'.ssh')
if not os.access(dot_ssh, os.F_OK): os.mkdir(dot_ssh)
auth_keys = os.path.join(dot_ssh,'authorized_keys')
pw_dir = pw_info[5]
# populate account's .ssh/authorized_keys file
dot_ssh = os.path.join(pw_dir,'.ssh')
if not os.access(dot_ssh, os.F_OK): os.mkdir(dot_ssh)
auth_keys = os.path.join(dot_ssh,'authorized_keys')
fd, fname = tempfile.mkstemp('','authorized_keys',dot_ssh)
fd, fname = tempfile.mkstemp('','authorized_keys',dot_ssh)