Recommended Posts

hey guys

 

our IT department have sent us a batch file to run to set up a drive and map it

 

this is the code

@echo off 
set /P id=Please enter your user name: 
echo Thanks. 
echo In a few seconds you will need to enter your username and password again. 
echo Please include FPA\ at the beginning of your username...
net use f: \\***.***.***.***\home$\%id%
echo press enter to exit

I understand it setting the id for the share to be added but i dont understand what adding the FPA\username is doing

 

can you enlighten me, the script seems to work for some but not others

Link to comment
https://www.neowin.net/forum/topic/1161650-network-share-script/
Share on other sites

Why should they need to do this - if their machine is part of the domain, then there would be not reason to auth via this method.

 

All you should have to do is access the share name.

 

Clearly something is odd here...  There should normally be no need for such a script.

yeah i am not sure why it works like that i am just a Peon here although a peon that seems to be able to fix issues quicker than IT can

 

thanks for the help guys

 

Its accessing through citrix if that helps budman

Citrix is not part of the domain?  Again failed way of doing it!  Even when you use citrix you should be logging in with your domain creds and therefore be able to auth to any share you have permissions too without issue and no need to send creds again.  To access a share all you should have to do is

 

\\hostnameorIPorFQDN\sharename

 

And you should be good..

 

And you using IP to access the share?  So you don't even have name resolution working?  WTF kind of place is this?

Surely it should be setup to run as part of a GP and then either assigned to an OU or security group. This way it will automatically map when the user logs on.

 

Hell, most of my users don't know their username, they just switch on the machine and type their password!

 

Looking at it, it looks like its a user folder that can be mapped in Active Directory.

 

post-273740-0-31186500-1372432094.jpg

 

No reason for Citix not to be part of the domain, only increases workload and reduces security.

Is that batch file run automatically when the user logs in or do you have to launch it explicitly? When I was in college I worked for my university's IT department, and they did something very similar with their XP and Vista images. There was a VB script that ran automatically on startup to map printers, map network shares, and try to activate the VPN if the staff member was off-campus. It was more complex than the script you posted: it would automatically retrieve the user's username and authenticate everything with their domain credentials. It was also one of those "black magic" things that as far as I could tell no one in the department really understood. It "just worked" - most of the time. Fortunately we started doing things the right way and got rid of the script when we deployed Windows 7. In short, I agree with BudMan: something is not configured properly.

Not wanting to shoot you, an for sure not blaming you for the mess your having to deal with.

 

but there is not much too that script

 

Its a simple net use

 

so for example

 

C:\>net use * \\10.56.132.54\ipc$
Drive Z: is now connected to \\10.56.132.54\ipc$.

The command completed successfully.

 

I connected to the ipc$ share without having to auth, because I am already logged into the domain.  If the creds sent automatically do not work then you will get prompted.

 

If you get prompted when you attempt to use net use, then the creds your logged into the machine with do not have permissions.  So you need to send different creds.

 

Now where you can run into issues with this is - you can only be authed to a server with 1 username and password.  So if you were allowed to access anything on that server as your logged in username or anonymously..  You would then not be able to auth via some other account name and password be it local to where you trying to access or a domain creds, etc..

 

What might help us troubleshoot is output of just running command directly

 

net use f: \\***.***.***.***\home$\%id%

 

with replacing %ID% with your username, like so

 

net use f: \\***.***.***.***\home$\budman

 

Do you get prompted - if so put in your password, what does it say.. What errror or error number?

 

putting in fpa\budman would not be valid in the above context.. that would be like access directory home$\fpa\budman

 

Which I guess could be valid - but if that is the case.. Maybe there is no domain involved?  How about output of net view \\ipaddressorhostname\home$

 

the $ on the end tells us its a HIDDEN share.. like admin$ or IPC$, etc.

 

What do you get if you just do net view \\ipaddress you snipped out.. BTW if your using private IPs 10.x.x.x or 192.168.x.x or 172.16-31.x.x there is little point in hiding those..

 

The other problem I see with that command is your trying to map a drive letter to a folder under a share??

 

net use f: \\***.***.***.***\home$\%id%

 

Where home$ is the share and %ID% is some directory..  You don't do that - you map to a share directly, not to a sub folder.  So that could be a problem for sure!

 

So normally you would use

 

net use f: \\***.***.***.***\%id%

 

