Gentoo Archives: gentoo-user

From: Ryan Tandy <tarpman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Samba setup, I dunno what to do here. :\
Date: Sun, 09 Apr 2006 00:36:45
Message-Id: 44385608.9040808@gmail.com
In Reply to: [gentoo-user] Samba setup, I dunno what to do here. :\ by Teresa and Dale
1 Teresa and Dale wrote:
2 > Hi,
3 >
4 > I have a little network here. We have a cable modem that connects to a
5 > Linksys router then we have two computers that hook to it and share the
6 > internet. I have my Gentoo Linux box that I just installed samba on.
7 > She has a Windoze XP box. I think I have my samba set up, not real sure
8 > though, but I can not figure out the windoze box. I can ping the IP
9 > address of her windoze box from my Linux box, no clue on how to do that
10 > on her windoze box so I assume it can see my box too.
11 >
12 Windows 2000 and XP both have a number of UNIX-like network commands
13 that you'd be familiar with, such as nslookup and ping - even "ipconfig"
14 (similar to ifconfig). The options are slightly different though - ping
15 /? should help you out.
16
17 If you have Samba set up correctly, Windows is effectively zero-conf
18 aside from making sure you know what workgroup it thinks it's in. The
19 samba machine will show up in Windows' My Network Places.
20
21 <snip>
22 > Oh, the router uses DHCP so how do I let it figure out what the address
23 > is?
24 Set your samba up as a WINS (Windows name resolution) server with the
25 option wins support = 1 under [global] (AFAIR ;). The Windows box will
26 now be able to lookup your Gentoo box by the netbios name you assigned it.
27 > In case you can not tell, this is all new to me. Here is the
28 > testparm thing, I did read what I could understand at least:
29 Let me guess, copied and pasted from some tutorial without really
30 looking at it? ;) Don't worry, that's a fine place to start. However,
31 if all you really need to share is /mnt/data, you have *way* more stuff
32 in here than you actually need.
33 >> root@smoker / # testparm
34 >> Load smb config files from /etc/samba/smb.conf
35 >> WARNING: The "printer admin" option is deprecated
36 >>
37 No need to keep deprecated options - man smb.conf can tell you if
38 there's new replacements.
39
40 <snip>
41 >> WARNING: passdb expand explicit = yes is deprecated
42 >>
43 ditto.
44 >> Warning: Service printers defines a print command, but print command
45 >> parameter is ignored when using CUPS libraries.
46 >>
47 ...meaning the 'print command' line doesn't need to be in there.
48 >> Server role: ROLE_STANDALONE
49 >> Press enter to see a dump of your service definitions
50 >>
51 >> [global]
52 >> server string = Samba Server %v
53 >> map to guest = Bad User
54 >> log file = /var/log/samba/log.%m
55 >> max log size = 50
56 >> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
57 >> printcap name = cups
58 >> dns proxy = No
59 >> printer admin = @adm
60 >>
61 If you don't plan to use the box as a print server, any and all printer
62 stuff can be removed, including both print* sections. Specialized
63 socket options shouldn't be necessary in most typical home setups. I
64 don't know what the 'dns proxy' option does exactly, but I'm fairly sure
65 you don't need it. You should have in here a 'workgroup' entry matching
66 the workgroup the Windows machine thinks it's part of. You also don't
67 have a 'security =' line defining the security model to use. I don't
68 remember what the default is.
69 >> [homes]
70 >> comment = Home Directories
71 >> read only = No
72 >> browseable = No
73 >>
74 Not needed if you're only sharing one directory.
75 >> [printers]
76 >> comment = All Printers
77 >> path = /var/spool/samba
78 >> create mask = 0700
79 >> guest ok = Yes
80 >> printable = Yes
81 >> print command = lpr-cups -P %p -o raw %s -r # using client
82 >> side printer drivers.
83 >> browseable = No
84 >>
85 >> [print$]
86 >> path = /var/lib/samba/printers
87 >> write list = @adm, root
88 >> guest ok = Yes
89 >>
90 Not needed if you aren't a print server.
91 >> [DATA]
92 >> path = /mnt/data/
93 >> guest ok = Yes
94 >> case sensitive = No
95 >> hide unreadable = Yes
96 >> veto files = Donna-windoze/
97 >> hide files = Donna-windoze/
98 >> veto oplock files = Donna-windoze/
99 >> msdfs proxy = no
100 >> root@smoker / #
101 What *is* all this stuff? O_o The first two lines make sense, the third
102 one somewhat (I personally recommend case sensitivity, but it's up to
103 you.) No idea what the rest of them do. What you don't have that you
104 need is either 'writeable = yes' or 'read only = no' so that the Windows
105 machine can store its data in here. Also, you have 'guest ok = yes' and
106 no valid users specified, so *any* user
107
108
109 OK, it's now a few minutes later and I've looked these up in man
110 smb.conf. You don't want the msdfs proxy option, since you don't have a
111 DFS going (as far as I can tell). Hide unreadable makes some sense - I
112 might start using it myself. On these other hand, why would you want to
113 hide the very files she's supposed to be accessing? Even sillier with
114 the vetoing - now she can't access them at all! In other words, what
115 you have here is a partition with all files *whose path contains*
116 'Donna-windoze' hidden, everyone prevented from accessing (writing *or*
117 reading) them, and then hidden again because of this. Since you don't
118 have oplocks disabled for the share, the 'veto oplock files' also makes
119 no sense. In any case, you aren't likely to need to lock anything much
120 (again, in a typical domestic setup).
121 >>
122 >>
123 >
124 >
125 > What I am trying to share is /mnt/data/. Not sure what that other stuff is.
126 >
127 So why'd you leave it in then? ;)
128 > Oh, if this will work in IE, that would be a HUGE plus. She still uses
129 > that thing. < pukes > I'm also not sure what to type into IE to get to
130 > my box either.
131 If you have the 'wins support = yes' line (or whatever it actually is)
132 in [global], then she will be able to browse to it over the network or
133 find it by its netbios name (defaults to its hostname if you didn't
134 assign one explicitly, which you didn't). I wouldn't bother typing a
135 name in - rather, use Windows Explorer to go to "My Network Places", and
136 find "Computers Near Me". If you have them both in the same workgroup
137 properly, your machine will show up there. The other place is under
138 Microsoft Windows Network -> (name of workgroup).
139 >
140 >
141 > Thanks for any help you can provide. I was following a how to but I
142 > think I got lost, hopefully just on the windoze part.
143 >
144 A print server howto, yes. Not exactly in line with what you intended,
145 by the look of it. :)
146 > Dale
147 > :-)
148 >
149 >
150 Hope I've cleared up at least a little bit of confusion. Feel free to
151 e-mail me privately if you want to talk about this more or want to see
152 my smb.conf - other than that, all you need is to have a little sit down
153 with man smb.conf and Google. Less is more - a simple network needs
154 only a very simple smb.conf.
155
156 Ryan
157
158 --
159 gentoo-user@g.o mailing list