mount error(6): No such device or address

错误:

mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

samba服务器设置:

[root@test1 ~]#cat /etc/samba/smb.conf

全局设置:

[global]

    workgroup = test
    server string = Samba Server Version %v
    #log files split per-machine:
    log file = /var/log/samba/log.%m
    #maximum size of 50KB per log file, then rotate:
    max log size = 50
    security = user
    passdb backend = tdbsam
    load printers = no
    cups options = raw

home设置

[homes]

    comment = Home Directories
    browseable = no
    writable = yes
    create mode = 0664
    directory =0755

[project]

    comment = smbuser's home
    path    = /share
    browseable = yes
    writable = yes
    write list = @users

[root@test1 ~]#
<font color=#FF3300 size=3> [root@test1 ~]# testparm</font>
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[project]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

#Global parameters

[global]

    server string = Samba Server Version %v
    workgroup = TEST
    log file = /var/log/samba/log.%m
    max log size = 50
    load printers = No
    security = USER
    idmap config * : backend = tdb
    cups options = raw

[homes]

    comment = Home Directories
    path = 0755
    browseable = No
    create mask = 0664
    read only = No

[project]

    comment = smbuser's home
    path = /share
    read only = No
    write list = @users

客户端挂载

[root@test2 ~]# mount -t cifs //2.2.1.2/user1 /mnt -o username=user1,password=4321
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


检查发现为服务器设置出错:

解决方法:将home目录下的 directory = 0755改为 directory mode = 0755

[homes]

    comment = Home Directories
    browseable = no
    writable = yes
    create mode = 0664
    directory **mode** = 0755

testparm没有检测出问题,所以排查了好久。关键是细心,细心!

转载于:https://blog.51cto.com/acarey/2057697

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值