Original URL: http://blog.csdn.net/longfeey/article/details/5937968
Ubuntu Samba service configuration is very good file application is very valuable to learn,
Here I mainly explain the application of Ubuntu Samba service configuration, including the introduction of Ubuntu Samba startup and shutdown knowledge.
I. Installing Ubuntu Samba Package
sudo apt-get install Samba
sudo apt-get install smbclient
Two. Ubuntu Samba startup and shutdown
Sudo/etc/init.d/samba start
Sudo/etc/init.d/samba stop
Three. Configure Ubuntu Samba Service
Ubuntu Samba Service main configuration file is/etc/samba/smb.conf
1. Access the Linux shared directory without entering a password in the Windows system
Assuming the shared directory is/home/share
sudo gedit/etc/samba/smb.conf
Modify the contents of the file [Gloab] to Security=user to Security=share
Add the following line at the end of the file:
[Share]comment=this is Linux share directory
Path=/home/share
Public=yes
Writable=yes
Save the file to exit.
Restart Ubuntu Samba Service
Sudo/etc/init.d/samba restart
So that users can access it anonymously,
You can enter//IP under Windows.
2. You need to enter a password in Windows system to access the Linux shared directory
The fields in the modified file are as follows
Security=user
Increase SMB passwd FILE=/ETC/SAMBA/SMBPASSWD
Add the following section to the shared section valid Users=feilong//feilong as a user in a Linux system
Then set the password for the user
sudo touch/etc/samba/smbpasswd
sudo smbpasswd-a Feilong
Then restart the Ubuntu Samba service to do it.
SMBPASSWD Common Options
-A Add a user
-D disables a user
-E Unblock disabled users
-X Delete a user
Samba Server Test smbclient//10.10.66.196/feilong
3. Accessing Windows's shared directory in Linux
In Linux, you can attach a shared directory in Windows directly to this computer,
In order to view the shared directory in Windows, you can use the smbclient command to view Smbclient-l//ip-u Ubuntu sees the shared directory,
You can mount the Smbmount '//ip/shared directory name ' mount point by using the Smbmount command-o username
Example: Smbmout '//192.168.0.1/share ' mnt-o username= "Ubuntu"
Then enter the password to do so.
4. Accessing the Linux Samba shared directory in Linux
1) View Samba shared directory
In the Computer Address field, type: smb://10.10.66.196/feilong/
Note that when you open a directory, the address bar above, the browser address bar seems to be unable to use
2) Mount Linux Samba server directory
sudo apt-get install Smbfs
sudo mount-t smbfs//10.10.66.196/feilong/mnt-o username=feilong
Enter the samba password as prompted, and it will normally be mounted to the/MNT directory.
Or you can use the Smbmount command: sudo smbmount//10.10.66.196/feilong/mnt-o username=feilong
Four. Graphical interface Samba management tools
1) Install Ubuntu Samba graphical management interface sudo apt-get install System-config-samba
2) Start the Admin interface: command: sudo system-config-samba (You can also click on the menu entry: System-System Management-samba) to add a shared directory and select the accessible user. The Set user SMB Password command is: sudo smbpasswd-a user name in the configuration, to choose "visible", otherwise it is hidden, others will not see your share so that people can access your shared directory after the restart
3) Restart when Setup is complete: sudo service samba restart
"Turn" Ubuntu Samba server build and test--good