P. 1
Samba

Samba

|Views: 167|Likes:
Publicado porNurul Istiqomah

More info:

Published by: Nurul Istiqomah on Dec 14, 2010
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/21/2014

pdf

text

original

Once you’resure your test user accounts can access all the shared resources on your
Samba server with the correct permissions and ownership,you should test automatically
connecting local devices to the shares using an NT logon script.

Reviewing the Existing Logon Script

First,you need to look for an existing logon script for a user,which is stored in the

netlogonshare of the PDC. The script accounts.batis for members of the accounts
department:

net use g: \\nt4srv_1\accounts /persistent:no /yes
net use p: \\nt4srv_1\public /persistent:no /yes
net use lpt1: \\nt4srv_1\printer1 /persistent:no /yes

You can see from this example that you only need to change the entries for the server

NT4SRV_1to the new PERSEUS.

Creating a New Script

So as not to cause problems,make sure you don’t make modifications to the existing
logon script,because this will cause you and your users serious problems. Make a copy
of the existing logon script before editing and name it something obvious
(accounts_samba.bat,for example).

Persistent connections (where the user has mapped a network drive and specified it to be
restored upon every logon) are sometimes a problem,and it may prove prudent to insert
thenet delcommand at the beginning of the script to disconnect before attempting to

Enterprise Samba

PARTIII

736

29 8628 CH25 3/17/00 1:14 PM Page 736

connect to your Samba server. Another good idea is to append a pausestatement to the
logon script so that you have a chance to view the results from running it.

The contents of the modified logon script to connect to the Samba server PERSEUSare as
follows:

net use p: /del
net use lpt1: /del
net use g: \\perseus\accounts /persistent:no /yes
net use p: \\perseus\public /persistent:no /yes
net use lpt1: \\perseus\printer1 /persistent:no /yes
pause

Changing Settings in User Manager

Use User Manager for Domains to modify the logon script for the user to the one you’ve
just created. You may also need to modify the Home Directory entry to map a default
drive to the new homesshare for the user. Figure 25.5 shows the new user profile settings
for user username1in User Manager.

Replacing an NTFile Server with Samba

CHAPTER25

737

25

R

E
P
L
A
C
I
N
G
A
N

N
T

F

I
L
E

S

E
R
V
E
R
W
I
T
H

S

A
M
B
A

FIGURE25.5

A user profile for
a Samba user.

Testing the Logon

If you’re already logged in as the test user,log out from the workstation. Now log on as
your test user,and the new modified logon script should run. Figure 25.6 shows the
results of the script running.

FIGURE25.6

The modified
logon script.

29 8628 CH25 3/17/00 1:14 PM Page 737

Now you can browse your connected drives by using My Computer. To get more
information,you can use the net usecommand from the command prompt:

Z:\>net use
New connections will not be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK G: \\perseus\accounts Microsoft Windows Network
OK P: \\perseus\public Microsoft Windows Network
OK Z: \\perseus\username1 Microsoft Windows Network
OK LPT1 \\perseus\printer1 Microsoft Windows Network
OK \\NT4SRV_1\IPC$ Microsoft Windows Network
The command completed successfully.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->