How to configure the Samba sharing service in Ubuntu12.04

Source: Internet
Author: User
First, you need to modify the default attribute of IPV6. Ubuntu12.04 uses IPV6 by default. In this way, you cannot PING the host in the LAN. For details about setting ipv4 in Ubuntu, refer

First, you need to modify the default attribute of IPV6. Ubuntu 12.04 uses IPV6 by default, so that the host cannot be pinged in the LAN.

Ubuntu setting ipv4 see http://www.linuxidc.com/Linux/2012-07/64812.htm

Edit the/etc/network/interfaces and/etc/resolv. conf files. The former sets IP addresses, gateways, and subnet masks, and the latter sets dns and other attributes.

Example:

1. Configure the NIC in DHCP Mode

Edit the file/etc/network/interfaces:

Cp/etc/network/interfaces. bk (back up)

Sudo vi/etc/network/interfaces
Replace eth0 with the following rows:
# The primary network interface-use DHCP to find our address
Auto eth0
Iface eth0 inet dhcp
Run the following command to make the network settings take effect:
Sudo/etc/init. d/networking restart
You can also enter the following command in the command line to obtain the address.

Sudo dhclient eth0

I add:

Ifconfig eth0 command to view IP Address



2. configure a static IP address for the NIC
Edit the file/etc/network/interfaces:
Sudo vi/etc/network/interfaces
Replace eth0 with The following rows: # The primary network interface
Auto eth0
Iface eth0 inet static
Address 192.168.3.90
Gateway 192.168.3.1
Netmask 255.255.255.0
# Network 192.168.3.0
# Broadcast 192.168.3.255
Replace the preceding IP address and other information with your own. Use the following command to make the network settings take effect:
Sudo/etc/init. d/networking restart

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.