Samba FAQ on Linux OS

Source: Internet
Author: User
Tags password protection linux

A. provides file/directory and printer Sharing to Windows from Linux.

When Samba runs on a Linux server, Linux is equivalent to a file and print server, providing file and print services to Windows and Linux Samba clients. Two methods that work in shared or user mode are more common (security=share or security=user), with the following common problems.

1. When sharing mode, from Windows 98 clients can not see the server from the Network Neighborhood, or see after the access to share resources say the password is wrong and so on.

A. The annotation symbol before the row Guest account = Pcguest is not removed.

B. The Guest account pcguest (#useradd pcguest) was not created.

C.windows 98 sends the encrypted password by default, and the/etc/smb.conf does not have the Enable Samba encryption password. Alternatively, you can edit the Windows 98 registry so that it sends a text password (not recommended).

2. A fully writable shared directory is defined in/etc/smb.conf, but cannot be written in the actual operation.

A. Special attention is: Linux itself file and directory permissions are always greater than the permissions defined by Samba, to make a shared resource directory can be written, first of all to ensure that the directory under Linux can be the corresponding user can write, this is the prerequisite.

3. How to add user name and password protection to a shared directory in shared mode?

A. See the following examples of shared resource definitions:

security = SHARE
username map = /etc/smbusers
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY
client code page = 936
os level = 40
local master = yes
preferred master = yes
domain master = yes
guest account = pcguest
encrypt passwords = yes
smb passwd file = /etc/smbpasswd
[sales]
comment = test folder
path = /sales/training
guest ok = no
writable = yes
valid users = @sales
write list = @sales

In the above example, we defined the Security=share and Samba encrypt password, the shared directory name sales is not accessible to the guest user, and needs to be accessible and writable by users who belong to the sales group, Of course, under Linux to ensure that the/sales/training directory can be group sales can write, so that later define your Windows logon (not NT domain login) user name for group sales username, and then in the Network Neighborhood Double-click Sales will prompt you password, The password is a samba-encrypted password that you define on the Samba server, and in the example above the username and password pairs are stored in the file/etc/smbpasswd, and of course you have to have the system username in the/etc/passwd.

4.windows users often cannot browse the name of the Samba server in their network Places.

A.windows's online neighborhood service is a very unreliable service, and its established browsing list is unreliable and is caused by a number of factors.

B. A reliable solution is to find the host name of the Samba server directly using ' Find '-' computer '. Be sure that you do not cancel the login when Windows starts.

C. You can also use the net using command in a DOS window: such as C:net uses M: \\sambaservername\shareresourcename

5. Server-side test Configuration Tool

A. Run the testparm detection configuration file for a corresponding syntax error after configuring/etc/smb.conf.

B. Use Smbstatus to report user usage and login after Samba is serviced.

C. After you have changed the profile, run/ETC/RC.D/INIT.D/SMB restart the configuration file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.