Google Plus

Install Samba in Slackware 13.1

Written by Mel Kham on . Posted in Linux tutorials

PIRAT9

100% copied from :

http://www.foogazi.com/2006/11/01/simple-samba-slackware-setup/

:S

 

If you want to share files between your Ubuntu and Windows computers, the best option is to use Samba file sharing. 

Samba is a free software re-implementation of SMB/CIFS networking protocol, originally developed by Australian Andrew Tridgell. As of version 3, Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part of an Active Directory domain.Samba runs on most Unix and Unix-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple’s Mac OS X Server (which was added to the Mac OS X client in version 10.2). Samba is standard on nearly all distributions of Linux and is commonly included as a basic system service on other Unix-based operating systems as well. Samba is released under the GNU General Public License. The name Samba comes from SMB (Server Message Block), the name of the standard protocol used by the Microsoft Windows network file system.”

Downloading and Installing Samba

If you did not choose to install samba during your initial installation of Slackware, you will need to download the package from the Slackware website. Go here for the official Slackware 11 samba package. You will be presented with a list of mirrors. Select a mirror closest to you.

To check and see if you already have samba installed, run:

pirat9@foo:~$ less /var/log/packages/samba*

If you get a “No such file or directory” return, then you need to install the package linked above. Otherwise, skip this section completely.

Here are the steps I ran:

Download and install   with  this  command

# slapt-get -i samba



Now we have Samba installed.

Configuring Samba

By default, samba installs a directory in /etc/. So lets su to root and navigate to it.

pirat9@foo:~$ su -
Password:
root@foo:~# cd /etc/samba/

Inside this directory, we have a smb.conf-sample file. It is important to take a look at this file and read the comments provided. This will help you have a better understanding of the options you have available to you. I am going to give you a standard configuration file that I start with, and I encourage you to build on it.

To use my configuration file as a base, run:

root@foo:/etc/samba$ touch /etc/samba/smb.conf
root@foo:/etc/samba$ vim /etc/samba/smb.conf

Then you’ll want to copy/paste the following:

[global]
workgroup = Unixmen
server string = foo
security = user
load printers = yes
log file = /var/log/samba.%m
max log size = 50
socket options = TCP_NODELAY

[home]
comment = Home Directory
path = /home/pirat9/
valid users = pirat9
writable = yes

Line by line description:
The [global] section contains global configuration parameters not specific to any directory shared.

workgroup = Unixmen is defining what the NT-Domain-Name or Workgroup-Name is. You will want to change Unixmen to whatever you have set in Windows as your workgroup.

server string = foo defines the description of the Linux machine. This is equivalent to the Windows description field. Change this to something that describes your Linux computer.
security = user is setting the security mode to user level security. We will discuss how to create users for samba later. See the samba documentation for other security modes available.

load printers = yes tells samba to automatically load the printer list.

log file = /var/log/samba.%m defines where you want samba to log to. The %m tells samba to keep a separate log file for each machine on the network.

max log size = 50 defines the maximum size of the log files, in (Kb).

socket options = TCP_NODELAY this setting supposedly helps samba perform better. See the official samba documentation for more details.

The [home] section is essentially a share definition. Everything residing under [home] is specific to the share, and no other shares.

comment = Home Directory defines what the shares description will be.

path = /home/pirat9/ is the direct path for the share. Change this to reflect the directory you want to share.

valid users = pirat9 is telling samba to only allow the user pirat9 access to this share. Change this to a user that exists on your machine. See /etc/passwd for a list of existing users.

writable = yes tells samba to allow the valid users to write to this shared directory.

Now that you have a simple smb.conf file to work from, save it.

Setting up Samba users with smbpasswd:

Since we chose to use the security mode “users” in our samba configuration file, we need to set up the users. To do so, run:

pirat9@foo:~$ smbpasswd -a pirat9
New SMB Password:
Retype new SMB Password:
pirat9@foo:~$

Remember, you can only add samba users via smbpasswd if they already exists as real users on the machine. To see the real users, take a look at your /etc/passwd file. Also note, for all users you add in your smb.conf to the valid users line, you must create a password for them using smbpasswd.

Running Samba

Execute the rc.samba file like so:

pirat9@foo:~$ chmod 755 /etc/rc.d/rc.samba

pirat9@foo:~$ /etc/rc.d/rc.samba start
Starting Samba: /usr/sbin/smbd -D
/usr/sbin/nmbd -D
pirat9@foo:~$

Now you should be all set up to view your Linux share from Windows. Go to your Windows machine, select Start > Run … and type 10.10.1.9 or whatever your Linux machines local IP is. After successfully connecting, you should first see a prompt for a user name and password. Enter in the user name added via smbpasswd and you should be granted access to your share.

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

pigmej

|

Just one thing:

What about pep8 in your python code ? How can you give ‘tutorials’ on quite popular website, of such a bad quality ?

Amit Rai

|

I just renamed shared.xml and it logged in and created a new shared.xml.

DB Griffin

|

Larry Page is not being completely honest! The manner in which the PRISM program/project works does not need access from company administrators or owners, so called “direct access”; the access to the information is already there. These tech company CEOs take for granted the actual intelligence of most end users of their products. All it takes is a little digging and reading to go from ignorant to informed on these things especially on exactly how the internet works/functions in the U.S.A. I find Larry Page’s remarks just as laughable as Al Gore’s claim to “inventing” the internet/world wide web!

If you, as an end user, are reading this post; I challenge you to research these matters yourself. It really is quite simple with all the “information sites” that exist on the web today ie Wikipedia, & other online encyclopedias that actually list source material, as well as highly respected tech sites and blogs that also list their source material. Be warned: this is only the tip of the iceberg and these tech CEOs know and understand this; they are scrambling in attempt to perform DAMAGE CONTROL to save the company and what little trust thay have left from their products end users/consumers.

Am I a skeptic? I believe someone has to be or needs to be at this point in time! If your not just a little skeptical of the government, tech companies, and the people that are in charge of these agencies and companies; you need to be, even if just a little skeptic. For your own personal protection and security! I know I was a part of this community for over 14 years!

Anders Jackson

|

As I understand it so do VLC use same encoders as ffmpeg. And yes, there are less code that can break when you use command line instead of a graphical UI.

And may I ask what mono has to do with VLC? *facepalm*

Anders Jackson

|

Just some thoughts about Java.

OpenJDK7 are now THE Java implementation and Oracles are just one more of the reimplementations. So you should not need to install Oracles version.

And you really don’t need to remove the OpenJDK7 installation to also have Sun Java JDK 7. Just run

sudo update-java-alternatives –list

and select which java you want to have as default java of all that is installed.

And if you want to run a program with one special version, check manpage for java-wrappers how to do that.

man java-wrappers

so you can run java program rasterizer like this:

JAVA_FLAVOR=openjdk rasterizer
JAVA_ARGS=-Xmx80m rasterizer

JAVA_BINDIR=/usr/share/

etc

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .