Quickly install Samba

Source: Internet
Author: User

Http://pan.baidu.com/s/1eRq9lIy Samba

Summary: Samba is a free software that implements the SMB protocol on Linux and UNIX systems, consisting of servers and client programs. SMB (Server Messages block, information service blocks) is a kind of communication protocol for sharing files and printers on LAN, which provides shared services of files and printers among different computers in LAN.

Note: You must have root privileges to install Samba. Do not have permission to find Zhang Mingshing students apply.
Installation steps:
1.下载samba-3.5.8.tar.gz到/home/work/img/ (此处可以用自己指定path)源代码:http://pan.baidu.com/s/1eRq9lIy2.解压tar zxvf samba-3.5.8.tar.gz3.执行 cd samba-3.5.8/source34.执行 ./configure && make -j 45.执行 make install
Configuration:
1. 执行 cd /usr/local/samba/ (默认安装到该路径下)2. 执行 vi lib/smb.conf (将下面内容粘贴到smb.conf)
 

[Global]

diplay charset = utf8unix charset = gbkdos charset = gbkworkgroup = imgnetbios name = imgserver string = ucsecurity = user
 

[img]

comment = ucpath=/home/imgcreate mask = 0664directory mask = 0775writable = yesvalid users = img //用户登录名称browseable = yes
 

3. Save and exit;

Configuration Item Description:

[Global] Identifies the global configuration: the first three lines are the encoding configuration.

workgroup:设置服务器所要加入的工作组的名称,会在Windows 的“网上邻居”中能看到work工作组,可以在此设置所需要的工作组的名称。netbios name:设置出现在“网上邻居”中的主机名。默认情况下,则使用真正的主机名。server string:设置服务器主机的说明信息,当在Windows 的“网上邻居”中打开Samba 上设置的工作组时,在Windows 的资源管理器窗口,会列出“名称”和“备注”栏,其中“名称”栏会显示出Samba服务器的NetBios名称,而“备注”栏则显示出此处设置的“Samba Server”。当然,可以修改默认的“Sambe Server”,使用自己的描述信息。security:设置Samba服务器的安全等级。默认情况下,使用user等级。

There are four types of security levels for Samba servers:

(1)share:使用此等级,用户不需要帐号及密码可以登陆Samba服务器。(2)user:使用此等级,由提供服务的Samba服务器检查用户帐号及密码。(3)server:使用此等级,检查帐号及密码的工作可指定另一台Samba服务器负责。(4)domain:使用此等级,需要指定一台Windows NT/2000/XP服务器(通常为域控制器),以验证用户输入的帐号及密码。
 

[img] Identifies the Samba file share configuration (name any in brackets)

comment : 针对共享资源所作的说明、注释部分。path: 若共享资源是目录,则指定目录的位置;若为打印机,则指定打印机队列的位置。create mask : 设置文件的访问权限,默认值为0744。directory mask : 设置目录的访问权限,默认值为0755。writeable : 设置共享的资源是否可以写入。若共享资源是打印机,则不需设置此参数。valid users :设置合法用户名。browseable :设置用户是否可以看到此共享资源。默认值为yes,若将此参数设置为no,用户虽然看不到此资源,但是拥有权限的用户仍可直接输入该资源的网址来访问该资源
 
To start and use Samba:
1. 执行 vi ~/.bash_profile (在文件里添加如下内容)export LD_LIBRARY_PATH=/usr/local/samba/lib:$LD_LIBRARY_PATH保存退出;2. 执行 . ~/.bash_profile3. 执行 ./bin/smbpasswd -a img (设置work的密码)4. 执行 cd /usr/local/samba/sbin5. 执行 ./smbd -D (启动samba)6. ps auxf | grep smbd 查看进程是否启动netstat –npl 查看samba端口号,默认会使用139、445两个端口号7. 到windows下查看samba共享目录是否能够进入:
 

Run –> Input: "\samba server IP" –>enter–> click on shared directory –> enter user name, password –> success

Quickly install Samba

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.