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

    • I've been pining for an Ultra, mainly because of the look. If I can get that look on a (much) cheaper model, then I'm in.
    • AMD 25.6.2 optional driver adds support for FBC: Firebreak, The Alters, and more FSR 4 games by Pulasthi Ariyasinghe AMD has a new driver update for Radeon graphics hardware owners. The AMD Software: Adrenalin Edition 25.6.2 optional driver update is touting support for a couple of brand-new games as well as expanded FidelityFX Super Resolution 4 (FSR 4) support across four more titles. 11 bit studios' unique sci-fi adventure The Alters is releasing on June 13, while Remedy Entertainment's first multiplayer venture for co-op fans, FBC: Firebreak, is landing on June 17. Both titles receive day-one support via this optional driver for anyone looking to jump in. At the same time, The Alters, Delta Force, Dragonkin: The Banished, and RoadCraft have received FSR 4 support too, letting RX 9000 series owners enable the company's latest generation upscaler for gaining more frames. The complete list of games with FSR 4 support, as well as upcoming implementations, can be found on AMD's support page here. As for fixed issues, a green tint on Oculus Rift S, Discord stutters when alt-tabbing, Spider-Man 2 crashes when ray tracing is enabled, The Last of Us Part I crashes, and Warhammer 40K: Darktide performance issues have now been resolved, according to AMD. The known issues AMD's teams are working on are these: Texture flickering or corruption may appear while playing The Elder Scrolls IV: Oblivion Remastered with AMD FidelityFX Super Resolution enabled on Radeon RX 9070 XT. Users experiencing this issue are recommended to disable AMD FidelityFX Super Resolution as a temporary workaround. Stutter may be observed while playing games with some VR headsets at 80Hz or 90Hz refresh rate on some AMD Radeon Graphics Products such as the Radeon RX 7000 series. Users experiencing this issue are recommended to change the refresh rate as a temporary workaround. Intermittent system or application crash may be observed while playing Cyberpunk 2077 on some AMD Radeon Graphics Products such as the Radeon RX 7000 series and Radeon RX 9000 series. Intermittent application crash or driver timeout may be observed while playing Monster Hunter Wilds with Radeon Anti-Lag and Instant Replay enabled. Stutter may be observed while playing Call of Duty: Warzone Season 03 ‘Verdansk’ map on some AMD Graphics Products. Stutter and lower than expected performance may be observed while playing 4K resolution YouTube videos in Chrome. Users experiencing this issue are recommended to play videos in full screen as a temporary workaround. Intermittent application crash may be observed while playing FBC: Firebreak on some AMD Ryzen AI 300 series and some AMD Ryzen 7000 series APU products. The new AMD Software: Adrenalin Edition 25.6.2 optional update is now available for download from the AMD Software app as well as AMD's own changelog page for the driver.
    • I wish Apple would stop enforcing driving restrictions. Sometimes passengers just want to do things on the screen. It's not always the driver.
    • Samsung Galaxy Watch8 series to adopt the squircle design across all models by Sagar Naresh Bhavsar Next month, Samsung is set to launch a bunch of new products. Aside from its usual premium foldables, the Galaxy Z Fold7 and the Galaxy Z Flip7, the company is also expected to introduce an affordable version, the Galaxy Z Flip7 FE. The new watch lineup, the Galaxy Watch8 series, will also be introduced, and now we have our first glimpse at what you could expect this year. The Galaxy Watch8 series will include the standard Galaxy Watch 8, the Galaxy Watch8 Classic, and the new variant of the Galaxy Watch Ultra. However, unlike last year, it appears Samsung is adopting the squircle design across all models. This means that Samsung could potentially ditch the circular design of the Galaxy Watch8 and Watch8 Classic for Ultra's squircle design. Folks at Android Headlines have shared a new render that gives us a closer look at the design and colors of the upcoming Galaxy Watch8 series. In addition to the squircle design across variants, the Galaxy Watch8 Classic is shown with its signature physical bezel. Image by Android Headlines The leak also highlights the Quick button, which will be present on the Galaxy Watch8 alongside the Galaxy Watch Ultra. If true, users will be able to assign any app to this customizable button and access it with a single tap. The standard model misses out on both the physical bezel and the Quick button. Also, the Galaxy Watch Ultra may get a new blue color option. Last year's Ultra watch is available in orange, dark gray, green, and white. This also highlights one thing that blue could be Samsung's signature color for the upcoming range of products, as the Galaxy Z Fold7 has also been teased a couple of times in blue. Samsung is expected to hold the Unpacked event sometime around mid-July. The company is rumored to have chosen New York as the venue for the second Unpacked event.
    • AI can only solve problems humans have already solved. In essence its worthless..
  • Recent Achievements

    • Week One Done
      serfegyed earned a badge
      Week One Done
    • One Month Later
      fashionuae earned a badge
      One Month Later
    • Week One Done
      fashionuae earned a badge
      Week One Done
    • Week One Done
      elsafaacompany earned a badge
      Week One Done
    • Week One Done
      Yianis earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      514
    2. 2
      ATLien_0
      265
    3. 3
      +FloatingFatMan
      195
    4. 4
      +Edouard
      172
    5. 5
      snowy owl
      124
  • Tell a friend

    Love Neowin? Tell a friend!