Set up the samba service on Ubuntu7.10

Source: Internet
Author: User
Set up the samba service on Ubuntu7.10-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. Install the samba service.
Sudo apt-get install samba smbfs

2. Create a shared share. It can be accessed anonymously and can only be read. The user smbuser can write and read data.

1) sudo groupadd-g 300 smb

2) sudo useradd-u 300-g 300-d/dev/null-s/dev/null smbguest

3) smbguest must be consistent with the one defined in the guest account = smbguest field (see modify smb configuration file later ).

4) sudo useradd-u 301-g 300-d/dev/null-s/dev/null smbuser

5), security = user

6) sudo mkdir/home/smbhome

7) sudo chown smbuser/home/smbhome

8), sudo chgrp smb/home/smbhome

9), sudo chmod 0775/home/smbhome

10) sudo smbpasswd-a smbuser

Note:

Add an smb account and set a password

Sudo smbpasswd-a smbuser

Delete an smb account

Sudo smbpasswd-x smbuser

3. Modify the smb configuration file

Sudo cp/etc/samba/smb. conf/etc/samba/smb. conf. bak

Sudo gedit/etc/samba/smb. conf

Search for and modify the following lines:

; Workgroup = MSHOME

Remove the annotator, and modify MSHOME as your working group name.

View the Working Group Name of a computer

; Security = user

Remove the annotator. Use the user Authentication mode.

; Guest account = nobody

Remove the annotator, and change nobody to smbguest.

Modify the [homes] domain according to the following Configuration:

[Homes]

Comment = Home Directories

Browseable = no

Writable = yes

Valid users = % S

Create mask = 0755

Directory mask = 0755

Printable = no

Wide links = no

Note: using the Homes segment, Samba can obtain and share the user's Home directory.

Add the [share] domain at the end of the configuration file:

[Share]

Comment = linux share

Path =/home/smbhome

Guest OK = yes

Write list = smbuser

Printable = no

Directory mask 0775

Create mask 0775

Wide links = no

4. Restart the samba service to make the configuration take effect.

Sudo/etc/init. d/samba restart

5. Access share of ubuntu in windows

Enter the username (smbuser) and password to view the sharing of ubuntu.

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.