Results 1 to 5 of 5

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

  1. #1
    sphilip Guest

    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.

  2. #2
    Pegasus \(MVP\) Guest

    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. #3
    Zanten, Ben van Guest

    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. #4
    Pegasus \(MVP\) Guest

    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. #5
    Al Dunbar Guest

    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



Similar Threads

  1. Replies: 3
    Last Post: 05-08-2010, 01:46 PM
  2. Replies: 7
    Last Post: 18-06-2010, 12:05 AM
  3. Replies: 4
    Last Post: 20-01-2010, 09:53 PM
  4. Wrong password or username in Ubuntu during login
    By Benjamin in forum Operating Systems
    Replies: 3
    Last Post: 19-10-2009, 05:43 PM
  5. Replies: 1
    Last Post: 28-04-2007, 08:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,630,411.07724 seconds with 17 queries