把samba的使用方法整理一下,省得每次有问题都得网上搜
1.服务管理- service smb status
-
service smb start
-
service smb stop
-
service smb restart
2.samba与selinux有时候明明设置了samba home dir的写权限,但是无法生效。往往是由于selinux引起的。
你可以关闭selinux,selinux是拥有一个灵活而强制性的访问控制,它缺省情况下不允许samba用户目录的功能,这里先关闭它。
关闭的方法为:修改/etc/selinux/config中的SELINUX=““为disabled,然后重启Linux。
在/etc/samba/smb.conf中也有注释说明如何使 samba与selinux共存
- # SELINUX NOTES:
-
#
-
# If you want to use the useradd/groupadd family of binaries please run:
-
setsebool -P samba_domain_controller on
-
#
-
# If you want to share home directories via samba please run:
-
setsebool -P samba_enable_home_dirs on
3.使用root用户登录samba通常情况下,不能采用root用户登录,但是只要重新给root用户设置了samba密码就可以了,如下:
- [root@gpon ~]$ smbpasswd -a root
-
New SMB password:
-
Retype new SMB password:
-
Added user root.
之后,重新设置一下root用户登录的路径之类,就可以在其他系统(XP、linux)登录该samba服务器了。
4.XP下更改samba账户来进行登录Windows XP Login to Linux/Unix Samba Networking
Last updated: 8/22/2004
Q.I just clean-installed Windows XP Pro and used the same workgroup,PC name, use account name,and password.
I previously ran Windows 200 Pro and it had no problem connecting to my private account on a Red Hat Linux server running Samba for Windows networking.
I can see accounts on the server with guest access,but my private, password-protected account is no longer visible in My Network Places.
How do I configure Windows XP to access it?
A. Click Start, Control Panel, User Accounts, click the specific user, and in Related Tasks at the top of the resulting window, choose Manage my network passwords.
In the Stored User Names and Passwords window that results, click the Add button.
In the Server: text box, Enter the Linux/Unix server name. My server is simply called Linux.
In the User name:text box, Enter server name/user name; e.g., linux/lbyard. and enter the password. Reboot. With the Windows Explorer, look in My Network Places,
Entire Network, Microsoft Windows Network, the workgroup name,for the linux server name, and click the + beside it.You should then see the account.
When you click on it the first time it may ask you for the password. After the first time, it should not prompt for the password.
For convenience you can then click and hold the Account name in the Windows Explorer and drag it to the My Network Places icon.
That will create a short cut to the account and put it where it is readily visible.
阅读(2691) | 评论(0) | 转发(1) |