File: samba.html

package info (click to toggle)
lg-issue50 2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,880 kB
  • ctags: 157
  • sloc: sh: 47; makefile: 34; perl: 23
file content (210 lines) | stat: -rw-r--r-- 9,345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="JC Pollman">
   <meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.14 i686) [Netscape]">
</head>
<body>

<center><b><font size=+1>Windows Home</font></b></center>

<p>Samba is a set of programs that will allow you to have your windows "home"
directory follow you from computer to computer when you are using Microsoft's
operating system. Obviously, samba only runs on the linux server. Getting
samba is very easy: it usually comes with your distribution. Make certain
you are using at least version 2.05 or you will have all sorts of problems.
If you want to get the source code and compile it yourself, goto: <a href="http://www.samba.org">SAMBA.</a>&nbsp;
After samba is installed, you only have to do three things to start sharing
resources: edit samba's configuration file, set up the passwords, and then
configure windows to use a domain login.
<p><b>Configuration File</b>: samba is configured from the file: smb.conf.
It is located either at /etc/smb.conf or /usr/local/samba/lib/smb.conf.
It can do many things, but we will be concentrating on sharing the home
directory from your server.&nbsp; The smb.conf file has several sections,
with the section name enclosed by [ ]. The first section to edit is [global].
Here are the essential parameters:
<p><tt>[global]</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workgroup = KULAI</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; encrypt passwords =
Yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smb passwd file = /etc/smbpasswd</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; password level = 8</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; username level = 8</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; socket options = TCP_NODELAY</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain logons = Yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain master = yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; os level = 65</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; preferred master = Yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wins proxy =no</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wins support = yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hosts allow = 192.168.124.&nbsp;
127.</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon script = logon.bat</tt>
<p>Here is an explanation of the entries:
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<table BORDER WIDTH="90%" NOSAVE >
<tr>
<td><b>workgroup</b></td>

<td>use whatever workgroup name your windows computers use</td>
</tr>

<tr>
<td><b>encrypted passwords</b></td>

<td>if you are using win98, you need this. See below how to use it</td>
</tr>

<tr>
<td><b>smb passwd file</b></td>

<td>location of the encrypted passwords</td>
</tr>

<tr>
<td><b>password and username level</b></td>

<td>level 8 means: case insensitive for name and password</td>
</tr>

<tr>
<td><b>socket options</b>:</td>

<td>this value speeds up the network connection</td>
</tr>

<tr>
<td><b>domain logons</b></td>

<td>this is the key! See below</td>
</tr>

<tr>
<td><b>domain master</b></td>

<td>for home use there is only one master!</td>
</tr>

<tr>
<td><b>os level</b></td>

<td>the higher the better, but 65 is fine</td>
</tr>

<tr>
<td><b>preferred master</b></td>

<td>necessary for sharing directories</td>
</tr>

<tr>
<td><b>wins proxy</b></td>

<td>we are not proxying anything</td>
</tr>

<tr NOSAVE>
<td WIDTH="30%" NOSAVE><b>wins support</b></td>

<td>needed to share directories</td>
</tr>

<tr>
<td><b>logon script</b></td>

<td>name of the file the window computers will execute on login. Not necessary,
but could be nice. NOTE: this must be a DOS -not unix- formated file! Carrage
returns are mandatory!</td>
</tr>
</table>

<p>What this [global] section does: samba will now become a domain master,
which means that your samba server will act as a login manager and will
store personal files and settings. Windows users will now logon to your
samba domain instead of just the computer they are at. The directory c:\windows\profiles\user
will be copied to the samba server when the window user logs off, and copied
from the samba server to the window's computer when a user logs on. And
it works no matter which computer you login to, so your files in My Documents,
your start button menu,&nbsp; and your favorites follow you to whatever
computer your at. As an example, a listing of /home/jpollman/profile on
the linux server gives:
<p><tt><font size=-1>Application Data/&nbsp; Favorites/&nbsp;&nbsp;&nbsp;&nbsp;
NetHood/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start Menu/</font></tt>
<br><tt><font size=-1>Cookies/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
History/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Temporary Internet Files/&nbsp;&nbsp;&nbsp;
Desktop/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My
Documents/&nbsp; Recent/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USER.DAT</font></tt>
<p>Another nice feature of this is that these same files are available
to you when you are in Linux since they are in your home directory. The
other sections from the smb.conf that need attention:
<p><tt>[homes]</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; comment = Home Directories</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; read only = No</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browseable = No</tt>
<p><b>browseable=no</b> means that the only home directory that will show
up in network neighborhood is your own.
<p><tt>[netlogon]</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; comment = Network Logon
Service</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path = /usr/local/samba/netlogon</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public = no</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writeable = no</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browseable = no</tt>
<p><b>path</b> gives the location of the logon.bat listed in the [global]
section.
<p><tt>[Profiles]</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path = /home/%U/profile</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guest ok = Yes</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browseable = No</tt>
<p><b>path</b> this will give each user his/her own data. %U=user
<p>After you have saved the smb.conf file, you can have samba test your
file to make sure there are no obvious errors by running the program: testparm.
If it checks out ok, start samba by running:
<blockquote>smbd -D [enter]
<br>nmbd -D [enter]</blockquote>
The samba package comes with many other programs and can do many other
things - read the man pages and samba's web pages. Our goal here is just
to get the domain working so you can have your window's "home" directory
follow you to whatever computer you are on.
<p><b>Passwords:</b> Unfortunately samba does not use the unix passwords,
so you have to create the smbpasswd file. Starting with Win98, Microsoft
uses encrypted passwords - which is a good thing, but requires a little
extra work to set up samba. You could edit the windows registry to use
unencrypted passwords, but since samba can handle encrypted passwords,
why not let samba handle it. Samba comes with a program that will convert
the unix user's passwords to samba, but we find it adds alot of "users"
that we do not want having smb permissions.&nbsp; To make the smbpasswd
file manually is pretty easy for the home user, and we recommend it.&nbsp;
Note: each windows user you want to share their "home" directory must be
a user on the linux server first (adduser).&nbsp; To create the smbpasswd
file for a windows user, say for bmote:
<p>&nbsp;&nbsp;&nbsp; smbpasswd -a bmote [enter]
<p>answer the password questions, then
<p>&nbsp;&nbsp;&nbsp; smbpasswd -e bmote [enter]
<p>to enable the user. Do this for each user. Restart smbd and nmbd and
you are done with the Linux side of the house.
<p><b>MS Windows configuration</b>:
<br>1. goto Control Panel -&gt; Passwords. On the top tab, click on User Profiles.
You want to click on the second choice "Users can customize ...." and then
you can select either, or both, of the two bottom choices. Then click on
the OK button.
<br>2. goto Control Panel -&gt; Network. We assume you have tcp/ip setup.
Click on "Client for Microsoft Networks" to highlight it, and then click
on Properties. Check the box: "Log on to Windows NT domain..." and use
your workgroup name from the smb.comf for your domain. We suggest you choose
the Quick log on button below that until you have everything functioning.&nbsp;
Click on the OK button. You do not need the netbeui protocol - in fact
it will actually slow your network down, but you will need to have the
Netbios over TCP/IP checked in the TCP/IP properties (if you do not have
netbeui, it will be checked by default.)
<br>3. After you close out Control Panel, you will have to insert the Windows
install cdrom, and, surprise surprise, reboot.
<br>4. The next time you start up windows your login screen with have three
entries: User Name, Password, and Domain.
<br>&nbsp;
<br>&nbsp;
</body>
</html>