How Samba works as a file server in Linux

Source: Internet
Author: User

The scope of this article is the problems encountered during samba usage.

Problem 1: On the win2000 client, the file name is written in Chinese and changed to garbled Characters Under the linux Command Line. How can this problem be solved?

Solution: unicode is not supported in the command line. For general purpose, force samba to use GB2312. Add a line in [global]: unix charset = GB2312. Note: it is best to set it to GBK. Otherwise, some characters may go wrong, causing unavailability of the roaming account.

Question 2: comment can be used for annotation in shared directory settings, but Chinese characters are garbled during reading on the win client. How can this problem be solved?

Solution: in the [global] section, add a row: display charset = GB2312. samba must be above 3.0.

Question 3: How can I open shared resources to anonymous (guest) users?

Solution: in the [global] section, add a row: map to guest = bad user and add two rows in the corresponding shared resource section: guest account = nobody guest OK = Yes so that all users without an account and wrong password can connect to this shared resource. when accessing this shared resource, its corresponding user is nobody.

Problem 4: the password of the domain account cannot be modified on some win2000 machines. The samba log prompts check_oem_password: incorrect password length (-312332314 ).

Solution: uninstall the win2k hotfix patch KB828741 or download the latest version of samba3.04.

Question 5: I used the release package samba. Now I want to download the latest source code for compilation and installation. How can I keep the original settings?

Solution: Stop the original samba service first:

       
        /etc/init.d/smb stop
       

Back up the original domain account information:

       
        /root/anheng.backup: pdbedit -e smbpasswd:/root/anheng.backup
       

Compile and install the new samba:

       
        ./configure --prefix=/usr/local/samba --enable-cups --with-smbmount --with-acl-support make make install
       

In this way, the new samba is installed in:

       
        
/Usr/local/samba smb. conf
       

Placed in:

       
        /usr/local/samba/lib/smb.conf
       

Copy the old smb. conf file to the preceding directory:

       
        cp /etc/samba/smb.conf /usr/local/samba/lib/smb.conf
       

Use testparm to test whether there is a problem with the setup file. Specify the absolute path:

       
        /usr/local/samba/bin/testparm
       
[# Page _ #] [# page _ #]

If you run testparm directly, the testparm of samba of the old version will not be faulty. One problem I encountered here is that the passwd program is not found and smb is used. in conf, change passwd program = passwd % u to passwd program =/usr/bin/passwd % u. Finally, modify the startup script,/etc/init. d/smb adds the absolute path/usr/local/samba/sbin before nmbd and smbd to complete installation. Restore the domain account pdbedit-I smbpasswd:/root/anheng. backup and then start/etc/init. d/smb start after the new installation, because the program and setting file are inconsistent with the directory location of the original linux version, if you use webmin for management, you need to reset the configuration information of the samba module in webmin.

Question 6: when some win2k machines are added to the domain, after entering the domain administrator account, win2k prompts that the account is not found and samba logs are viewed.

Solution: Use netstat-n-a to check that the 139 port is not connected to the domain server, but is connected to another samba server. That is to say, the win2k error is connected to another samba server, after the main browser level of this server is lowered, the problem is solved and smb is modified. the OS level of conf is 99. It is best not to have two domain controllers.

Question 7: How can I allow some domain accounts to have administrator permissions on the local machine?

Solution: log on to the Local Machine (WIN2K Professional Edition) with the ADMINISTRATOR of the Local Machine, click User Management in the control panel, add users, and set the added users to domain users, select ADMINISTRATOR as the local permission.

Problem 8: In some clients, the FOXMAIL program stored on the Domain Server cannot run when the domain account is used for roaming and login, but can run on some clients. How can this problem be solved?

Solution: Delete the problematic roaming account on the problematic client. In this way, choose Console> system> User Configuration File> select and delete.

Question 9: when a special character file name appears in the ie favorites folder on the client, it is estimated that it is related to my use of GB2312), the roaming account cannot be copied to the local machine. As a result, a temporary account is used to log on to the system, and the original desktop settings and favorites cannot be accessed.

Solution 1: Find the messy file and delete it. A better solution is not found yet.

Solution 2: It is preliminarily determined that the character x0a1x0aa on the win side is changed to x014 on samba, which only appears in ver3. It is estimated that it is a bug, before the bug is solved, I will temporarily use php + bash to solve it with scripts. in/etc/cron. hourly/put a scan14.sh with only one line: find/home/samba/profiles-cmin-61-exec php/root/f. php {} \; and then in/root/f. php :... (see the attachment) so that one file is checked every hour and invalid characters are corrected. 3. Change the unix charset setting in global from GB2312 to GBK to unix charset GBK.

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.