to add username & password into my login.cmd - login script
@echo off
REM filename: logon.cmd
echo Hello %username%
echo You are now logged into %computername%
echo Now setting up your computer for network access.
echo Connecting Network Drive
net use q: /DELETE
net use q: \\MUDONSTRGSRV\mace /PERSISTENT:YES
net use f: /DELETE
net use f: \\MUDONSTRGSRV\ftp /PERSISTENT:YES
echo Done.
The above is a logon script that we r using in our network. Please can
someone give me an idea on how to add user access rights into this script.
When we run this script it keeps asking for username & password. Is there a
way I can add the username & password in this script itself so that users (
workgroup ) can do without entering username & password.
Thank You.
Re: to add username & password into my login.cmd - login script
"sphilip" <sphilip@discussions.microsoft.com> wrote in message
news:AD10AE2D-67A9-443A-B017-E675EADEC0F8@microsoft.com...
> @echo off
> REM filename: logon.cmd
> echo Hello %username%
> echo You are now logged into %computername%
> echo Now setting up your computer for network access.
>
> echo Connecting Network Drive
> net use q: /DELETE
> net use q: \\MUDONSTRGSRV\mace /PERSISTENT:YES
> net use f: /DELETE
> net use f: \\MUDONSTRGSRV\ftp /PERSISTENT:YES
> echo Done.
>
>
> The above is a logon script that we r using in our network. Please can
> someone give me an idea on how to add user access rights into this script.
>
> When we run this script it keeps asking for username & password. Is there
> a
> way I can add the username & password in this script itself so that users
> (
> workgroup ) can do without entering username & password.
>
> Thank You.
Make sure that the user's account/password is defined on \\Mudonstrgsrv
so that your users don't get challenged for their identity.
A user cannot grant himself access rights, unless he is an
administrator. If he could, what would be the purpose of
access restrictions?
If you use a logon script to map your shares then you don't
need persistency. Having it on is counterproductive. Code
it like so instead:
net use X: \\server\share /persisten:no
Re: to add username & password into my login.cmd - login script
it is not secure to store usernames and passwords in a script. everyone can
see it.
it would be best in your workgroup situation to have the usernames and
passwords identical on all machines. this is a headache, but that's why you
should use a domain.
if you setup user accounts on the workstations and your server with
identical usernames and passwords, no credentials are asked.
if, however you STILL want to do it, use the syntax:
net use f: \\mudonstrgsrv\ftp UserName1 P@ssword1
where UserName1 and P@ssword1 are the username and password respectively.
now the script won't ask for credentials anymore, but as said before, it is
not secure and surely not recommended. there are better ways..
Ben van Zanten
"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:eICaU$SeIHA.4880@TK2MSFTNGP03.phx.gbl...
>
> "sphilip" <sphilip@discussions.microsoft.com> wrote in message
> news:AD10AE2D-67A9-443A-B017-E675EADEC0F8@microsoft.com...
>> @echo off
>> REM filename: logon.cmd
>> echo Hello %username%
>> echo You are now logged into %computername%
>> echo Now setting up your computer for network access.
>>
>> echo Connecting Network Drive
>> net use q: /DELETE
>> net use q: \\MUDONSTRGSRV\mace /PERSISTENT:YES
>> net use f: /DELETE
>> net use f: \\MUDONSTRGSRV\ftp /PERSISTENT:YES
>> echo Done.
>>
>>
>> The above is a logon script that we r using in our network. Please can
>> someone give me an idea on how to add user access rights into this
>> script.
>>
>> When we run this script it keeps asking for username & password. Is there
>> a
>> way I can add the username & password in this script itself so that users
>> (
>> workgroup ) can do without entering username & password.
>>
>> Thank You.
>
> Make sure that the user's account/password is defined on \\Mudonstrgsrv
> so that your users don't get challenged for their identity.
>
> A user cannot grant himself access rights, unless he is an
> administrator. If he could, what would be the purpose of
> access restrictions?
>
> If you use a logon script to map your shares then you don't
> need persistency. Having it on is counterproductive. Code
> it like so instead:
>
> net use X: \\server\share /persisten:no
>
Re: to add username & password into my login.cmd - login script
Please try to reply to the OP in future threads, unless you're
referring to my own response.
"Zanten, Ben van" <Ben.vanZanten@getronics.com> wrote in message
news:E81744B6-6DAA-4ACF-9E4B-A6DE8B32FFA1@microsoft.com...
> it is not secure to store usernames and passwords in a script. everyone
> can see it.
>
> it would be best in your workgroup situation to have the usernames and
> passwords identical on all machines. this is a headache, but that's why
> you should use a domain.
> if you setup user accounts on the workstations and your server with
> identical usernames and passwords, no credentials are asked.
>
> if, however you STILL want to do it, use the syntax:
> net use f: \\mudonstrgsrv\ftp UserName1 P@ssword1
> where UserName1 and P@ssword1 are the username and password respectively.
> now the script won't ask for credentials anymore, but as said before, it
> is not secure and surely not recommended. there are better ways..
>
> Ben van Zanten
>
>
> "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
> news:eICaU$SeIHA.4880@TK2MSFTNGP03.phx.gbl...
>>
>> "sphilip" <sphilip@discussions.microsoft.com> wrote in message
>> news:AD10AE2D-67A9-443A-B017-E675EADEC0F8@microsoft.com...
>>> @echo off
>>> REM filename: logon.cmd
>>> echo Hello %username%
>>> echo You are now logged into %computername%
>>> echo Now setting up your computer for network access.
>>>
>>> echo Connecting Network Drive
>>> net use q: /DELETE
>>> net use q: \\MUDONSTRGSRV\mace /PERSISTENT:YES
>>> net use f: /DELETE
>>> net use f: \\MUDONSTRGSRV\ftp /PERSISTENT:YES
>>> echo Done.
>>>
>>>
>>> The above is a logon script that we r using in our network. Please can
>>> someone give me an idea on how to add user access rights into this
>>> script.
>>>
>>> When we run this script it keeps asking for username & password. Is
>>> there a
>>> way I can add the username & password in this script itself so that
>>> users (
>>> workgroup ) can do without entering username & password.
>>>
>>> Thank You.
>>
>> Make sure that the user's account/password is defined on \\Mudonstrgsrv
>> so that your users don't get challenged for their identity.
>>
>> A user cannot grant himself access rights, unless he is an
>> administrator. If he could, what would be the purpose of
>> access restrictions?
>>
>> If you use a logon script to map your shares then you don't
>> need persistency. Having it on is counterproductive. Code
>> it like so instead:
>>
>> net use X: \\server\share /persisten:no
>>
>
Re: to add username & password into my login.cmd - login script
"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:eICaU$SeIHA.4880@TK2MSFTNGP03.phx.gbl...
>
> "sphilip" <sphilip@discussions.microsoft.com> wrote in message
> news:AD10AE2D-67A9-443A-B017-E675EADEC0F8@microsoft.com...
>> @echo off
>> REM filename: logon.cmd
>> echo Hello %username%
>> echo You are now logged into %computername%
>> echo Now setting up your computer for network access.
>>
>> echo Connecting Network Drive
>> net use q: /DELETE
>> net use q: \\MUDONSTRGSRV\mace /PERSISTENT:YES
>> net use f: /DELETE
>> net use f: \\MUDONSTRGSRV\ftp /PERSISTENT:YES
>> echo Done.
>>
>>
>> The above is a logon script that we r using in our network. Please can
>> someone give me an idea on how to add user access rights into this
>> script.
>>
>> When we run this script it keeps asking for username & password. Is there
>> a
>> way I can add the username & password in this script itself so that users
>> (
>> workgroup ) can do without entering username & password.
>>
>> Thank You.
>
> Make sure that the user's account/password is defined on \\Mudonstrgsrv
> so that your users don't get challenged for their identity.
Or, if this is a domain environment, make sure that the shares and
underlying folders are permitted such that they will be accessable to all
those who need the access.
/Al