Install and configure Samba in Ubuntu 10.04

Source: Internet
Author: User


Install and configure sudo apt-get install sambasudo apt-get install smbfs in Samba in Ubuntu 10.04. Let's share the readable and writable folders in the group. Suppose the folder you want to share is: /home/username/share first create this folder mkdir/home/messcode/javaschmod 777/home/messcode/share
Back up and edit smb. conf allows network users to access www.2cto.com sudo cp/etc/samba/smb. conf/etc/samba/smb. conf_backupsudo gedit/etc/samba/smb. conf finds the Keyword:; security = user replaces these rows: security = userusername map =/etc/samba/smbusers adds the following rows to the end of the file, assume that the user allowed to access is messcode. The Share Name of the Folder is Share [Share] comment = Shared Folder with username and passwordpath =/home/messcode/sharepublic = yeswritable = yesvalid users = messcodecreate mask = 0700 directory mask = 0700 force user = nobodyforce group = nogroupavailable = yesbrowseable = yes
And change it here by the way, find the [global] and change workgroup = MSHOME to workgroup = WORKGROUPdisplay charset = UTF-8unix charset = UTF-8dos charset = cp936 followed by the three lines to prevent Chinese directory garbled. Depending on your local, the UTF-8 may need to be changed to cp936. Do it yourself. Now you need to add the network access account messcode. If the account does not exist in the system, the user messcode is added to sudo useradd messcode www.2cto.com, but the user is not given the logon password of the local machine. Therefore, this user can only be remotely accessed and cannot log on from the local machine. In addition, the samba logon password can be different from the local logon password. Now you need to add a network user account: sudo smbpasswd-a newsfansudo gedit/etc/samba/smbusers
Add the following line to the new file and save messcode = "network username". If you need to change the network access password of messcode in the future, also use this command to change the command of sudo smbpasswd-a messcode to delete the account of the network user and Change-a above to-xsudo testparmsudo/etc/init. d/samba restart: log out and log on again or restart the machine. Author kung fu pandatv

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.