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

    • Windows Server 2025 security baseline to get more frequent updates, streamlines settings by Paul Hill Microsoft has announced the release of the June 2025 revision of its security baseline package for Windows Server 2025 (v2506), it is now available to download from the Microsoft Security Compliance Toolkit. After downloading it, you can test the recommended configurations in your environment and customize or implement them as you see fit. To deal with the evolving threat landscape, new Windows features, and community feedback, Microsoft is planning to revise the Windows Server baseline more frequently in the future. Windows Server security baselines are a collection of Microsoft-recommended configuration settings that help administrators establish secure and consistent Windows Server environments. This is the first security baseline update for Windows Server 2025 since January, a summary of the changes is presented in this table: Security Policy Change Summary Deny log on through Remote Desktop Services Allow remote logon for non-admin local accounts on MS and add “BUILTIN\Guests” to both DC and MS. WDigest Authentication Remove from the baseline Allow Windows Ink Workspace Remove from the baseline Audit Authorization Policy Change Set to “Success” in both DC and MS Include command line in process creation events Enable in both DC and MS Control whether exclusions are visible to local users Moved to Not Configured as it is overridden by the parent setting. Of these changes, the removal of WDigest Authentication and the addition of Include command line in process creation events are significant. Microsoft said it removed WDigest Authentication from the security baseline because it is no longer necessary for Windows Server 2025. The policy was originally enforced so that WDigest couldn’t store plaintext passwords in memory, which was a significant theft risk. Since the 24H2 update in Windows Server 2022, the policy has been deprecated, so there’s no need to enforce this setting. The update also adds Include command line in process creation events to improve the visibility of how processes are executed across the system. By capturing the command-line arguments, it makes it easier to detect and investigate malicious activity that may otherwise seem legitimate. If you want to learn more about the other changes in a bit more depth, refer to Microsoft’s announcement of this security baseline update.
    • Camtasia 2025.1.3 by Razvan Serea TechSmith Camtasia is the complete professional solution for high-quality screen recording, video editing and sharing. Camtasia 2023 makes editing your videos easier, and faster than ever. The new editor is packed with enhanced video processing, all-new production technology, an innovative library, and stock videos and other creative assets to help you create more polished, professional videos. No video experience needed. Anyone can create informative, engaging videos. Create professional, eye-catching videos: Add special video effects - Apply Behaviors that are perfectly designed to animate your text, images, or icons. Get a crisp, polished look without being a professional video editor. Drag-and-drop your edits - What you see is what you get. Every effect and element in your video can be dropped and edited directly in the preview window. And you can edit at resolutions up to beautiful 4K, for clear video at any size. Get exceptional performance - Camtasia takes full advantage of your computer’s processor with 64-bit performance. You’ll get fast rendering times and enhanced stability—even on your most complex projects. Camtasia 2025.1.3 changelog: New Features Added the Edit Image in Snagit feature. Allow importing SNAGX files as images. Feature Updates Add ability to double click the FPS button and open the project settings menu. Background tab in the Rev window is updated with new files. Added user configurable keyboard shortcut for Add Audio Point. Updates for IT Administrators swfobject.js was unused and has been removed from the install. Bug Fixes Fixed a bug where video streams in MTS files could fail to decode. Fixed a bug with the FPS button so it no longer opens up the playhead time control. Fixed a bug with tooltips that prevented shortcut commands from displaying correctly. Fix a bug where MP4 files recorded on Google Pixel 7 Pro could fail to decode video. Fixed a crash when ripple replacing the placeholder with legacy noise reduction effect. Fixed a bug that could cause some ADPCM audio streams to be ignored. Fixed a bug where a group's audio waveforms would not update after a trim and undo. Fixed an issue where the media Duration popup could leave a 1 frame gap between media. Fixed a bug where the installer could hang when running it quietly when the app is already installed. Fixed a bug where the installer could hang on exit after running it when another installation was already in progress. Fixed a user-reported licensing error. Download: Camtasia 2025.1.3 (64-bit) | 335.0 MB (Shareware) View: Camtasia Homepage | Tutorials | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • From what I understand, RAID 1 makes a copy of one disk. How does it do this? If something happened to one drive, could I take the other one out, plug it into a PC and use it like a normal disk? I have two hard drives that have the same information on - a bit of protection if one drive fails. But I've just been manually copying the data twice.
  • Recent Achievements

    • 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
    • One Year In
      Bert Fershner earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      537
    2. 2
      ATLien_0
      205
    3. 3
      +FloatingFatMan
      167
    4. 4
      Michael Scrip
      151
    5. 5
      Som
      126
  • Tell a friend

    Love Neowin? Tell a friend!