Recommended Posts

I am trying to create a login script that will map user drives based on the groups they belong to. I am using ifmember.exe from the Windows 2000 Resource Kit. However, it appears to be working on my XP box, but it's causing my 2000 box to lock up. This leads me to believe there is an error in the script. The Groups I have are CGS, DATABOOK, PROGRAMS and ADMINISTRATORS.

The script:

net use /persistent:no

ifmember CGS

if not errorlevel 1 goto SkipU

NET USE /User:dc1\%username% U: \\dc1\HOME$\%USERNAME%

if errorlevel 1 set LS_Error=%LS_Error% U (Home)

:SkipU

ifmember CGS

if not errorlevel 1 goto SkipM

NET USE /User:dc1\%username% M: \\dc1\GROUP$\public

if errorlevel 1 set LS_Error=%LS_Error% U (Home)

:SkipM

ifmember Databook

if not errorlevel 1 goto SkipN

NET USE /User:dc1\%username% N: \\dc1\GROUP$\databook

if errorlevel 1 set LS_Error=%LS_Error% N (DATABOOK)

:SkipN

ifmember Programs

if not errorlevel 1 goto SkipO

NET USE /User:dc1\%username% O: \\dc1\Programs$

if errorlevel 1 set LS_Error=%LS_Error% O (PROGRAMS)

:SkipO

ifmember Administrators

if not errorlevel 1 goto SkipQ

NET USE /User:dc1\%username% Q: \\dc1\Software$\Apps

if errorlevel 1 set LS_Error=%LS_Error% Q (APPS)

I am not sure what the persistance tag means at the begining or the ir error the "if errorlevel 1 set LS_Error=%LS_Error%" line in the script means. So, if someone could explain those, I would appreciate it.

Link to comment
https://www.neowin.net/forum/topic/83939-login-script-problems/
Share on other sites

persistent tag simply allows you to re-establish the network connected shares for a user when they log in into your network.....this is set to either yes or no....and I think you know that part already....the errorlevel line allows a way for you to gracefully exist the script if your users don't meet the conditions set forth by which groups the user belongs to...if they do meet the conditon...it goes about allowing the user to gain access to set shares...

hmmmm...not sure...but you say that it locks up your W2K system....so you mean to say that you actually SEE the script execute when logging in....but it FREEZES at that point...so you see the login script dialog box forzen on your screen?....and that leave no alternative but to reboot?

...it happened to me when I migrated an NT 4.0 box to W2K and it caused the scripts to be unavailable...

You're not setting the variable for the LS_Error parameter

On your NET USE line you have "/User:dc1\%username%", you shouldn't need to specify the user since it will use the current account unless specified otherwise (I could see using it if you wanted to map with a different account name)

In the "ifmember Administrators" section you have "if not errorlevel 1 goto SkipQ" but don't have a "SkipQ" defined (guessing you just missed pasting it?)

This link should get you running:

http://www.experts-exchange.com/Operating_...Q_20420238.html

