1 查看及安装软件包
[root@rhel4-1 ~]# rpm -qa |grep samba
samba-client-3.0.10-1.4E.9
samba-3.0.10-1.4E.9
system-config-samba-1.2.21-1
samba-common-3.0.10-1.4E.9
2 查看默认配置文件
[global]
workgroup = jxwpx
[root@rhel4-1 ~]# rpm -qa |grep samba
samba-client-3.0.10-1.4E.9
samba-3.0.10-1.4E.9
system-config-samba-1.2.21-1
samba-common-3.0.10-1.4E.9
2 查看默认配置文件
[global]
workgroup = jxwpx
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
security = user
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[public]
path = /home/public
public = yes
only guest = yes
writable = yes
printable = no
3 建立samba用户
# adduser c1
# smbpasswd -a c1
4 测试配置文件
# testparm
5 启动samba服务器
# service smb start
log file = /var/log/samba/%m.log
max log size = 50
security = user
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[public]
path = /home/public
public = yes
only guest = yes
writable = yes
printable = no
3 建立samba用户
# adduser c1
# smbpasswd -a c1
4 测试配置文件
# testparm
5 启动samba服务器
# service smb start
1 列出samba服务器的共享目录
# sambaclient -L 192.168.1.1 -U admin
2 连接远程共享
# smbclinet //192.168.1.1/share -U admin
3 挂载远程目录
# sambamount //192.168.1.1/public /mnt
# mount -t smbfs -o username=admin //192.168.1.1/public /mnt
或
smbmount //192.168.1.1/public /mnt -o username=admin
然后,进入/mnt目录查看windows共享中的资源。
# sambaclient -L 192.168.1.1 -U admin
2 连接远程共享
# smbclinet //192.168.1.1/share -U admin
3 挂载远程目录
# sambamount //192.168.1.1/public /mnt
# mount -t smbfs -o username=admin //192.168.1.1/public /mnt
或
smbmount //192.168.1.1/public /mnt -o username=admin
然后,进入/mnt目录查看windows共享中的资源。
本文转自 jxwpx 51CTO博客,原文链接:http://blog.51cto.com/jxwpx/197274,如需转载请自行联系原作者