Siddhu Warrier: Setting up Samba

KDE enthusiast Siddhu Warrier has kindly contributed a write-up of his experiences with setting up a Samba server using Linux and KDE. For those of you who don't know what Samba is, the bottom line is that with a little black magic, you can conveniently access files, directories and printers on a Linux machine from a Windows machine and vice-versa all over the network. Intrigued? Pull up your sleeves and check out the article. Thank you, Siddhu, and to the rest of you: caveat emptor!

Dot Categories: 


by foo (not verified)

Setting up a Samba server eh? If there's any software that you really don't need on a Samba server, it's X and KDE. "caveat emptor" alright - you've installed too much.

by rinse (not verified)

Correct, if the samba-server is on a separate computer.
But in most environments I work, the Samba-server is one of the desktop computers in the network.


by Navindra Umanee (not verified)

And to add to that, I believe that if you want access to *all* the desktop Linux boxes from Windows, you need to install a Samba server on each and every one of them.

by cies (not verified)

Indeed, if you want others to view/use some file/printer shares on your desktop, you'll need to run a samba-server on it, right?

by Philipp (not verified)


in case of Win <> Win9x you only need cups. Samba can add here additional functionality, but for basic printing Samba is not needed.

by cies (not verified)

> in case of Win <> Win9x you only need cups.

for printing on the network and allowing others to do so at your computer+printer...

But for reading/modifing files from the 'shared folder' of your collegue? You need smbmount, right? And for sharing files on the network? You'll need samba (smbd), isn't it?

by stunji (not verified)

Calm down, people!! You need to configure the Samba server in order to use the Samba *CLIENT*, which is normal for a desktop machine to run.

by Mike (not verified)

I have no idea what any of that had to do with KDE. He used a KDE text editor to edit the config file. Wow! He used Konqueror to change the permissions of a file. Ooo! Everything else was done at the command line.

There is a project called KSambaPlugin that offers a much better solution.

Unfortunately, version 0.4b didn't work for me on Gentoo Linux. I had to edit the config file by hand. Version 0.4.2 is out, but I haven't tried it.

by Navindra Umanee (not verified)

Well, the fact is that KDE is part of a much larger system. That's where the whole KGX thing comes from. Sometimes even a KDE user has to look beyond the confines of KDE to get something done. Otherwise, this was a more or less experimental feature and will hopefully be informative and useful to at least some KDE users.

by dwt (not verified)

Well, at least he wrote something useful.
I can imagine this might come in handy to someone. Even if it's not that kde related. He's not that experienced with linux (he says so himself).
So give him a break. Nevertheless I thought this was a decent article for newbies. It provides step-by-step and not too much detailed info (which could be confusing).

by uga (not verified)

>I have no idea what any of that had to do with KDE.

One obvious answer: how many KDE newbies know how to connect to their local networks using KDE? How many know about "lisa"? How many know that there are things like "fish://"? Very few, only those that have people helping around. Not all KDE users have 10 years of experience programming kernel modules ;-)

Not only I think this is indeed KDE related. I really wish this kind of manuals were included somewhere in the KDE website. Don't think of KDE as a set of applications based on Qt. Think of it as a Working Environment.

How about more manuals like this?: How can I edit music files? How can I watch DVD's in kde? How can I set-up my e-mail? How can I write CD's? How can I .... I'm sure KDE newbies would love them.

by BillM (not verified)

>I have no idea what any of that had to do with KDE.

I have had several versions of Mandrake on my machine and always used the KDE configuration, meaning I have nothing to compare it to. I don't know if it is signifigant, but I threw Window out when it was "Windows for 386" - 12 / 15 years ago. My question is how do I tell what is Linux, what is Mandrake, or what is KDE or is that really important except to tell the more experienced what I am using ?

by GKL_Linux (not verified)

I am a linux newbie. I need Samba to connect my WinXP to my Fedora Core 1 linux machine (have you ever heard of mythtv? I want to share the files b/t upstairs and downstairs computers). Anyway, since I use KDE, I looked at to see postings/tutorials about Samba. FWIW, I agree with the 'How do I xxxx on KDE' approach.

If you want linux to be a more pervasive OS, you have to lower the barrier to entry. Flexibility and an anything-but-MicroSoft attitude is not enough to entice the masses.