Thanks guys, I got it working. It turns out it was freezing because the profile had someone got corrupt. I deleted the profile and it worked fine. I did change the script a little, don't use the one I pasted for reference. PM me if you need help and I will do my best.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • NTLite 2025.06.10459 is out.
    • Wireshark 4.4.7 by Razvan Serea  Wireshark is a network packet analyzer. A network packet analyzer will try to capture network packets and tries to display that packet data as detailed as possible. You could think of a network packet analyzer as a measuring device used to examine what's going on inside a network cable, just like a voltmeter is used by an electrician to examine what's going on inside an electric cable (but at a higher level, of course). In the past, such tools were either very expensive, proprietary, or both. However, with the advent of Wireshark, all that has changed. Wireshark is perhaps one of the best open source packet analyzers available today. Deep inspection of hundreds of protocols, with more being added all the time Live capture and offline analysis Standard three-pane packet browser Multi-platform: Runs on Windows, Linux, OS X, Solaris, FreeBSD, NetBSD, and many others Captured network data can be browsed via a GUI, or via the TTY-mode TShark utility The most powerful display filters in the industry Rich VoIP analysis Read/write many different capture file formats Capture files compressed with gzip can be decompressed on the fly Live data can be read from Ethernet, IEEE 802.11, PPP/HDLC, ATM, Bluetooth, USB, Token Ring, Frame Relay, FDDI, and others (depending on your platfrom) Decryption support for many protocols, including IPsec, ISAKMP, Kerberos, SNMPv3, SSL/TLS, WEP, and WPA/WPA2 Coloring rules can be applied to the packet list for quick, intuitive analysis Output can be exported to XML, PostScript®, CSV, or plain text Wireshark 4.4.7 changelog: The following vulnerabilities have been fixed wnpa-sec-2025-02 Dissection engine crash. Issue 20509. CVE-2025-5601. The following bugs have been fixed Wireshark does not correctly decode LIN "go to sleep" in TECMP and CMP. Issue 20463. Dissector bug, Protocol CIGI. Issue 20496. Green power packets are not dissected when proto_version == ZBEE_VERSION_GREEN_POWER. Issue 20497. Packet diagrams misalign or drop bitfields. Issue 20507. Corruption when setting heuristic dissector table UI name from Lua. Issue 20523. LDAP dissector incorrectly displays filters with singleton "&" Issue 20527. WebSocket per-message compression extentions: fail to decompress server messages (from the 2nd) due to parameter handling. Issue 20531. The LL_PERIODIC_SYNC_WR_IND packet is not properly dissected (packet-btle.c) Issue 20554. Updated Protocol Support AT, BT LE LL, CIGI, genl, LDAP, LIN, Logcat Text, net_dm, netfilter, nvme, SSH, TCPCL, TLS, WebSocket, ZigBee, and ZigBee ZCL Download: Wireshark 4.4.7 | 83.2 MB (Open Source) Download: Portable Wireshark 4.4.7 | ARM64 Installer View: Wireshark Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Snapchat finally has a watchOS app, a decade after the Apple Watch launched by David Uzondu Snap has announced that Snapchat is finally hopping onto Apple Watch, something many users have probably been waiting for. This new app lets you easily preview an incoming message right on your wrist and then fire back a reply without ever needing to grab your iPhone. For those quick responses, you have options: you can tap out a message on the keyboard, use Scribble to draw letters, dictate your reply, or just send a fitting emoji. Snap says it's trying to make Snapchat easier to use on all the different devices people have in their lives. It's already seen people using Snapchat on tablets and the web, so bringing it to wearables like the Apple Watch feels like the next natural move. That marks a big change from back in 2015 when the Apple Watch first launched. At the time, Snap took a more cautious "wait and see" approach, wanting to see if people actually used smartwatches before building an app. New app launches are not always perfect. It is still early days for the watchOS app, as some users on Reddit have reported the app being stuck on the loading screen. Hopefully, Snap will address these initial teething problems quickly. This expansion to Apple Watch comes after the company abandoned its widely criticized three-tab app redesign following a notable drop in its North American daily active users and significant negative feedback. That redesign, introduced back in September 2024, was meant to simplify things but ended up frustrating many, leading Snap to reverse course after about seven months and work on a refined five-tab layout. Meanwhile, Android smartwatch users with Wear OS are still in a different boat, as there is no official, dedicated Snapchat app for that platform yet. They can typically only receive notifications, and attempts to sideload the full Android app often result in a clunky experience.
    • I've asked Sayan to limit these articles to science tech news.
    • LeafView 3.6.4 by Razvan Serea LeafView is a fast, open-source image viewer built with Electron. It offers a sleek, minimal UI for fast and efficient image browsing. Supporting various formats, LeafView ensures a smooth viewing experience with essential features like zoom, rotation, and slideshow mode. Designed for simplicity and performance, it utilizes hardware acceleration for smooth rendering and supports touch gestures for seamless navigation. LeafView key features: Lightweight & Open-Source – Minimal resource usage with a clean, efficient design Electron-Based – Cross-platform compatibility with modern UI Multiple Image Format Support – Opens JPG, PNG, GIF, BMP, and more Smooth Rendering – Hardware acceleration for fast performance Essential Image Controls – Zoom, rotate, and slideshow mode Touch Gesture Support – Seamless navigation on compatible devices Minimal UI – Focused on simplicity and ease of use LeafView 3.6.4 changelog: Update electron to v36.4.0 Download: LeafView 3.6.4 | Portable | ~100.0 MB (Open Source) View: LeafView Website | Other operating systems | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Year In
      survivor303 earned a badge
      One Year In
    • Week One Done
      jbatch earned a badge
      Week One Done
    • First Post
      Yianis earned a badge
      First Post
    • Rookie
      GTRoberts went up a rank
      Rookie
    • First Post
      James courage Tabla earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      419
    2. 2
      +FloatingFatMan
      182
    3. 3
      snowy owl
      181
    4. 4
      ATLien_0
      174
    5. 5
      Xenon
      137
  • Tell a friend

    Love Neowin? Tell a friend!