|
| ||||||||||
| Tags: add, login, logincmd, password, script |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| to add username & password into my login.cmd - login script
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. |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| 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 > |
|
#4
| |||
| |||
| 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 >> > |
|
#5
| |||
| |||
| 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 |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |