|
This article describes how to set up a very simple Windows share on Linux (Fedora). 1. Install samba (you have to run this commands with root privileges) [root@blackmod ~]# yum install samba Loading "skip-broken" plugin Loading "priorities" plugin Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile 0 packages excluded due to repository priority protections Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package samba.i386 0:3.0.26a-6.fc8 set to be updated --> Processing Dependency: samba-common = 3.0.26a-6.fc8 for package: samba --> Running transaction check ---> Package samba-common.i386 0:3.0.26a-6.fc8 set to be updated --> Finished Dependency Resolution
Dependencies Resolved
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: samba i386 3.0.26a-6.fc8 fedora 2.8 M Installing for dependencies: samba-common i386 3.0.26a-6.fc8 fedora 7.2 M
Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s)
Total download size: 10 M Is this ok [y/N]: y Downloading Packages: (1/2): samba-common-3.0.26a-6.fc8.i386.rpm | 7.2 MB 00:22 (2/2): samba-3.0.26a-6.fc8.i386.rpm | 2.8 MB 00:10 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: samba-common ######################### [1/2] Installing: samba ######################### [2/2]
Installed: samba.i386 0:3.0.26a-6.fc8 Dependency Installed: samba-common.i386 0:3.0.26a-6.fc8 Complete! Now create a backup of the default smb.conf[root@blackmod ~]# cp -p /etc/samba/smb.conf /root/smb.conf.backup create a new samba configuration remove everything from /etc/samba/smb.conf and copy + paste the following lines in: [global]
workgroup = MYGROUP server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 security = user passdb backend = tdbsam load printers = yes cups options = raw
[myshare] path=/myshare valid users=myuser read only=no Replace "path=/myshare" with the folder you want to share and "valid users=myuser" with your Linux user. set a samba password Because Samba has its own password database, you have to set a password for your user (myuser): [root@blackmod ~]# smbpasswd -a myuser New SMB password: Retype new SMB password: Start SAMBA start samba with the following command: [root@blackmod ~]# service smb start Starting SMB services: [ OK ]
And make sure it starts automatically after reboot: [root@blackmod ~]# chkconfig smb on
That's it.
|