Ubuntu12.04 set up Samba Sharing Service

Source: Internet
Author: User
1. Ubuntu12.04 install samba: sudoapt-getinstallsambasmbfs2, modify configuration: cd/etc/samba/sudomvsmb. conf {,. bak} sudovismb. conf [global] workgroup = WORKGROUPServerstring = myservernetbi

1. Install samba in Ubuntu 12.04:

Sudo apt-get install samba smbfs

2. Modify the Configuration:

Cd/etc/samba/

Sudo mv smb. conf {,. bak}

Sudo vi smb. conf

[Global]
Workgroup = WORKGROUP
Server string = myserver
Netbios name = wispserver
Security = user
Encrypt passwords = yes
Smb password file =/etc/samba/smbpasswd


[Homes]
Browseable = no
Writable = yes
Valid users = % S
Create mode = 0664
Directory mode = 0775

3. Create a user:

Sudo useradd smb

Sudo usermod-d/home/wisp/smd/program_update smb

Sudo smbpasswd-a smb

Enter the password twice.

4. Enable the program:

Sudo/etc/init. d/smbd restart

5. By the way: after connecting to smb in windows, you need to use the net use command to delete the connection if you want to change the user:

Net use displays the current network connection

Net use \ 192.168.9.252 \ IPC $/del Delete smb connection

Then, reconnect to the smb server and enter the account password.

6. Access windows sharing on ubuntu

1) create a mount directory.

Sudo mkdir/home/istone/winshare

2) mount windows sharing.

Sudo mount-t smbfs-o codepage-cp936, iocharset = utf8, username = istone, password = passwd // 192.168.0.103/winshare/home/istone/winshare

-T Mount type

Codepage is the code page of the target system, that is, the windows platform (cp936 refers to gb2312, such as win2k), and iocharset refers to the receiver encoding method of stream transmission (ubuntu is utf8)

Username is the user name in windows and has the read and write permissions for shared folders. Password is the Password corresponding to the user name.

// 192.168.0.103/winshare Windows shared directory.

/Home/istone/winshare/Ubuntu Mount directory

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.