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

    • Jony Ive is reportedly working on multiple AI devices for OpenAI, including a mobile gadget by Hamid Ganji Last month, OpenAI announced acquiring Jony Ive's startup, io, in a $6.5 billion deal. Ive, who served as Apple's design chief for over two decades, moved to OpenAI to work on the company's AI hardware projects. While the details of these projects have remained relatively untold, Mark Gurman's Power On newsletter revealed some exciting insights about Jony Ive's work at OpenAI. According to Gurman, Apple's former design chief is now spearheading a series of groundbreaking AI hardware products for OpenAI. One of these under-development devices is described as a "mobile gadget" that takes the form of a "pendant" and can be worn around the neck. This device could allegedly allow users to access ChatGPT with voice commands. Another of Ive's works at OpenAI is a home device that functions similarly to a smart speaker. Users can put the device on a table and perform various tasks using OpenAI's ChatGPT. Interestingly, OpenAI also has a robot device under development. As Gurman says, this robot "will likely be a machine that develops a relationship with a human using AI." However, OpenAI's robot is still far from being made available on the market. After acquiring Jony Ive's startup, OpenAI CEO Sam Altman described Ive as the best designer in the world, adding that they can now work on the next generation of AI-powered computers. More details about OpenAI-Ive hardware products could emerge over the next few months. OpenAI was already rumored to be working on a mysterious AI gadget, presumably a screenless AI phone, which might be the same mobile gadget that Gurman revealed. While details of this alleged AI mobile are yet unknown, such a device could pose an alternative to conventional smartphones, raising the alarm for smartphone makers such as Apple, Samsung, and Google. Meanwhile, Apple might already be expecting such a device, as its services chief Eddy Cue allegedly said during his testimony at Google's antitrust case that iPhones might no longer exist 10 years from now.
    • Seems Nintendo have already thought of that after the Joy-Con drift in the Switch 2 EULA: Clause 16 of the EULA reads: "This arbitration provision precludes you and Nintendo from suing in court, having a trial by jury, or participating in a class action. You and Nintendo agree that arbitration will be solely on an individual basis and not as a class arbitration, class action, or any other kind of representative proceeding. You and Nintendo are each waiving the right to trial by a jury."
    • Cool glass phone you have in that silicon case bro
    • I can't say I ever noticed an OEM putting effort into user-friendly descriptions and icons who didn't also put effort into making good drivers. Usually, missing icons and descriptions was also a sign of bad drivers.
  • Recent Achievements

    • First Post
      brynmot earned a badge
      First Post
    • Reacting Well
      brynmot earned a badge
      Reacting Well
    • Week One Done
      Al_ earned a badge
      Week One Done
    • Week One Done
      MadMung0 earned a badge
      Week One Done
    • Reacting Well
      BlakeBringer earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      477
    2. 2
      +FloatingFatMan
      274
    3. 3
      ATLien_0
      243
    4. 4
      snowy owl
      209
    5. 5
      Edouard
      185
  • Tell a friend

    Love Neowin? Tell a friend!