__init__.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:fabsetup 作者: theno 项目源码 文件源码
def samba():
    '''Install smb server samba and create a share (common read-write-access).

    More infos:
     * https://wiki.ubuntuusers.de/Samba%20Server/
    '''
    username = env.user
    install_packages(['samba'])
    run(flo('sudo smbpasswd -a {username}'))

    path = '$HOME/shared'
    sharename = 'shared'
    comment = '"smb share; everyone has full access (read/write)"'
    acl = flo('Everyone:F,{username}:F guest_ok=y')

    with warn_only():
        run(flo('mkdir {path}'))
    run(flo('sudo net usershare add {sharename} {path} {comment} {acl}'))
    run(flo('sudo net usershare info {sharename}'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号