예제 #1
0
파일: h31.py 프로젝트: hanxin1987216/DTL
def changeSambaPwd(username,passwd):
        h29.refreshSambaTmpPasswdFile (passwd)
        str = "/home/sambapasswd.tmp"
        tmp = "cat " + str
        tmp += "|"
        tmp += "/usr/local/samba/bin/smbpasswd -as "
        tmp += username
        tmp += " > /dev/null 2>&1"

        os.system(tmp)
예제 #2
0
def changeSambaPwd(username, passwd):
    h29.refreshSambaTmpPasswdFile(passwd)
    str = "/home/sambapasswd.tmp"
    tmp = "cat " + str
    tmp += "|"
    tmp += "/usr/local/samba/bin/smbpasswd -as "
    tmp += username
    tmp += " > /dev/null 2>&1"

    os.system(tmp)
예제 #3
0
파일: h30.py 프로젝트: limkokhole/DTL
def addSambaUser(username):
        h29.refreshSambaTmpPasswdFile ("123456")
#        print username
        str = "/home/sambapasswd.tmp"
        tmp = "cat " + str
        tmp += "|"
        tmp += "/usr/local/samba/bin/smbpasswd -as "
        tmp += username
        tmp += " > /dev/null 2>&1"

        os.system(tmp)

#addSambaUser("fewf")