Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-21-2004, 10:10 PM   #1
Registered: Jun 2004
Posts: 39

Rep: Reputation: 15
Can't work Samba, password issues

Hey all,

I am a damn Samba n00b but I'm trying to hook up my SuSE 9.1 Pro Linux box onto a Windows XP server. I need Samba to let Windows recongnize Linux so I can make automated backups of Windows information and move them onto the Linux machine for safe keeping So, I am pretty stumped as to what is wrong with this, firstly is it possible to get a Samba server working by ONLY using the SuSE Yast Samba interface? I've looked into the samba.conf file and modified a few things through there but wondering if you can do it all through Yast. Secondly, Linux is having difficulties viewing the network. Once Samba works will the network be visable through Linux? And last, I can't work out the password setup for Linux/Windows, if you want to look on a Linux share in Windows through Samba it asks you for a username and password, but for a Linux machine, so the password isn't banked on the Windows machine, blah blah blah, I can't work it out :|, any help on these things would be great.
Old 07-22-2004, 07:09 AM   #2
LQ Newbie
Registered: Oct 2003
Location: Fredericton NB
Posts: 16

Rep: Reputation: 0
I'm no samba expert - thats for fact - but i've found you have to have an account set up on the linbox with a password to be used to access linux shares from the winbox. then you have to run a little prog called smbpasswd with the account name, it'll ask for a password - give it the password for that account, and tada, its in sambas database. when you try to log in from winbox use that account and password

Old 07-22-2004, 07:35 AM   #3
Registered: Jul 2004
Location: Milton Keynes, UK
Distribution: Red Hat Fedora
Posts: 35

Rep: Reputation: 15

I think you have to create a "samba" password using the smbpasswd command. This has several options to it and I think you'll need to do:

smpasswd -a <username>

and that should add and entry into the smbpasswd file.

So, what I think you need to do is:

1) Create an account on your linux machine (a normal account for logins)
2) use smbpasswd -a to add the account to sambas password file - you may also then need to set the passwd but I can't remember if it does this with the -a option. If not, use smbpasswd <username> to set it.
3) Check that you've got smb.conf configured to use encrypted passwords.
4) Make sure that the smb daemon is running.

There are also a few other files you may use. There's one that maps windows login names to "unix" style names so you don't have to use the same login names for each OS. This is normally called and is referenced in smb.conf.

On the networking side, I don't think samba will make your network work as such. I'm no expert on networking (see my other posts!!!) but I would check that the linux machine is in the same network as the windows box (same netmask etc...) and that you have a default gateway setup too. One other thing to look at is iptables - make sure that's either off or configured to allow this through. I personally turn iptables off since I'm behind another firewall anyway but it depends on your personal preference and network configuration.

I hope this helps a little - good luck!

Old 07-29-2004, 05:08 AM   #4
Senior Member
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
You'd also need to make sure that the Samba is trying to connect to the same workgroup/domain as the Windows shares are on. That's just about the first option in /etc/samba/smb.conf (and the one most often completely wrong).

Second, if you're trying to view Windows shares from the Linux box, smbpasswd is not as urgent as that the user trying to connect to the Windows box being known to the Windows box.

Basically smbpasswd serves the same function for the Linux Samba server (which means if the Linux box is not sharing files, there is no Linux Samba server running), as the administrative add user function does for the Windows Samba server... and that function is to identify what username/passwords are allowed to view files shared by that server.

So to view files on a Windows box (shares served by the Windows Samba server, which is installed by default), the admin of the XP box must add "the user" (or "a user", it does not necessarily have to be the same u/p as the unix user, as you only need to enter an authorized u/p in the dialog) to the userlist, or the shares must be set to "Everybody", and/or "guest access" must be enabled.

Which last two options are a bit too insecure for my taste, so the shares on the Windows box are limited to specific users, one of whom is my former Windows user when I was accessing the shares from a dual-boot setup which no longer exists, but one could just as easily make a "junk" user on the Windows box who had only the rights necessary to access the share (although, under Windows, that still gives you a lot of unnecessary rights by default to act on Windows system files that cannot be well "locked down" short of a Policy edit).

For the Windows box to access shared files on the Linux box, one must first have the Samba server component installed, and then must share some files (or rather, a folder containing some files). That part can get a bit tricky, as Linux enforces user privileges much more firmly (and correctly) than Windows does, so the Linux user wanting to share files is limited as to where those files must reside in order for 1) him/her to have the right to give access to others to read or modify the shared folder/files (for example, user "joe" does not have the right to change access permissions on the /etc/ folder, so cannot share it); and 2) for the sharing users to have reasonably easy access to the folder in the first place (folders in /mnt, for example, may only be readable by members of certain groups, and "others"-- which may include the Windows user trying to see the share-- may not have even read permissions. That doesn't help anyway if the shared folder needs to be read-write for all authorized users). This is why shares are generally restricted to the /home folder and more specifically usually to one's own /home/username folder (although one may of course mount a whole shared partition to /home/username/somefolder if one so desires).

Once that hurdle is overcome, the "outside" user must be made known to the Samba servers as an authorized user via the use of smbpasswd as above, after which the Windows box should, theoretically, be able to view and access any shares from the Linux box. In practice, it is generally not so cut-and-dried, but certainly can be made to work with a bit of effort, as well as tools like Webmin, and Samba-Swat for configuration, and LinNeighborhood, Nautilus or Konqueror's smb browsers, or Smb4k for viewing, mounting and unmounting shares from the Windows box to you.

It's mostly complex because it's often hard to know where and when authentication is failing, and it's often hard to know who's authenticated on the Windows box, to do what, and where their authentication is kept.

But reading The Official Samba-3 HOWTO and Reference Guide can help you understand the issues involved and set Samba up correctly, as can reading rute in general, and in particular 39. smbd -- Samba NT Server.

Hope this helps; you've been very non-specific as to just what is not working with your Samba setup and where access is falling down.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
(Samba) How does that password-thing work? theonebeyond Linux - Networking 3 09-28-2004 09:33 AM
Samba password doesn't work when accessing Linux shares from W2K soren625 Linux - Software 4 05-14-2004 05:55 AM
Samba + Windows: Password Issues Sayman Linux - Networking 1 11-22-2003 05:24 PM
Logon samba on other samba password list hernandi Linux - Networking 1 10-14-2003 12:46 PM
Just change Samba password, not Unix password? sorrodos Linux - Networking 1 08-14-2003 07:52 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:51 AM.

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