Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

samba setup

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
DeirdeReilly
Posts: 5
Joined: 2009-12-03 18:10

samba setup

#1 Post by DeirdeReilly »

Hey guys,

Im completely new to linux, learning on debian... and trying to find out howto set up a samba server, i want to be able to set up a NetBIOS server name with the name deirde

And then how would I be able to setup a share on this so I can share files?

Thanks guys! :D

User avatar
Absent Minded
Posts: 3464
Joined: 2006-07-09 08:50
Location: Washington State U.S.A.
Been thanked: 3 times

Re: samba setup

#2 Post by Absent Minded »

Hello and welcome to Debian and the Forum. There are several ways to accomplish what you want. Will you be running a GUI or just the CLI or headless? I personally like to use a package called Webmin to configure SAMBA. However, if you are upto the challenge you can do it all by hand after reading the SMABA config file.
Serving the community the best way I can.
Spreading the tradition of Community Spirit.
Please read some Basic Forum Philosophy
Give a man a fish, he eats for a day. Teach him how to fish, he eats for life.
Updated Nov. 19, 2012

DeirdeReilly
Posts: 5
Joined: 2009-12-03 18:10

Re: samba setup

#3 Post by DeirdeReilly »

yes I'm trying to do it by manually editing the smb.conf through command line.

User avatar
csaba
Posts: 127
Joined: 2007-08-02 05:30

Re: samba setup

#4 Post by csaba »

The fastest way (and also the most unsecure) for me to make a working samba configuration on debian stable/lenny is as follows:

As root:

Code: Select all

# apt-get install samba
# vi /etc/samba/smb.conf 
Instead of vi you could use whichever editor you preffer.

here search for the line which starts with

Code: Select all

# security=
and after the equals sign enter the word "share" and delete the # sign from the begining of the line

now you must also define your shares by inserting a few lines for every share like this:

Code: Select all

[samba-rw-share]
comment = RW share
browseable = yes
writable = yes
path = /path/to/folder/you/want/to/share
guest ok = yes
samba-rw-share will be the name of the share, browseable and guest ok lines are required for samba to not ask for any passwords whatsoever when connecting to the share. path is the path to folder which you would like to share. and also if you include the writeable line your share will be writable also. There are a bunch of other options also, i suggest reading man smb.conf.

I would like to empasize again that this is the most unsecure way one could set up samba (but the fastest), but if you have a home network with a few machines only for your own usage, there is no particular danger setting up samba like this. At least this works for me.

cheers..

Edit: i forgot, after you make these changes you must restart samba. As root:

Code: Select all

# /etc/init.d/samba restart
Omnes homines natura scire desiderant.

DeirdeReilly
Posts: 5
Joined: 2009-12-03 18:10

Re: samba setup

#5 Post by DeirdeReilly »

Ok, I'll give that a go, Thanks!

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: samba setup

#6 Post by dilberts_left_nut »

Also the SWAT pkg (Samba Web Admin Tool) is an easy (and with good help) way to set up your basic config and administer shares & users.
Runs on port 901 (by default) and access it with any browser.
AdrianTM wrote:There's no hacker in my grandma...

DeirdeReilly
Posts: 5
Joined: 2009-12-03 18:10

Re: samba setup

#7 Post by DeirdeReilly »

csaba wrote:
That work perfectly thanks!
Now I just need to be able to change the netbios name, any ideas?
I tried putting in netbios name = Deirde but when I restart the server it doesnt change?

DeirdeReilly
Posts: 5
Joined: 2009-12-03 18:10

Re: samba setup

#8 Post by DeirdeReilly »

oh I cant seem to mount it on my other machine

I put

//ipaddres/media/ /mnt/media smbfs defaults 0 0

but it says

mount: wrong fs type, bad option, bad superblock on //ipaddres/media/,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

any ideas?

User avatar
csaba
Posts: 127
Joined: 2007-08-02 05:30

Re: samba setup

#9 Post by csaba »

I presume that you have already installed the smbfs package with the package manager of your choice, so that cannot be the issue in your setup.

i use this format in /etc/fstab to mount a share and it works for me:

Code: Select all

192.168.1.3:media /media/loop smbfs defaults 0 0
But i also tried your format of giving //ip.address/share, and that works for me too flawlessly.

You could try mounting the share manually also and not from fstab to see what it sais, by:

Code: Select all

# mount -t smbfs //ip.address/sharename /some/where

or

# mount -t smbfs ip.address:sharename /some/where
Also you could try swapping everywhere smbfs for cifs, to see will that work out for you.
You could also post the result of dmesg | tail, just after you've tried to execute the mounting of the share, to see what is the exact error message.

Good luck..
Omnes homines natura scire desiderant.

Post Reply