Linux Samba server example: linuxsamba
Example of Samba server in Linux
Lab environment:
Rehat5 Virtual Machine in Vbox
Use samba Server
Objective: To use the samba server to upload files to the server
[Root @ rh55 ~] #Service smb start// Error reported, no smb service
Smb: unrecognized service
// Install the samba server
[Root @ rh55 ~] #Mount/dev/cdrom/media/
Mount: block device/dev/cdrom iswrite-protected, mounting read-only
[Root @ rh55 ~] #Yum install-y samba-* -- use yum to install the software package. For more information about yum usage, see
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Base | 1.3 kB
Setting up Install Process
Package samba-common-3.0.33-3.28.el5.i386 alreadyinstalled and latest version
Package samba-client-3.0.33-3.28.el5.i386 alreadyinstalled and latest version
Resolving Dependencies
--> Running transaction check
---> Package samba. i386. 0.33-3.28.el5 setto be updated
--> Processing Dependency: perl (Convert: ASN1) for package: samba
---> Package samba-swat.i386. 0.33-3.28.el5set to be updated
--> Running transaction check
---> Package perl-Convert-ASN1.noarch0: 0.20-1.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================== ==========================================================
Package Arch Version Repository Size
========================================================== ==========================================================
Installing:
Samba i386 3.0.33-3.28.el5 base 16 M
Samba-swat i386 3.0.33-3.28.el5 base 8.2 M
Installing for dependencies:
Perl-Convert-ASN1 noarch 0.20-1.1 base 41 k
Transaction Summary
========================================================== ==========================================================
Install 3 Package (s)
Upgrade 0 Package (s)
Total download size: 24 M
Downloading Packages:
--------------------------------------------------------------------------------
Total 8.1 GB/s | 24 MB
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-Convert-ASN1 1/3
Error: failed to stat/media/RHEL_5.5 i386 DVD: No such file or directory
Installing: samba 2/3
Installing: samba-swat 3/3
Installed:
Samba. i386. 0.33-3.28.el5 samba-swat.i386. 0.33-3.28.el5
Dependency Installed:
Perl-Convert-ASN1.noarch 0: 0. 20-1.1
Complete!
[Root @ rh55 ~] #Service smb start
Starting SMB services: [OK]
Starting NMB services: [OK]
[Root @ rh55 ~] #Smbpasswd-a oracle
New SMB password:
Retype new SMB password:
Added user oracle.
Copy the required files to the shared oracle directory as follows:
So far, the configuration for Samba server has been completed
**************************************** *******Statement************************************************
Original works, from "Deep Blue blog" blog, welcome to reprint, reprint please be sure to indicate the source (http://blog.csdn.net/huangyanlong ).
Please leave a message if the statement is incorrect. Thank you very much.
Reminder: Click the directory to view the directory.
*****************************************************************************************************
How to build a SAMBA server in Linux
1. Related Files
Main file of samba-common samba server
Samba server software
Samba-client software
Redhat-config-samba graphical interface configuration file
Samba-swat web configuration tool
2. Steps
1) install the SAMBA server
(1) Check whether samba is installed
# Rpm-qa | grep samba
(2) installation: place the first disc into the optical drive
# Mount/mnt/cdrom
# Cd/mnt/cdrom/RedHat/RPMS
# Ls samba *.*
# Rpm-ivh samba-common-2.2.7a-7.9.0.i386.rpm
# Rpm-ivh samba-2.2.7a-7.9.0.i386.rpm
# Rpm-ivh samba-client-2.2.7a-7.9.0.i386.rpm
# Cd/
# Umount/mnt/cdrom
# Eject
2) set the samba Password File
(1) generation of batch user password files
# Cat/etc/passwd | mksmbpasswd. sh>/etc/samba/smbpasswd
(2) Delete useless shell accounts
# Vi/etc/samba/smbpasswd
From 1 to 9.
(3) Set directory and File Permissions
# Chown root. root/etc/samba/smbpasswd
# Chmod 500/etc/samba
# Chmod 600/etc/samba/smbpasswd
# Ll-d/etc/samba
(4) set the samba password for a single user
# Useradd wujianan
# Passwd wujianan
# Smbpasswd-a wujianan
3) Start the samba server
# Service smb start
# Pstree | grep mbd
# Smbclient-L localhost or IP address
4) Configure samba sharing
# Vi/etc/samba/smb. conf
[Global]
Workgroup = workgroup
Server string = samba server
; Hosts allow = 192.168.1. 192.168.2. 127.
Printcap =/etc/printcap
Load prints = yes
Printing = cups
; Guest account = pcguest
Log file =/var/log/samba/% m. log
Max log size = 0
Security Options
Security = u... the remaining full text>
What is the use of the SAMBA server in linux?
Samba is a set of software packages that allow linux to support the smb protocol.
Share a linux File System.
Share the printer installed on the samba server.
Allows windows users to browse networks using network peers.