1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7 <chapter id="AdvancedNetworkManagement">
10 <pubdate>April 3 2003</pubdate>
13 <title>Advanced Network Management</title>
16 This section documents peripheral issues that are of great importance to network
17 administrators who want to improve network resource access control, to automate the user
18 environment and to make their lives a little easier.
22 <title>Features and Benefits</title>
25 Often the difference between a working network environment and a well appreciated one can
26 best be measured by the <emphasis>little things</emphasis> that make everything work more
27 harmoniously. A key part of every network environment solution is the
29 manage MS Windows workstations, remotely access the Samba server, provide customized
30 logon scripts, as well as other housekeeping activities that help to sustain more reliable
35 This chapter presents information on each of these areas. They are placed here, and not in
36 other chapters, for ease of reference.
42 <title>Remote Server Administration</title>
45 <para><quote>How do I get `User Manager' and `Server Manager'?</quote></para>
48 <indexterm><primary>User Manager</primary></indexterm>
49 <indexterm><primary>Server Manager</primary></indexterm>
50 <indexterm><primary>Event Viewer</primary></indexterm>
51 Since I do not need to buy an <application>NT4 Server</application>, how do I get the `User Manager for Domains'
52 and the `Server Manager'?
56 <indexterm><primary>Nexus.exe</primary></indexterm>
57 Microsoft distributes a version of these tools called <filename>Nexus.exe</filename> for installation
58 on <application>Windows 9x/Me</application> systems. The tools set includes:
62 <listitem>Server Manager</listitem>
63 <listitem>User Manager for Domains</listitem>
64 <listitem>Event Viewer</listitem>
68 Download the archived file at <ulink noescape="1" url="ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE">ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE.</ulink>
72 <indexterm><primary>SRVTOOLS.EXE</primary></indexterm>
73 The <application>Windows NT 4.0</application> version of the `User Manager for
74 Domains' and `Server Manager' are available from Microsoft <ulink url="ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE">via ftp</ulink>.
80 <title>Remote Desktop Management</title>
83 There are a number of possible remote desktop management solutions that range from free
84 through costly. Do not let that put you off. Sometimes the most costly solution is the
85 most cost effective. In any case, you will need to draw your own conclusions as to which
86 is the best tool in your network environment.
90 <title>Remote Management from NoMachine.Com</title>
93 <indexterm><primary>NoMachine.Com</primary></indexterm>
94 The following information was posted to the Samba mailing list at Apr 3 23:33:50 GMT 2003.
95 It is presented in slightly edited form (with author details omitted for privacy reasons).
96 The entire answer is reproduced below with some comments removed.
100 I have a wonderful Linux/Samba server running as pdc for a network. Now I would like to add remote
101 desktop capabilities so users outside could login to the system and get their desktop up from home or
106 Is there a way to accomplish this? Do I need a Windows Terminal Server? Do I need to configure it so
107 it is a member of the domain or a BDC,PDC? Are there any hacks for MS Windows XP to enable remote login
108 even if the computer is in a domain?
112 Answer provided: Check out the new offer of <quote>NX</quote> software from
113 <ulink noescape="1" url="http://www.nomachine.com/">NoMachine</ulink>.
117 It implements an easy-to-use interface to the Remote X protocol as
118 well as incorporating VNC/RFB and rdesktop/RDP into it, but at a speed
119 performance much better than anything you may have ever seen.
123 Remote X is not new at all, but what they did achieve successfully is
124 a new way of compression and caching technologies that makes the thing
125 fast enough to run even over slow modem/ISDN connections.
129 I could test drive their (public) Red Hat machine in Italy, over a loaded
130 Internet connection, with enabled thumbnail previews in KDE konqueror
131 which popped up immediately on <quote>mouse-over</quote>. From inside that (remote X)
132 session I started a rdesktop session on another, a Windows XP machine.
133 To test the performance, I played Pinball. I am proud to announce
134 that my score was 631750 points at first try.
138 NX performs better on my local LAN than any of the other <quote>pure</quote>
139 connection methods I am using from time to time: TightVNC, rdesktop or
140 Remote X. It is even faster than a direct crosslink connection between
145 I even got sound playing from the Remote X app to my local boxes, and
146 had a working <quote>copy'n'paste</quote> from an NX window (running a KDE session
147 in Italy) to my Mozilla mailing agent. These guys are certainly doing
152 I recommend to test drive NX to anybody with a only a passing interest in remote computing
153 <ulink noescape="1" url="http://www.nomachine.com/testdrive.php">http://www.nomachine.com/testdrive.php</ulink>.
157 Just download the free of charge client software (available for Red Hat,
158 SuSE, Debian and Windows) and be up and running within five minutes (they
159 need to send you your account data, though, because you are assigned
160 a real UNIX account on their testdrive.nomachine.com box.
164 They plan to get to the point were you can have NX application servers
165 running as a cluster of nodes, and users simply start an NX session locally,
166 and can select applications to run transparently (apps may even run on
167 another NX node, but pretend to be on the same as used for initial login,
168 because it displays in the same window. You also can run it
169 full-screen, and after a short time you forget that it is a remote session
174 Now the best thing for last: All the core compression and caching
175 technologies are released under the GPL and available as source code
176 to anybody who wants to build on it! These technologies are working,
177 albeit started from the command line only (and very inconvenient to
178 use in order to get a fully running remote X session up and running.)
182 To answer your questions:
187 You do not need to install a terminal server; XP has RDP support built in.
191 NX is much cheaper than Citrix &smbmdash; and comparable in performance, probably faster.
195 You do not need to hack XP &smbmdash; it just works.
199 You log into the XP box from remote transparently (and I think there is no
200 need to change anything to get a connection, even if authentication is against a domain).
204 The NX core technologies are all Open Source and released under the GPL &smbmdash;
205 you can now use a (very inconvenient) command-line at no cost,
206 but you can buy a comfortable (proprietary) NX GUI front end for money.
210 NoMachine are encouraging and offering help to OSS/Free Software implementations
211 for such a front end too, even if it means competition to them (they have written
212 to this effect even to the LTSP, KDE and GNOME developer mailing lists).
221 <title>Network Logon Script Magic</title>
224 There are several opportunities for creating a custom network startup configuration environment.
228 <listitem>No Logon Script.</listitem>
229 <listitem>Simple universal Logon Script that applies to all users.</listitem>
230 <listitem>Use of a conditional Logon Script that applies per user or per group attributes.</listitem>
231 <listitem>Use of Samba's preexec and postexec functions on access to the NETLOGON share to create
232 a custom logon script and then execute it.</listitem>
233 <listitem>User of a tool such as KixStart.</listitem>
237 The Samba source code tree includes two logon script generation/execution tools.
238 See <filename>examples</filename> directory <filename>genlogon</filename> and
239 <filename>ntlogon</filename> subdirectories.
243 The following listings are from the genlogon directory.
248 <indexterm><primary>genlogon.pl</primary></indexterm>
249 This is the <filename>genlogon.pl</filename> file:
251 <smbfile name="genlogon.pl">
257 # Perl script to generate user logon scripts on the fly, when users
258 # connect from a Windows client. This script should be called from
259 # smb.conf with the %U, %G and %L parameters. I.e:
261 # root preexec = genlogon.pl %U %G %L
263 # The script generated will perform
266 # 1. Log the user connection to /var/log/samba/netlogon.log
267 # 2. Set the PC's time to the Linux server time (which is maintained
268 # daily to the National Institute of Standards Atomic clock on the
270 # 3. Connect the user's home drive to H: (H for Home).
271 # 4. Connect common drives that everyone uses.
272 # 5. Connect group-specific drives for certain user groups.
273 # 6. Connect user-specific drives for certain users.
274 # 7. Connect network printers.
276 # Log client connection
277 #($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
278 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
279 open LOG, ">>/var/log/samba/netlogon.log";
280 print LOG "$mon/$mday/$year $hour:$min:$sec";
281 print LOG " - User $ARGV[0] logged into $ARGV[1]\n";
284 # Start generating logon script
285 open LOGON, ">/shared/netlogon/$ARGV[0].bat";
286 print LOGON "\@ECHO OFF\r\n";
288 # Connect shares just use by Software Development group
289 if ($ARGV[1] eq "SOFTDEV" || $ARGV[0] eq "softdev")
291 print LOGON "NET USE M: \\\\$ARGV[2]\\SOURCE\r\n";
294 # Connect shares just use by Technical Support staff
295 if ($ARGV[1] eq "SUPPORT" || $ARGV[0] eq "support")
297 print LOGON "NET USE S: \\\\$ARGV[2]\\SUPPORT\r\n";
300 # Connect shares just used by Administration staff
301 If ($ARGV[1] eq "ADMIN" || $ARGV[0] eq "admin")
303 print LOGON "NET USE L: \\\\$ARGV[2]\\ADMIN\r\n";
304 print LOGON "NET USE K: \\\\$ARGV[2]\\MKTING\r\n";
307 # Now connect Printers. We handle just two or three users a little
308 # differently, because they are the exceptions that have desktop
309 # printers on LPT1: - all other user's go to the LaserJet on the
311 if ($ARGV[0] eq 'jim'
312 || $ARGV[0] eq 'yvonne')
314 print LOGON "NET USE LPT2: \\\\$ARGV[2]\\LJET3\r\n";
315 print LOGON "NET USE LPT3: \\\\$ARGV[2]\\FAXQ\r\n";
319 print LOGON "NET USE LPT1: \\\\$ARGV[2]\\LJET3\r\n";
320 print LOGON "NET USE LPT3: \\\\$ARGV[2]\\FAXQ\r\n";
323 # All done! Close the output file.
330 Those wishing to use more elaborate or capable logon processing system should check out these sites:
334 <listitem><ulink noescape="1" url="http://www.craigelachie.org/rhacer/ntlogon">http://www.craigelachie.org/rhacer/ntlogon</ulink></listitem>
335 <listitem><ulink noescape="1" url="http://www.kixtart.org">http://www.kixtart.org</ulink></listitem>
339 <title>Adding Printers without User Intervention</title>
343 <indexterm><primary>rundll32</primary></indexterm>
344 Printers may be added automatically during logon script processing through the use of:
347 &dosprompt;<userinput>rundll32 printui.dll,PrintUIEntry /?</userinput>
350 See the documentation in the <ulink url="http://support.microsoft.com/default.asp?scid=kb;en-us;189105">Microsoft knowledgebase article 189105.</ulink>