Ubuntu10.10 shared with Windows in Samba

Source: Internet
Author: User
1. Before installation, select the Bridge Mode to access the Internet. The default mode is NAT. You can modify the virtualbox mode to bridge the Internet to facilitate sharing with the window system. During the actual operation, I encountered a problem where I could not access the Internet after the kernel upgrade of Ubuntu10.10. Solution: Enter the following command in the terminal: sudoifconfigeht0down disable the NIC sudoifconfigeth0up enable the network sud 1. Prepare before installation

We select the Bridge Mode to access the Internet. The default mode is the NAT mode. You can change the virtualbox mode to the Bridge Mode to facilitate sharing with the window system.

During the actual operation, I encountered a problem where I could not access the Internet after upgrading the Ubuntu 10.10 kernel. The solution is as follows:

Run the following command on the terminal: sudo ifconfig eht0 down to disable the NIC:

Sudo ifconfig eth0 up enable Network

Sudo dhclient for IP address reallocation

OK. Try it now to see if you can access the Internet. In this case, you need to manually enter each restart. It is troublesome. You can configure to automatically obtain the ip address. The configuration method is as follows:

Modify the/etc/network/interfaces file as follows:

# The loopback network interface
Auto lo
Iface lo inet loopback
# The primary network interface
Auto eth0
Iface eth0 inet dhcp
Restart the system after modification. To avoid errors, back up the interface file before modification.

Disable firewall command: # ufw disable

2. Install samba

Code:

Sudo apt-get install samba

Sudo apt-get install smbfs

Sudo apt-get install samba4

Next we will share the group's readable and writable folders and create folders: workplace

The Code is as follows:

Sudo mkdir/home/xx/workplace

Chmod 777/home/xx/workplace

Back up and edit sam. conf below to allow network users to access

The Code is as follows:

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

Sudo gedit/etc/samba/smb. conf

Assume that the user allowed to access is polly. The shared folder name is workplace. Add:

[Share]

Comment = Shared Folder with username and password

Path =/home/xx/workplace

Public = yes

Writable = yes

Valid users = polly

Create mask = 0700

Directory mask = 0700

Force user = xx

Force group = xx

Available = yes

Browseable = yes

Set the above force user and force group to your Logon account and the group to which the Logon account belongs.

Files saved in Windows can be directly accessed by the login account in linux without modifying the file attributes or ownership.

Now you need to add the network access account polly. If this account does not exist in the system

Code:

Sudo useradd polly

Related Article

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.