"net use" batch file to logoff Samba? - SMB

This is a discussion on "net use" batch file to logoff Samba? - SMB ; Our environment is probably a little different than most, in that we are using Samba as a fileserver in a university computer lab environment. Windows clients are Win2K and XP boxes and they are set up in a sort of ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: "net use" batch file to logoff Samba?

  1. "net use" batch file to logoff Samba?

    Our environment is probably a little different than most, in that we
    are using Samba as a fileserver in a university computer lab
    environment. Windows clients are Win2K and XP boxes and they are set
    up in a sort of "kiosk/public terminal" mode for student access in the
    labs - students don't login to get to the desktop or use the internet,
    they can simply sit down and begin using the pc. To access their
    samba directory, we have set up an icon on the desktops with the UNC
    path to the Samba server, which, when clicked. does prompt them for a
    username and password, and accessing it this way works great.

    The problem is disconnecting the client from the Samba server after
    the student is finished. We would prefer the students NOT have to
    start/run/logout as they leave the workstations - doing so means we
    have to run around constantly logging the machines back in. What we
    want is an icon on the destop that, when clicked, disconnects the
    Samba share. Thought I had the answer with a "net use" batch file on
    the desktop (net use * /del) but this is where things get weird. When
    I run the net use * /del command, I get a message at the command line
    that says all connections have been terminated. If I run "net use" at
    the command line, I also get the same message about connections. BUT
    - if I double click the icon for the Samba server, I am immediately
    taken back to my share without being prompted for a username/password!
    It should prompt me for username and password, but intstead appears to
    be caching the connection somehow.

    So, in a nutshell - we're looking for a way for our students to
    immediately diconnect from samba without having to do a
    start/shutdown/logoff, so that the next student who sits down at the
    pc is prompted for a username and password.

    Any ideas? Thanks,
    Dave

  2. Re: "net use" batch file to logoff Samba?

    D. Fox wrote:

    ...
    > The problem is disconnecting the client from the Samba server after
    > the student is finished. We would prefer the students NOT have to
    > start/run/logout as they leave the workstations - doing so means we
    > have to run around constantly logging the machines back in. What we
    > want is an icon on the destop that, when clicked, disconnects the
    > Samba share. Thought I had the answer with a "net use" batch file on
    > the desktop (net use * /del) but this is where things get weird. When
    > I run the net use * /del command, I get a message at the command line
    > that says all connections have been terminated. If I run "net use" at
    > the command line, I also get the same message about connections. BUT
    > - if I double click the icon for the Samba server, I am immediately
    > taken back to my share without being prompted for a username/password!
    > It should prompt me for username and password, but intstead appears to
    > be caching the connection somehow.
    >
    > So, in a nutshell - we're looking for a way for our students to
    > immediately diconnect from samba without having to do a
    > start/shutdown/logoff, so that the next student who sits down at the
    > pc is prompted for a username and password.
    >

    try
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\
    Network\DisablePwdCaching = 1
    (though I found it documented only for win9x ...).


+ Reply to Thread