Where there is share with your username on it.

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

    • No registered users viewing this page.
  • Posts

    • Meta is now using every possible source to power its data centers by Hamid Ganji Chip shortage is not the only obstacle hindering AI development. The insatiable thirst for electricity from data centers has caused serious problems for tech giants, to the point where they have been forced to invest heavily in purchasing nuclear power plants. However, green and renewable energy could also serve as an alternative power source for data centers. As reported by Reuters, Meta has signed four deals with Renewable energy developer Invenergy to supply 791 megawatts (MW) of solar and wind power for its data centers. This is the second green deal between Meta and Invenergy to supply renewable energy to Meta's data centers, following the firms' signing of contracts last year for 760 MW of solar electricity. According to Invenergy, the latest deal soars Meta's renewable energy purchases to 1,800 MW. The green energy will come from Invenergy's projects in Ohio, Arkansas, and Texas. While renewable energy has a more limited capacity compared to methods like nuclear power, it still holds significant potential to meet some of the data center's energy needs. Moreover, investing in renewable energy aligns with Big Tech's net-zero plans. Last year, Meta announced a request for proposals (RFP) to identify nuclear energy developers in the United States. The company plans to generate 1-4 gigawatts (GW) of new nuclear power by early 2030. Also, in June this year, Meta and energy company Constellation announced plans to revive an aging nuclear power plant in Illinois that has been shut down since 2017 due to financial losses. Meta could rely on this nuclear power plant for the next 20 years. While some major tech companies were committed to achieving net-zero emissions by 2040, the soaring power demands from AI data centers could render all those green plans obsolete. That is why these companies have called for reforms to net-zero rules, as achieving their ambitious net-zero goals by 2040 seems highly unlikely.
    • Mozilla fixes Firefox crashes on startup and other issues by Taras Buria Just two days after releasing Firefox 140 to the Release channel, Mozilla is dropping a small update to address two bugs in version 140. Firefox 140.0.1 is now available for download, addressing crashes on startup and issues with contrast in the sidebar when using dark themes (black text appears on dark backgrounds, making it impossible to read). Here is the changelog that Mozilla published in the official documentation: Fixed text contrast issues in the sidebar with some dark themes. (Bug 1971487) Fixed a startup crash experienced by some users caused by DLL injection. (Bug 1973947) You can update Firefox to the latest version by heading to Menu > Help > About Firefox. Alternatively, you can get it from the official website or the Microsoft Store (Windows 10 and 11). In case you missed it, Firefox 140 arrived on June 24. It introduced several important changes, including the ability to resize the pinned tab section when using vertical tabs (more upgrades are coming to the browser in this area), custom search engine support, tab unloading via right-click, various security fixes, and more. The update also removed the Pocket toolbar icon and the Pocket integration on the new tab page. Mozilla recently killed Pocket and Fakesport in order to focus more on its main product, the Firefox browser. You can find full release notes for Firefox 140.0.1 in our dedicated article.
    • I really don't get why Outer Worlds 2 is being brought into conversation so often. In Romania: Final Fantasy 7 Remake Part 1 launched at 80 euros on EPIC, FOUR YEARS AGO and then at 80 euros on Steam sometime later. Black Ops 6 last year? 80 euros. DOOM The Dark Ages? It launched at 80 euros. "Xbox Game Studios’ first game out of the gates with the increased price" => literally the 3rd Xbox studio title with that pricing for me. They can all get bent.
    • MSFT it's getting stupid under Satya Nadella's management. Instead of dogfooding their own technology like WinUI3 they insist in pushing this web garbage packed of copilot malware. As an old enthusiast of MSFT since 90's I'm almost becoming a hater of MSFT because of suck kind of stupid decisions like these. 1) Pushing copilot hard on it's user's thought, every time and e everywhere. 2) Instead of favoring it's own NATIVE UI framework like WinUI or .NET MAUI (poor maui) to showcase the market they are very confident about their software development tools, no they just to what's easier for them and completely ignore it's user's feedback. My guess is that pretty soon they will figure it out that AI won't be all that big thing and when they realize the colossal investments that they made on AI would better served if they invested in their own .NET frameworks.
  • Recent Achievements

    • Conversation Starter
      Kavin25 earned a badge
      Conversation Starter
    • One Month Later
      Leonard grant earned a badge
      One Month Later
    • Week One Done
      pcdoctorsnet earned a badge
      Week One Done
    • Rising Star
      Phillip0web went up a rank
      Rising Star
    • One Month Later
      Epaminombas earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      532
    2. 2
      ATLien_0
      207
    3. 3
      +FloatingFatMan
      170
    4. 4
      Michael Scrip
      148
    5. 5
      Steven P.
      125
  • Tell a friend

    Love Neowin? Tell a friend!