Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



to add username & password into my login.cmd - login script

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-02-2008
sphilip
 
Posts: n/a
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.

Reply With Quote
  #2  
Old 27-02-2008
Pegasus \(MVP\)
 
Posts: n/a
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


Reply With Quote
  #3  
Old 29-02-2008
Zanten, Ben van
 
Posts: n/a
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
>


Reply With Quote
  #4  
Old 29-02-2008
Pegasus \(MVP\)
 
Posts: n/a
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
>>

>



Reply With Quote
  #5  
Old 05-03-2008
Al Dunbar
 
Posts: n/a
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


Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "to add username & password into my login.cmd - login script"
Thread Thread Starter Forum Replies Last Post
username, password, and domain field at login screen in windows xp Dolla Operating Systems 3 05-08-2010 01:46 PM
Windows 7 does not save network login credentials (username and password) Bao Operating Systems 7 18-06-2010 12:05 AM
Login and password Text boxes disabled during remote login in windows 7 Cassey Networking & Security 4 20-01-2010 08:53 PM
Wrong password or username in Ubuntu during login Benjamin Operating Systems 3 19-10-2009 05:43 PM
Windows Login password fails. Can switch user without getting login screen and bypass password !?!?!? Gaffigana Windows XP Support 1 28-04-2007 08:57 PM


All times are GMT +5.5. The time now is 05:48 PM.