What's lisa, fish, QT? Got me.

by uga (not verified)

To the previous posting, I think I should add this: Why not put this kind of stuff better in KHelpCenter?

My "helpcenter" seems to be explaining how to use KDE for those that have no experience with GUIs: "A Window! What now?", "Using the Taskbar".

My mom didn't ask me such questions ever. She only asked my how to read e-mail, how to write letters, how to print... that was it! People learn using taskbars intuitively in my experience.

Every new KDE user that I "recruited" had their questions related to multimedia stuff. Most know their way either in windows, mac, gnome... Then, they want to know about networking and e-mail, and last, how to install new software. I think those help areas are not really covered in the help of kde.

They don't want to know anything about areas covered as: MIME Types, applets,... and what does "kioslave" mean for a newbie??????

by Fab (not verified)


Follow this thread on the kde-doc-english mailinglist.

Also I have (re)written/translated several taskoriented howtos in dutch. I plan to translate them soon to english. I need some help from people who can proofread en correct my english. *hint*

Anyway .. there is enough stuff on the internet but it is mostly a bit outdated. Just find a howto and make it up-to-date with current KDE version.

Yes anybody can do this :o)


by uga (not verified)

uhmmm... that sounds interesting proposal.... but, I'm not a native english speaker, so I'd rather not correct anyone's english ;-)
I'll have a look what I can do. Thanks.

by standsolid (not verified)

hey i'd love to edit those. I am a native speaker, and although not a very good one, i think i can still be of help. a good way to tset your howtos is give them to a n00b and let them see if they understand them :)

by Fab (not verified)


Please contact me by mail if you want to help.



by ranger (not verified)

I have no idea what any of that had to do with KDE.

My question exactly!

He also uses mount (with no indication that you need to be root to use mount) when normal users may have to use smbmount, but he could use komba2 or kio_smb to access the share, and setup lisa to browse the network!

Why anyone would suggest running ICS on a Windows machine to get DHCP when you can have a firewalled ICS/DHCP box with any linux distro beats me.

Unfortunately, version 0.4b didn't work for me on Gentoo Linux. I had to edit the config file by hand. Version 0.4.2 is out, but I haven't tried it.

0.4.2 works fine, and is in contribs for Mandrake 9.1.

Mandrake 9.2 should have Windows network browsing in KDE working out-the-box ...

by Glen Barnes (not verified)

This brings up a bigger point is why you have to edit text files in the first place. Shouldn't the samba sharing be built into Konq? Shouldn't a user just be able to right click on a folder and select 'sharing' like in Windows and it be automatically shared?

Just some thoughts on usability.


by uga (not verified)

>Shouldn't a user just be able to right click on a folder and select 'sharing' like in >Windows

Have you tried to do it? Mine does:

Right click, Share (or Properties)->Local Net Sharing

by Mark Hannessen (not verified)

"Local Net Sharing" is too limited: ksambaplugin is your friend, right click on a map, then share, then go to the samba tab, and fill in everything want ( users, guests, rwx. it has everything windows does, and more )

by uga (not verified)

I just saw the project page in sourceforge. It looks nice. Is this anywhere in the kde cvs? Is it going to be merged into 3.2?

by Jan Schaefer (not verified)

I'm one of the (two) developers of KSambaPlugin.
It is in kdenonbeta and called kcm_sambaconf.
Currently it is not ment to go into 3.2.
However, I think it would be possible to put it
into 3.2. The main problem now is the translation.
It is not ready to be translated as it doesn't
handle translated Samba parameters correctly.
But if the majority wishes to have it in 3.2
I will do my best to correct these bugs.


Jan Schaefer

by Hundge (not verified)

I'm one of yours !
I would love to have this in 3.2 : it's a great piece of software.

by uga (not verified)

Who doesn't want it in 3.2? He must be using Windows! ;-)

Good work! Thanks to both of you.


by Nilesh Bansal (not verified)

I have SuSE 8.2 and its not working. For non root user even if i say share file it dont do so. When in control center Internet and Network -> File Sharing i select "allow users to share files" and apply changes and then restart kcontrol i see its still "do not allow users to share files" inspite of fact that i allowed users. This seems to be some bug please look in this.

