LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-08-2007, 03:17 PM   #1
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Rep: Reputation: 30
Smile can't get samba to work


I have a post in the server section, but wanted to ask a debian specific question regards the location of the smbusers file. Where should it reside please? Is there an example like the example smb.conf file so I can see the format of the file?

Thanks,
Greeb
 
Old 10-09-2007, 07:51 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
You can search for it:
Code:
$ find / -name smbusers
But if you want to add a Samba user, the best way (IMHO) is to create a Samba users group, and create a new user:
Code:
# groupadd smbuser
# useradd -s /bin/false -G smbuser user
# smbpasswd -a user
When in doubt - read the man page.

Last edited by indienick; 10-09-2007 at 07:52 AM. Reason: READ THE MAN PAGE!
 
Old 10-09-2007, 01:23 PM   #3
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Original Poster
Rep: Reputation: 30
Smile thanks for your help

Dear Indi - Thanks for your help, much appreciated. Fact is i've read so many man pages that I look like a man page. My wife now thinks I'm a man page and my kids are asking me dad why are you on about man pages all the time?

Fact is I guess most of us come to forums having read man pages and also having nightmares over which man page it is we should be reading when we're unabe to make progress. I've been doing Linux for 2 years now and still find the nitty gritty things like samba very complicated when they don't work for some reason.

As you know there are many variables (as well as the script variables) to consider and if you don't know what they're all suposd to do ('Cos you're not an expert) it's very difficult to progress without help from these forums.

My bum is sore from sitting down reading mans and googled up howtos so really these forums are a fantastic resource.

May the force be with us...

Anyway I did search for the smbuser file and I knew it wasn't on my system - that's why I asked about what it's format and location should be. Perhaps you might know the location? is it /etc/samba/....

All the best,

Greeb
 
Old 10-09-2007, 09:08 PM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Well poop.

I can't find the smbpasswd file on my system - but apparently, it exists. Even if I look in Synaptic, under the "Installed Files" tab on the package's properties, there's no reference to a smbpasswd file (aside from the smbpasswd program itself).

I've been running Linux for about 12 years now, only ever touching Windows to play the odd game, and the only reason I suggested the man page was because - I swear - half of the Linux user population doesn't even know that man pages exist.
 
Old 10-12-2007, 11:33 AM   #5
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Rep: Reputation: 30
I think I can help here. I also couldn't get samba to work under Etch for the longest time. I think it is because despite installing all those smbclients, you have to set up Etch as a samba SERVER. Once I caught on to that,the following articles helped me do it and then everything worked.

http://www.howtoforge.com/debian_etc...tdbsam_backend

http://www.debianhelp.co.uk/samba.htm

http://thegoldenear.org/toolbox/unic...tch.html#samba

Good luck.
 
Old 10-12-2007, 02:52 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Either install your samba-doc package or visit the samba.org website and download the two books "Samba 3 by Example" and "Samba3-Howto".

In the Samba 3 Howto & Reference guide, Section 13.4.4:
Code:
13.4.4 User Mapping
In some situations it is unavoidable that a user’s Windows logon name will
differ from the login ID that user has on the Samba server. It is possible
to create a special file on the Samba server that will permit the Windows
user name to be mapped to a different UNIX/Linux user name. The smb.
conf file must also be amended so that the [global] stanza contains the
parameter:
username map = /etc/samba/smbusers
The content of the /etc/samba/smbusers file is shown here:
parsonsw: "William Parsons"
marygee: geeringm
In this example the Windows user account “William Parsons” will be mapped
to the UNIX user parsonsw, and the Windows user account “geeringm” will
be mapped to the UNIX user marygee.
It would be better to create samba users that have the same names and passwords as the windows user. You didn't say if you use Samba as a domain controller. In the home, probably not, and you can use the "smbpasswd" program. Also look through some of the sample configurations in "Samba 3 by Example". It goes through the process of creating the directories to be shared, setting the properties, including sometimes the "sticky bit" and adding users. If you use smbpasswd or a different u tility depends on the "security =" setting and the password backend setting in /etc/samba/smb.conf.
 
Old 10-15-2007, 12:37 PM   #7
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Original Poster
Rep: Reputation: 30
Smile thanks ...

Thanks for taking an interest I got it going somehow I will read the books and se if I can gen up

here is the last post I made in the 'server section'::

Harry Potter Stuff...

Hi All I have been working with computers in one way or another for 35 years and I now realise it is too long and it has finally got to me. I used to be a FORTRAN programmer, but I recovered from that only to get recently entangled with something as magical as sharing a directory via Samba with windows.

Actually, Having got Printing to work (shared my windows printer with Deb 4 machine very easily) I gave up trying to get the directory share to work. I copied back the original bog standard smb.conf file and changed it so the printing still worked and left it at that. Imagine my surprise when this morning I used the windos machine and looked in 'my network places' and found my Debian box there! It even accepted the username and password I didn't set up and let me view the files.

Magic!

I blame Windows for all this.

Keep smiling
Greeb
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help getting samba to work dvdljns Linux - Networking 12 05-21-2005 09:13 PM
Win->Samba works, Samba->Win does'nt work outburst Linux - Networking 2 10-30-2003 08:31 AM
cannot get samba to work. rvn Linux - Newbie 2 10-26-2003 10:06 PM
Help I cant Get Samba to Work sdiprose2002 Mandriva 1 10-16-2003 11:57 AM
samba should work? chens_83 Linux - Networking 1 07-08-2002 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration