Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my Suse Linux (KDE) system I've configured my Samba Client and Server under YAST.
I can see my XP system from Linux just fine, and I can share files, edit, copy, etc. But I can't see my Linux filesystem from my XP machine. My XP machine can see the the shared files on the rest of my network OK, including 3 other XP machines, a wireless webcam, a print server, and a bunch of other stuff. So I think the problem's on the Linux side.
Details:
My network is a workgroup, not a domain, and all the devices are DHCP clients served from my Linksys router.
If I ping my Linux PC from XP it responds just fine.
My Linux PC does not show up in the Windows "local network" BUT ...
If I do a "map network drive" in XP to the Linux machine's IP address (//192.168.1.22 at the moment) it sees it as a Samba server, but when I try to log onto it it appends the LOCAL PC's name to my login name. For example, the user name on my linux machine is "agent" so if I'm on my XP machine named Scamp it tries to log me in as "SCAMP\agent". If I try it from my XP machine "Skye" it tries to log me in as "SKYE\agent". etc. It won't let me set it to anything else, not even the NetBIOS name I assigned in YAST to the Linux PC, "Loki".
1. By default, XP tries to login to SMB/CIVS shares via
encrypted network communication, and this is a tricky
thing to be gotten to work with samba, to say the least.
However, there is a key in XP registry which you can set
in order to prevent that (just google for XP Samba Registry).
2. Could you post your smb.conf? (probably located in
/etc/samba/)
Greetings
Windows always tries to use a local username to login to SMB shares, in my experience you can jsut erase the name it wants to use and put the correct one in. You may also want to use static addresses, so your drive mappings will stay the same, as opposed to them changing due to DHCP.
Originally posted by guitarman85281
[B]Greetings
Windows always tries to use a local username to login to SMB shares, in my experience you can jsut erase the name it wants to use and put the correct one in.
Nope, as I said in my original question, it won't let me change it to something else. If it says "SCAMP\agent" and I replace that with "Loki\agent", type the password and click OK, it replaces it with "SCAMP\agent" and says it's an error.
N.B. that if I try to map a drive letter to a password-protected acount on a Windows system (e.g., if my wife brings her work laptop home) it does NOT reject the name like it does for the Linux system. (Granted, that doesn't involve Samba) That's why I think it's a problem on the Linux side. I thought I should use the NetBIOS name I set in the Samba server ("Loki") - is that wrong?
BTW, the username is 'agent' on both systems (I use the same username on all my home systems to minimize confusion) and the password is also the same.
Quote:
You may also want to use static addresses, so your drive mappings will stay the same, as opposed to them changing due to DHCP.
I don't see the advantage of this. The Windows PC's all manage to find each other when they boot up regardless of what order they boot in or what their IP addresses are. The advantage of DHCP is that when people visit my home or studio and bring their laptops they can automagically be assigned an IP address that's on our network.
Is Samba the right tool for this job? What I'm looking for is a way to put my Linux system on the network for easy sharing of its file system and I was hoping to find a tool that "just works" without a lot of tweaking and messing around under the hood. Reading configuaration files and editing the Registry is what I get paid to do in my day job (I'm a sw engineer). Doing it at home for relaxation sounds like as much fun as attending status meetings and filling out time sheets. ("Hey honey, how'd you like to light some candles, open some wine, put on some romantic music, and go over a few bug reports with me?" Is there an easier option than Samba? (I know NFS is even worse)
(PS - I'm writing this at work - I'll answer the smb.conf question when I get home)
Could you post your smb.conf? (probably located in /etc/samba/)
OK, here it is, but I have no idea what most of it means . . .
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SuSE
# Date: 2004-04-06
[global]
workgroup = workgroup
interfaces = 127.0.0.1 eth0
bind interfaces only = true
printing = cups
printcap name = cups
printer admin = @ntadmin, root, administrator
map to guest = Bad User
security = user
encrypt passwords = yes
server string = Samba Server
add machine script =
domain master = false
domain logons = no
local master = no
preferred master = auto
load printers = no
ldap suffix = dc=example,dc=com
netbios name = Loki
[homes]
comment = Home Directories
valid users = %S
browseable = no
read only = No
guest ok = no
printable = no
[users]
comment = All users
path = /home
writeable = Yes
inherit permissions = Yes
veto files = /aquota.user/groups/shares/
browseable = yes
guest ok = no
printable = no
[groups]
comment = All groups
path = /home/groups
writeable = Yes
inherit permissions = Yes
browseable = yes
guest ok = no
printable = no
;; [pdf]
;; comment = PDF creator
;; path = /var/tmp
;; printable = yes
;; print command = /usr/bin/smbprngenpdf -J '%J' -c %c -s %s -u '%u' -z %z
;; create mask = 0600
;; browseable = yes
;; guest ok = no
;; [printers]
;; comment = All Printers
;; path = /var/tmp
;; printable = yes
;; create mask = 0600
;; browseable = no
;; guest ok = no
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
browseable = yes
guest ok = no
printable = no
Originally posted by guitarman85281 Greetings
I'm thinking that the interfaces line should be listening on your internal IP address, not 127.0.0.1 and eth0.
"interfaces = 127.0.0.1 eth0"
The "internal IP address" of what?
Like most private nets we follow the convention of all the IP addresses on our side on the NAT being in the range of 192.168.x.x. But, as I mentioned above, we run in a DHCP environment so the PC's don't have static IP addresses.
I agree that line about 127.0.0.1 struck me as odd, but mostly because the sw engineer in me eschews literals. As I mentioned before, Linux can see the shared files on XP just fine, so where ever or however it's listening, it is hearing it.
Before I do that, what do those Registry changes DO? NOT encrypting passwords that default to being encrypted makes me feel nervous.
Also Does EVERYONE who wants to share files from a Linux machine to XP have to do this??!!
Also II We use Samba at my work to share files from our Unix servers to our desktop PC's and I've never had to change registry settings on any desktop PC to access the Unix servers' file systems.
I really do appreciate the help you've offered but I'm just wondering if it's not overkill for whatever the problem is here. Is there anything we can do to diagnose the problem before trying to cure it?
Originally posted by plnelson
The "internal IP address" of what?
Like most private nets we follow the convention of all the IP addresses on our side on the NAT being in the range of 192.168.x.x. But, as I mentioned above, we run in a DHCP environment so the PC's don't have static IP addresses.
[/B]
Just uncomment the "interfaces" line (though it should work). This line
is telling samba on which network interfaces its service should be available, and
on which not (if you have more than one network card, you can restrict samba
services to a particular card).
127.0.0.1 tells samba to use loopback on connections from the same machine
(if you mount a samba share on the same machine the samba service is running),
but for now you can do without it.
Quote:
Originally posted by plnelson Before I do that, what do those Registry changes DO? NOT encrypting passwords that default to being encrypted makes me feel nervous.
Also Does EVERYONE who wants to share files from a Linux machine to XP have to do this??!!
Also II We use Samba at my work to share files from our Unix servers to our desktop PC's and I've never had to change registry settings on any desktop PC to access the Unix servers' file systems.
I really do appreciate the help you've offered but I'm just wondering if it's not overkill for whatever the problem is here. Is there anything we can do to diagnose the problem before trying to cure it?
No it's not overkill. Get it to work first, then solve the encryption problem. BTW this
encryption "issue" is
-> * Microsoft fault * <-
not samba, since the idiots at MS can't even stick to their own "standards" (or, to
be more exact, change the protocol for password transfers with each and every
service pack and new windows version, just so that after an upgrade you can not
connect to samba anymore without manual intervention, and just so to keep *you*
in the MS jail, so you're forced to buy their lousy products with no way to *choose*
from a variety of products. That's "fair" by MS standard).
Just put the keys in your registry and see you get it to work.
You can, of course, always reset the XP box to pw encryption.
BTW if I remember correctly, you need LDAP authentification on your network
to use password encryption. You will most likely find that your distribution
comes with an LDAP server, but I'm not exactly an expert in this field of
knowledge.
No it's not overkill. Get it to work first, then solve the encryption problem. BTW this
encryption "issue" is
-> * Microsoft fault * <-
not samba, since the idiots at MS can't even stick to their own "standards"
OK, I'll try it when I get home (I'm reading this at work). But I would feel more comfortable if we diagnosed the problem first and then tried to solve it. Editing the Config files and Registry without first knowing what's causing the problem seems like a doctor prescribing a drug without knowing the disease his patient has.
I still don't understand, if this is the right solution then how come everybody doesn't have to do it? I'm running a vanilla XP with SP1, exactly the same setup I have at work where I didn't have to edit the Registry.
Originally posted by Marius2 Sorry for the MS bashing, but I'm really sick with them and their crappy
products.
No need to apologize to me - I don't like Microsoft either, but they own the world, so the world has to adap to them, not the other way around.
Luckily I'm a software engineer so I'm comfortable editting my Registry and the config files on Linux. But this illustrates why Linux is still in a "geek ghetto" - if it was my sister, or mother-in-law, or massage therapist (i.e., someone with no technical skills) asking them to edit their Windows Registry or a config file would not be reasonable. Regardless of how much Microsoft changes their "standards", sharing files across a network is a really basic feature that needs to work out-of-the-box if we expect nontechnical users to make Linux their desktop OS.
Originally posted by plnelson OK, I'll try it when I get home (I'm reading this at work). But I would feel more comfortable if we diagnosed the problem first and then tried to solve it. Editing the Config files and Registry without first knowing what's causing the problem seems like a doctor prescribing a drug without knowing the disease his patient has.
But most doctors are working like this !? :-) But serious: Digging out the problem
with a diagnosis like "XP isn't connecting to samba" via a webforum is virtually im-
possible. BTW: The samba manual will probably help, you should find them some-
where under /usr/share/doc.. whats your distribution? Ah SuSE, then it is
/usr/share/doc/packages/samba.
Quote:
Originally posted by plnelson
I still don't understand, if this is the right solution then how come everybody doesn't have to do it? I'm running a vanilla XP with SP1, exactly the same setup I have at work where I didn't have to edit the Registry.
If you don't have to edit the registry at work, this either means
a. you're authenticating via LDAP in that network (ask the admin)
or
b. your PC come preconfigured with the appropriate registry key
(some vendors may do this, if you tell them there is a samba server
in your network)
or
c. the samba server at your workplace is set up in such a way that it
works without fumbling. I'm not aware of any method to achieve this,
but ask your admin about this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.