mardique

Senior Member
Joined
Feb 5, 2010
Messages
58
I know this should probably go in the networking subforum but it's kinda deserted and I need an answer fast.

I have a 2012 R2 server (alone) and a Win 7 station. My login script is very simple, it's only a few net use commands (net use :G /delete - net use :G \\Server\Folder). But right now, these commands simply refuse to work. I'm always getting a "System error 67. The network name cannot be found".
So at login it does not work. If I try running the .bat on the computer, it does not work. But it does work if I do it manually in the cmd. I've noticed that the difference is that when I do it in cmd, it's my account that runs it and when it's the .bat, it's the system.

This seems like a permission issue to me. What permission though, I don't know. But here's the strangest part of this problem: The script used to work. When I made it last week, it was working perfectly. So that means something happened when I closed the server and restarted the old one. That one is on 2008 R2 and needs to be on during the week because I can't just switch everyone to the new one. I have to do all this on the weekends when there's no one.
It's very possible that the old one interfered with the new one, as it has done so previously (had problems with setting the password policy on the new one because the old one didn't let it).

So, any thought on how to fix the scripts?
 


Solution
It seems like the issue you're facing with the login script not working as expected could indeed be related to permissions or possibly network configuration changes. Here are some steps you can take to troubleshoot and potentially resolve this problem:

Troubleshooting Steps for Login Script Issue:​

  1. Check Network Connectivity:
    • Ensure that both the server (2012 R2) and the Win 7 station have proper network connectivity. Try accessing shared folders manually to verify network connectivity.
    []Verify Server Name:
    • Double-check the server name and shared folder path in your script to ensure they are correct and accessible.
    [
    ]User Permissions:
    • Check the permissions on the...
It seems like the issue you're facing with the login script not working as expected could indeed be related to permissions or possibly network configuration changes. Here are some steps you can take to troubleshoot and potentially resolve this problem:

Troubleshooting Steps for Login Script Issue:​

  1. Check Network Connectivity:
    • Ensure that both the server (2012 R2) and the Win 7 station have proper network connectivity. Try accessing shared folders manually to verify network connectivity.
    []Verify Server Name:
    • Double-check the server name and shared folder path in your script to ensure they are correct and accessible.
    [
    ]User Permissions:
    • Check the permissions on the shared folder. Make sure the user account running the login script has the necessary permissions to access the shared folder.
    []Authentication:
    • Ensure that the login script is not using credentials that have changed or expired. Update the credentials in the script if necessary.
    [
    ]Run the Script as the Logged-In User:
    • Modify the script to run under the user context rather than as the system account. You can use the %USERNAME% environment variable to dynamically capture the logged-in user's username.
    []Delayed Startup:
    • If the network resources take time to initialize, consider adding a delay in your script to wait for the network to be fully available before mapping drives.
    [
    ]Log Script Output:
    • Add commands to log the output of the script to a file. This can help in debugging and identifying the specific step where the error occurs.
    []Review Recent Changes:
    • Since the script was working previously, review any changes made to the server or network configuration after it stopped working to identify potential causes.
    [
    ]Test with Different Account:
    • As a troubleshooting step, try running the script with a different user account that has appropriate permissions to see if the issue persists. By systematically checking network connectivity, permissions, user context, and reviewing recent changes, you can isolate the root cause of the script failure and take corrective actions to address it. If the issue persists, providing more specific details about the script content and environment may help in offering targeted solutions to resolve the problem.
 


Solution
Back
Top