使用Samba共享Ubuntu Home目录

Samba Server allows you to share the home directories of users automatically. This can be useful so that you don’t have to manually create every share for every user.

Samba服务器允许您自动共享用户的主目录。 这很有用,因此您不必为每个用户手动创建每个共享。

First, make sure that you’ve installed Samba server.

首先,请确保已安装Samba服务器

To share the home directories, open up smb.conf with the following command:

要共享主目录,请使用以下命令打开smb.conf:

sudo gedit /etc/samba/smb.conf

须藤gedit /etc/samba/smb.conf

Find this section of the file, and make it match the following:

查找文件的此部分,并使其与以下内容匹配:

#======================= Share Definitions =======================

#=======================共享定义=======================

# Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user’s home directory as \\server\username [homes] comment = Home Directories browseable = yes

#取消注释以下内容(并调整以下其他设置以适合)#启用默认主目录共享。 这会将每个#用户的主目录共享为\\ server \ username [homes]注释=可浏览的主目录=是

# By default, \\server\username shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only “username” can connect to \\server\username valid users = %S

#默认情况下,有权访问samba服务器的任何人都可以连接\\ server \ username共享。 取消注释以下参数#以确保只有“用户名”可以连接到\\ server \ username有效用户=%S

# By default, the home directories are exported read-only. Change next # parameter to ‘yes’ if you want to be able to write to them. writable = yes

#默认情况下,主目录是只读导出的。 如果您希望能够将其下一个#参数更改为“是”。 可写=是

Now you should be able to map a drive on windows using the following share format:

现在,您应该可以使用以下共享格式在Windows上映射驱动器:

\\ubuntumachine\username

\\ ubuntumachine \用户名

For example, if the Ubuntu machine is named ubuntuserv, and the username is geek, your share path would be \\ubuntuserv\geek

例如,如果Ubuntu计算机名为ubuntuserv,用户名为geek,则共享路径将为\\ ubuntuserv \ geek

翻译自: https://www.howtogeek.com/howto/ubuntu/share-ubuntu-home-directories-using-samba/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值