get rid of CFLAGS from LDSHFLAGS and WINBIND_NSS_LDSHFLAGS and instead
[Samba.git] / docs / htmldocs / AdvancedNetworkManagement.html
blob296c684e24037eb3cd5d55536dafba50cd0eef16
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 22. Advanced Network Management</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="winbind.html" title="Chapter 21. Integrated Logon Support using Winbind"><link rel="next" href="PolicyMgmt.html" title="Chapter 23. System and Account Policies"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Advanced Network Management</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="winbind.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="PolicyMgmt.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="AdvancedNetworkManagement"></a>Chapter 22. Advanced Network Management</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate">April 3 2003</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="AdvancedNetworkManagement.html#id2984570">Features and Benefits</a></dt><dt><a href="AdvancedNetworkManagement.html#id2984759">Remote Server Administration</a></dt><dt><a href="AdvancedNetworkManagement.html#id2984858">Remote Desktop Management</a></dt><dd><dl><dt><a href="AdvancedNetworkManagement.html#id2984876">Remote Management from NoMachines.Com</a></dt></dl></dd><dt><a href="AdvancedNetworkManagement.html#id2985087">Network Logon Script Magic</a></dt><dd><dl><dt><a href="AdvancedNetworkManagement.html#id2985283">Adding printers without user intervention</a></dt></dl></dd><dt><a href="AdvancedNetworkManagement.html#id2985316">Common Errors</a></dt></dl></div><p>
2 This section documents peripheral issues that are of great importance to network
3 administrators who want to improve network resource access control, to automate the user
4 environment, and to make their lives a little easier.
5 </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2984570"></a>Features and Benefits</h2></div></div><div></div></div><p>
6 Often the difference between a working network environment and a well appreciated one can
7 best be measured by the <span class="emphasis"><em>little things</em></span> that makes everything work more
8 harmoniously. A key part of every network environment solution is the ability to remotely
9 manage MS Windows workstations, to remotely access the Samba server, to provide customised
10 logon scripts, as well as other house keeping activities that help to sustain more reliable
11 network operations.
12 </p><p>
13 This chapter presents information on each of these area. They are placed here, and not in
14 other chapters, for ease of reference.
15 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2984759"></a>Remote Server Administration</h2></div></div><div></div></div><p>
16 <span class="emphasis"><em>How do I get 'User Manager' and 'Server Manager'?</em></span>
17 </p><p>
18 Since I don't need to buy an <span class="application">NT4 Server</span>, how do I get the 'User Manager for Domains',
19 the 'Server Manager'?
20 </p><p>
21 Microsoft distributes a version of these tools called nexus for installation
22 on <span class="application">Windows 9x / Me</span> systems. The tools set includes:
23 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>Server Manager</td></tr><tr><td>User Manager for Domains</td></tr><tr><td>Event Viewer</td></tr></table><p>
24 Click here to download the archived file <a href="ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE" target="_top">ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE</a>
25 </p><p>
26 The <span class="application">Windows NT 4.0</span> version of the 'User Manager for
27 Domains' and 'Server Manager' are available from Microsoft via ftp
28 from <a href="ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE" target="_top">ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE</a>
29 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2984858"></a>Remote Desktop Management</h2></div></div><div></div></div><p>
30 There are a number of possible remote desktop management solutions that range from free
31 through costly. Do not let that put you off. Sometimes the most costly solutions is the
32 most cost effective. In any case, you will need to draw your own conclusions as to which
33 is the best tool in your network environment.
34 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2984876"></a>Remote Management from NoMachines.Com</h3></div></div><div></div></div><p>
35 The following information was posted to the Samba mailing list at Apr 3 23:33:50 GMT 2003.
36 It is presented in slightly edited form (with author details omitted for privacy reasons).
37 The entire answer is reproduced below with some comments removed.
38 </p><p>
39 </p><pre class="screen">
40 &gt; I have a wonderful linux/samba server running as PDC for a network.
41 &gt; Now I would like to add remote desktop capabilities so that
42 &gt; users outside could login to the system and get their desktop up from
43 &gt; home or another country..
44 &gt;
45 &gt; Is there a way to accomplish this? Do I need a windows terminal server?
46 &gt; Do I need to configure it so that it is a member of the domain or a
47 &gt; BDC,PDC? Are there any hacks for MS Windows XP to enable remote login
48 &gt; even if the computer is in a domain?
49 &gt;
50 &gt; Any ideas/experience would be appreciated :)
51 </pre><p>
52 </p><p>
53 Answer provided: Check out the new offer from NoMachine, &quot;NX&quot; software:
54 <a href="http://www.nomachine.com/" target="_top">http://www.nomachine.com/</a>.
55 </p><p>
56 It implements a very easy-to-use interface to the remote X protocol as
57 well as incorporating VNC/RFB and rdesktop/RDP into it, but at a speed
58 performance much better than anything you may have ever seen...
59 </p><p>
60 Remote X is not new at all -- but what they did achieve successfully is
61 a new way of compression and caching technologies which makes the thing
62 fast enough to run even over slow modem/ISDN connections.
63 </p><p>
64 I could test drive their (public) RedHat machine in Italy, over a loaded
65 internet connection, with enabled thumbnail previews in KDE konqueror
66 which popped up immediately on &quot;mouse-over&quot;. From inside that (remote X)
67 session I started a rdesktop session on another, a Windows XP machine.
68 To test the performance, I played Pinball. I am proud to announce here
69 that my score was 631750 points at first try...
70 </p><p>
71 NX performs better on my local LAN than any of the other &quot;pure&quot;
72 connection methods I am using from time to time: TightVNC, rdesktop or
73 remote X. It is even faster than a direct crosslink connection between
74 two nodes.
75 </p><p>
76 I even got sound playing from the remote X app to my local boxes, and
77 had a working &quot;copy'n'paste&quot; from an NX window (running a KDE session
78 in Italy) to my Mozilla mailing agent... These guys are certainly doing
79 something right!
80 </p><p>
81 I recommend to test drive NX to anybody with a only a remote interest
82 in remote computing
83 <a href="http://www.nomachine.com/testdrive.php" target="_top">http://www.nomachine.com/testdrive.php</a>.
84 </p><p>
85 Just download the free of charge client software (available for RedHat,
86 SuSE, Debian and Windows) and be up and running within 5 minutes (they
87 need to send you your account data, though, because you are assigned
88 a real Unix account on their testdrive.nomachine.com box...
89 </p><p>
90 They plan to get to the point were you can have NX application servers
91 running as a cluster of nodes, and users simply start an NX session locally,
92 and can select applications to run transparently (apps may even run on
93 another NX node, but pretend to be on the same as used for initial login,
94 because it displays in the same window.... well, you also can run it
95 fullscreen, and after a short time you forget that it is a remote session
96 at all).
97 </p><p>
98 Now the best thing at the end: all the core compression and caching
99 technologies are released under the GPL and available as source code
100 to anybody who wants to build on it! These technologies are working,
101 albeit started from the command line only (and very inconvenient to
102 use in order to get a fully running remote X session up and running....)
103 </p><p>
104 To answer your questions:
105 </p><div class="itemizedlist"><ul type="disc"><li><p>
106 You don't need to install a terminal server; XP has RDP support built in.
107 </p></li><li><p>
108 NX is much cheaper than Citrix -- and comparable in performance, probably faster
109 </p></li><li><p>
110 You don't need to hack XP -- it just works
111 </p></li><li><p>
112 You log into the XP box from remote transparently (and I think there is no
113 need to change anything to get a connection, even if authentication is against a domain)
114 </p></li><li><p>
115 The NX core technologies are all Open Source and released under the GPL --
116 you can today use a (very inconvenient) commandline to use it at no cost,
117 but you can buy a comfortable (proprietary) NX GUI frontend for money
118 </p></li><li><p>
119 NoMachine are encouraging and offering help to OSS/Free Software implementations
120 for such a frontend too, even if it means competition to them (they have written
121 to this effect even to the LTSP, KDE and GNOME developer mailing lists)
122 </p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2985087"></a>Network Logon Script Magic</h2></div></div><div></div></div><p>
123 This section needs work. Volunteer contributions most welcome. Please send your patches or updates
124 to <a href="mailto:jht@samba.org" target="_top">John Terpstra</a>.
125 </p><p>
126 There are several opportunities for creating a custom network startup configuration environment.
127 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>No Logon Script</td></tr><tr><td>Simple universal Logon Script that applies to all users</td></tr><tr><td>Use of a conditional Logon Script that applies per user or per group attributes</td></tr><tr><td>Use of Samba's Preexec and Postexec functions on access to the NETLOGON share to create
128 a custom Logon Script and then execute it.</td></tr><tr><td>User of a tool such as KixStart</td></tr></table><p>
129 The Samba source code tree includes two logon script generation/execution tools.
130 See <tt class="filename">examples</tt> directory <tt class="filename">genlogon</tt> and
131 <tt class="filename">ntlogon</tt> subdirectories.
132 </p><p>
133 The following listings are from the genlogon directory.
134 </p><p>
135 This is the <tt class="filename">genlogon.pl</tt> file:
137 </p><pre class="programlisting">
138 #!/usr/bin/perl
140 # genlogon.pl
142 # Perl script to generate user logon scripts on the fly, when users
143 # connect from a Windows client. This script should be called from smb.conf
144 # with the %U, %G and %L parameters. I.e:
146 # root preexec = genlogon.pl %U %G %L
148 # The script generated will perform
149 # the following:
151 # 1. Log the user connection to /var/log/samba/netlogon.log
152 # 2. Set the PC's time to the Linux server time (which is maintained
153 # daily to the National Institute of Standard's Atomic clock on the
154 # internet.
155 # 3. Connect the user's home drive to H: (H for Home).
156 # 4. Connect common drives that everyone uses.
157 # 5. Connect group-specific drives for certain user groups.
158 # 6. Connect user-specific drives for certain users.
159 # 7. Connect network printers.
161 # Log client connection
162 #($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
163 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
164 open LOG, &quot;&gt;&gt;/var/log/samba/netlogon.log&quot;;
165 print LOG &quot;$mon/$mday/$year $hour:$min:$sec - User $ARGV[0] logged into $ARGV[1]\n&quot;;
166 close LOG;
168 # Start generating logon script
169 open LOGON, &quot;&gt;/shared/netlogon/$ARGV[0].bat&quot;;
170 print LOGON &quot;\@ECHO OFF\r\n&quot;;
172 # Connect shares just use by Software Development group
173 if ($ARGV[1] eq &quot;SOFTDEV&quot; || $ARGV[0] eq &quot;softdev&quot;)
175 print LOGON &quot;NET USE M: \\\\$ARGV[2]\\SOURCE\r\n&quot;;
178 # Connect shares just use by Technical Support staff
179 if ($ARGV[1] eq &quot;SUPPORT&quot; || $ARGV[0] eq &quot;support&quot;)
181 print LOGON &quot;NET USE S: \\\\$ARGV[2]\\SUPPORT\r\n&quot;;
184 # Connect shares just used by Administration staff
185 If ($ARGV[1] eq &quot;ADMIN&quot; || $ARGV[0] eq &quot;admin&quot;)
187 print LOGON &quot;NET USE L: \\\\$ARGV[2]\\ADMIN\r\n&quot;;
188 print LOGON &quot;NET USE K: \\\\$ARGV[2]\\MKTING\r\n&quot;;
191 # Now connect Printers. We handle just two or three users a little
192 # differently, because they are the exceptions that have desktop
193 # printers on LPT1: - all other user's go to the LaserJet on the
194 # server.
195 if ($ARGV[0] eq 'jim'
196 || $ARGV[0] eq 'yvonne')
198 print LOGON &quot;NET USE LPT2: \\\\$ARGV[2]\\LJET3\r\n&quot;;
199 print LOGON &quot;NET USE LPT3: \\\\$ARGV[2]\\FAXQ\r\n&quot;;
201 else
203 print LOGON &quot;NET USE LPT1: \\\\$ARGV[2]\\LJET3\r\n&quot;;
204 print LOGON &quot;NET USE LPT3: \\\\$ARGV[2]\\FAXQ\r\n&quot;;
207 # All done! Close the output file.
208 close LOGON;
209 </pre><p>
210 </p><p>
211 Those wishing to use more elaborate or capable logon processing system should check out the following sites:
212 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a href="http://www.craigelachie.org/rhacer/ntlogon" target="_top">http://www.craigelachie.org/rhacer/ntlogon</a></td></tr><tr><td><a href="http://www.kixtart.org" target="_top">http://www.kixtart.org</a></td></tr><tr><td><a href="http://support.microsoft.com/default.asp?scid=kb;en-us;189105" target="_top">http://support.microsoft.com/default.asp?scid=kb;en-us;189105</a></td></tr></table><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2985283"></a>Adding printers without user intervention</h3></div></div><div></div></div><p>
213 Printers may be added automatically during logon script processing through the use of:
215 </p><pre class="programlisting">
216 rundll32 printui.dll,PrintUIEntry /?
217 </pre><p>
219 See the documentation in the <a href="http://support.microsoft.com/default.asp?scid=kb;en-us;189105" target="_top">Microsoft knowledgebase article no: 189105</a>.
220 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2985316"></a>Common Errors</h2></div></div><div></div></div><p>
221 The information provided in this chapter has been reproduced from postings on the samba@samba.org
222 mailing list. No implied endorsement or recommendation is offered. Administrators should conduct
223 their own evaluation of alternatives and are encouraged to draw their own conclusions.
224 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="winbind.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="PolicyMgmt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. Integrated Logon Support using Winbind </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. System and Account Policies</td></tr></table></div></body></html>