Please include it in 3.2 also as its good and very user friendly.

by cies (not verified)

Can anybody tell me how this fits into the picture of LAN connectivity?

Does LISa rely on other libs/demons?

Thanks in advance...

by AC (not verified)

Not at all. Lisa is a network of port scanners, each running as a daemon. Lisa itself does not depend onfurther daemons for scanning. The only relation is that a Lisa daemon may discover a SMB server, like Samba.

by Mauricio Strello (not verified)

Uhm, LISa only scans a network of hosts discovering TCPIP services running (not only Windows shares).

BTW, I don't like LISa for newbies. It's hard to setup, it's hard understand their purpose, etc. There are a new SMB browser called Smb4K (I suppose SMB for KDE) in
It really works! Maybe will be a good idea to incorporate this code in the smb:/ kioslave.


by Bill (not verified)

Tried it. Didn't work for me. but my machine doesn't have '' or anything like it. Or the command 'service'. I guess thats RH specific. It is a good idea, though. Things like setting up samba are useful, and not always straightforward. Try man smb.conf some day... its enormous! Who's gonna read all that? Any other ideas?

by uga (not verified)

What distro are you using?
I have it here also in mandrake. The file is provided by the package samba-server-2.2.8a-5mdk

by Bill (not verified)

Slack 9.0

by uga (not verified)

This might help you. This is the contents of the script (I hope it's shown properly formated)

awk 'BEGIN {FS=":"
printf("#\n# SMB password file.\n#\n")
XX:[U ]:LCT-00000000:%s\n", $1, $3, $5) }

by Hiren (not verified)

Does anyone know how to get KDE to prompt for samba passwords?
I can add an entry for a samba share in fstab, and it automagically appears on my KDE desktop, and opening it runs the mounting helper. Because I'm a paranoid little man, I don't want to put the password for the samba share in the fstab and would like KDE to prompt me for a password. Does anyone know if this is even possible with KDE at the moment? I remember seeing it somewhere, although it could have been the medication talking.

by ranger (not verified)

Sure, it's a bit more work to setup, but works great.

Availabe in Mandrake contrib since about 9.0. It will mount shares you specify in a config file (with macros/tokens allowing configs to apply to all users) with the password you log in with.

by JJ Hurley (not verified)

Thanks for the informative article. I read it closely and either a step #7 is missing or things are mis-labeled after step #6.

You mentioned getting the IP from the NT server. What, if any,
difference is there if the IP is being assigned by a separate
DHCP server, such as a Netgear RT-311?

Many gateway routers do provide suh services and I find it is
one less item the server has to worry about. And of course,
because it is a M$ product, one less chance to fudge up.

I have one Linux box, called Ironsmith, that I would like to
attach to an existing home NT domain network. The current
NT home network has been in place for almost three years.


by Captain Guido (not verified)

This document has really helped setting up printing for my RedHat box. Thanks a lot; everything else was just crap. This is the type of documentation that I love. Not difficult, not sickeningly easy; just right. Thanks again.

Cpt. Guido

I followed your instructions, but I get the error Failed to modify password entry for user ?????.

Also - this file "" does not exist.

this is very urgent plz send me a better solution

I found that the error "Failed to modify password entry for user" occured when I didn't have a matching system user of that same name.

Fix: Create a system user with something like:

adduser myuser

See if this solves the issue for you.


Cheers that worked great :)

Chama te la comiste, bien por ti gracias me sacaste de un gran apuro

by Jabmist (not verified)

I have mounted a Windows share on my Linux box.
I was root when I did it.
(either smbmount or mount command)

Can I let my users have access to these files?
Everything seems to be readonly for everyone
but root.
Since I dont use Root normally,
I can only copy the files to my Linux box, edit them,
then su to root to copy them back to the windows box.

I've tried to chmod the directory, but
that doesnt change anything.

Is there a better way to do this?


by kalico (not verified)

THANK YOU!! This was exactly what I needed. Before I found this tutorial, I was floundering -- Linux could get to Windows shares, but Windows couldn't access anything on Linux. Thanks for not assuming I have any clue what I'm doing, yet writing instructions I could follow. ;-)