找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2987|回复: 7

请教一下OpenWrt路由器为Samba设置账号密码访问的方法

[复制链接]
用的F大的N1,不知道如何为SAMBA设置帐号密码访问,来个吴彦祖教一下哇,不甚感谢
我的恩山、我的无线 The best wifi forum is right here.
[root@testdir localhost]#useradd smb1
[root@testdir localhost]#smbpasswd -a smb1
New SMB password:
Retype new SMB password:
Added user smb1.

类似这样

主要就是 在系统中先新增用户 然后使用 smbpasswd 命令设置密码

```
smbpasswd [options] USERNAME
   -a:添加
   -x:删除
   -d:禁用
   -e:启用
```

点评

原来如此,被其他帖子误导,谢了。  详情 回复 发表于 2021-8-17 02:52
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 来自手机 | 显示全部楼层
AllenHua 发表于 2021-5-31 16:46
[root@testdir localhost]#useradd smb1
[root@testdir localhost]#smbpasswd -a smb1
New SMB password: ...

添加用户的话。是在ssh编辑文件还是在网络共享的编辑处编辑呢?能再完整一点吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

莫问归期 发表于 2021-5-31 17:00
添加用户的话。是在ssh编辑文件还是在网络共享的编辑处编辑呢?能再完整一点吗

ssh 进去 使用命令行添加用户

useradd xxx 就行了(其他参数保持默认)

网络共享那里编辑,你可以更一下 valid users 的值

valid users = a,b,c,@xxxgroup

上面这一行代表允许用户 a b c 以及 组 xxxgroup 中的所有用户 登录 samba

点评

大牛,samba的配置文件里每一行的解读,应该学习什么才能弄明白,就像你解释的 valid users = a,b,c,@xxxgroup 上面这一行代表允许用户 a b c 以及 组 xxxgroup 中的所有用户 登录 samba  详情 回复 发表于 2021-12-30 22:17
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
AllenHua 发表于 2021-5-31 17:41
ssh 进去 使用命令行添加用户

useradd xxx 就行了(其他参数保持默认)

好的,谢谢,我研究一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

AllenHua 发表于 2021-5-31 16:46
[root@testdir localhost]#useradd smb1
[root@testdir localhost]#smbpasswd -a smb1
New SMB password: ...

原来如此,被其他帖子误导,谢了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

AllenHua 发表于 2021-5-31 17:41
ssh 进去 使用命令行添加用户

useradd xxx 就行了(其他参数保持默认)

大牛,samba的配置文件里每一行的解读,应该学习什么才能弄明白,就像你解释的

valid users = a,b,c,@xxxgroup

上面这一行代表允许用户 a b c 以及 组 xxxgroup 中的所有用户 登录 samba

点评

可以 google 一下就能查到官方的解释啦 https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html 比如下面这个就是 invalid users 的解释 This is a list of users that should not be allowed  详情 回复 发表于 2021-12-31 19:53
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

iridescentray 发表于 2021-12-30 22:17
大牛,samba的配置文件里每一行的解读,应该学习什么才能弄明白,就像你解释的

valid users = a,b,c,@ ...

可以 google 一下就能查到官方的解释啦

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

比如下面这个就是 invalid users 的解释

This is a list of users that should not be allowed to login to this service. This is really a paranoid check to absolutely ensure an improper setting does not breach your security.

A name starting with a '@' is interpreted UNIX group.

The current servicename is substituted for %S. This is useful in the [homes] section.

Default: invalid users = # no invalid users

Example: invalid users = root fred admin @wheel
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 15:57

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表