Re: Disable auto login of network share?
- From: rumplestiltskin <exapplerep@xxxxxxxxx>
- Date: Sun, 11 Jul 2010 12:30:34 -0700 (PDT)
On Jul 11, 11:54 am, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
"rumplestiltskin" <exapple...@xxxxxxxxx> wrote in message
news:fa46ef5b-87e0-46c0-93fb-b1078c3ecaa4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 11, 8:59 am, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
"rumplestiltskin" <exapple...@xxxxxxxxx> wrote in message
news:819e5a76-b4fe-41f2-a216-77b4cac6cb39@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to be really clear about this problem because I've seen the
same question posted elsewhere with 50 answers that have nothing to do
with the question.
I am running a server that has a shared "users" folder. When a user
(on an XP Pro machine) logs into the share, the user is asked his/her
username and password. This is perfect. However, that username and
password are stored until the user logs out or restarts the PC. As I
have many users of that PC (it's in a classroom), I do NOT want the
username and password stored when the user closes the window into that
server share. The next user who wants to use that share should be able
to enter his/her username and password WITHOUT having to logout of the
PC or restart it.
On Mac clients, this is not a problem as there is a "disconnect"
button that accomplishes this instantly. How do I make Windows forget
the username and password as soon as the share window is closed?
Thanks.
The general answer is: Put the following commands into the logon script
(or
type them manually):
net use /persistent:no
net use * /del /yes
Please note:
- Both commands are required just once but can be executed any number of
times.
- The settings are specific to each Windows logon account.
Pegasus,
Okay; your two commands seem to be the basis of what I need to do but
it looks like it needs to be a batch file. I used Notepad, typed in
those two lines, and saved the file as "logoff.bat". Then, when I
double-clicked the file, you could see the Cmd window appear (and I
think there's a command to make this appearance not happen, IIRC) and
the next time someone tries to access that network share, the
connection dialog appears. So this works.
Is there a way to add in one more iine of code to initiate the login
again? What I mean by that is if some form of the "net use" command
would, in essence, double-click on that network share and bring up the
login dialog? I'll play with this but suggestions are welcomed.
Thanks.
There sure is. Here is your complete batch file:
@echo off
net use S: \\ServerName\ShareName
Remember - the other two commands are not required after you have run them
once.
Before I saw your reply, I came up with this:
@echo off
net use * /del /yes
net use /persistent:no
echo Just hit Enter key twice to cancel login.
set /p user=User name:
net use x: \\192.168.1.2\Users * "/user:%user%"
Are you saying that the first two "net use" commands in my batch file
aren't necessary after they've been run once? Is that "per
session" (from the time the machine starts up until it's turned off)?
Or are they not necessary ever again after they've been run once?
Wouldn't I have to use the "del" line after one user is finished with
the share and the next user wanted to log in? They both have the same
share but all users can get to that folder; it's the individual users'
folders that reside inside the share and I assume that is why I need
to unmount and then remount. It looks like if I don't procedurally
unmount the share, it remains shared until I use the batch file to
unmount it (them, if there are a number of mounts). Am I making sense
here?
Thanks.
.
- Follow-Ups:
- Re: Disable auto login of network share?
- From: Pegasus [MVP]
- Re: Disable auto login of network share?
- References:
- Disable auto login of network share?
- From: rumplestiltskin
- Re: Disable auto login of network share?
- From: Pegasus [MVP]
- Re: Disable auto login of network share?
- From: rumplestiltskin
- Re: Disable auto login of network share?
- From: Pegasus [MVP]
- Disable auto login of network share?
- Prev by Date: Re: Vanishing Newsgroups
- Next by Date: Re: Vanishing Newsgroups
- Previous by thread: Re: Disable auto login of network share?
- Next by thread: Re: Disable auto login of network share?
- Index(es):
Relevant Pages
|