在Ubuntu上创建Samba用户

If you are using Samba Server on your network, you will want to create users that have access to use it. There’s a very simple command structure on how to do so.

如果您在网络上使用Samba服务器,则将要创建有权使用它的用户。 关于如何执行操作,有一个非常简单的命令结构。

I’m assuming that you’ve already installed Samba Server at this point.

我假设此时您已经安装了Samba Server

There are two steps to creating a user. First we’ll run the smbpasswd utility to create a samba password for the user.

创建用户有两个步骤。 首先,我们将运行smbpasswd实用程序为用户创建一个samba密码。

sudo smbpasswd -a <username>

sudo smbpasswd -a <用户名>

Next, we’ll add that username to the smbusers file.

接下来,我们将该用户名添加到smbusers文件中。

sudo gedit /etc/samba/smbusers

须藤gedit / etc / samba / smbusers

Add in the following line, substituting the username with the one you want to give access to. The format is <ubuntuusername> = “<samba username>”. You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.

添加以下行,用要授予访问权限的用户名替换用户名。 格式为<ubuntuusername> =“ <samba用户名>”。 您可以使用其他samba用户名来映射到ubuntu帐户,但是现在并没有必要。

<username> = “<username>”

<用户名> =“ <用户名>”

Now you can create samba shares and give access to the users that you listed here.

现在,您可以创建samba共享并向您在此处列出的用户授予访问权限。

翻译自: https://www.howtogeek.com/howto/ubuntu/create-a-samba-user-on-ubuntu/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值