准备好光盘(我的操作系统是X86)
[[email protected] ~]# rpm -q samba 查询samba是否安装
[[email protected] ~]# mount /dev/cdrom /mnt 将光盘文件挂载到/mnt目录下
[[email protected] ~]# cp /mnt/Packages/samba* /home 将光盘里以samba开头文件拷贝到/home下
[[email protected] ~]# rpm -ivh /home/samba-common-3.5.10-125.el6.x86_64.rpm 根据操作系统选择安装
[[email protected] ~]# rpm -ivh /home/samba-3.5.10-125.el6.x86_64.rpm
[[email protected] ~]# rpm -ivh /home/samba-client-3.5.10-125.el6.x86_64.rpm
[[email protected] ~]# service smb start 启动samba服务
[[email protected] ~]# useradd jie 创建用户jie
[[email protected] ~]# passwd jie 设置密码
[[email protected] ~]# cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
[[email protected] ~]# smbpasswd jie -a 激活用户
New SMB password:
Retype new SMB password:
Added user jie.
在windows上访问linux文件\\192.168.100.123
进入Linux共享时,不能访问文件并出现“您可能没有权限使用网络资源”
[[email protected] ~]# setenforce 0 暂时停掉SELinux
[[email protected] ~]# setenforce 1 启用SELinux
[[email protected] ~]# setsebool -P samba_enable_home_dirs on