net use f: \\server\sharecat username password

How is the syntax for a command like subject ?
I wish to map the shared catalog as drive F: but the server need a username and a password.... ??
LVL 2
RudolfFraDKAsked:
Who is Participating?
 
mikecrConnect With a Mentor Commented:
This is how you would do it on a domain.

net use g: \\servername\sharename /user:domainname\username password

You will substitute servername and sharename with your server and share that your trying give them access to and you will substitute domainname with your domain name and username with the account your going to have them connect with and password will be that accounts password. If you put that line exactly like you see it in a batch file substituting your information, this will map the drive for him on your domain.
0
 
stevenlewisCommented:
When you log on to the machine you are on, then it sets the username .
then
NET USE [drive: | *] [\\computer\directory [password | ?]]
    [/SAVEPW:NO] [/YES] [/NO]
to see all the syntax, and help, from a prompt type
net use /? |more
0
 
RudolfFraDKAuthor Commented:
So the way to use it is:
net use f: \\server\share password /savepw:yes

?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
mikecrCommented:
Is this within a domain? Steve is correct as long as you have an account on that local box to connect with and it is not a domain controller.
0
 
RudolfFraDKAuthor Commented:
It is within a domain, but what im unsure about is how to read lines like: NET USE [drive: | *] [\\computer\directory [password | ?]] etz.
Another tricky part of this, is that im trying to do this on a laptop with "XP home ed." on it. And "XP home ed." doesnt facilitate login to a domain. - You can connect to the network and you can use its ressources, but you have to type your username and password every f... time you try to access a ressource on the net.
The guy who are going to use this laptop isnt computer minded, so im trying to make it as little painful as possibel for him, to access his homedrive. Im trying to make a "make homedrive.bat" file for him.
   
0
 
CyberStretchCommented:
Just a quetion about security:

If you include all of this user's login information in a batch file, isn't that making the user's account inherently less secure and more prone to hacking than if the user is "inconvenienced" by having to type in login information?

Seems to me that suffering a little inconvenience is well worth ensuring better security for the overall network.
0
 
mikecrCommented:
If you do it properly however and only give that login the appropriate rights to whatever it needs to get to, this would not be a problem.
0
 
gmichelsCommented:
Of course, if you put this into a batch file, the password is there for someone to see. Best be careful about who has access to that file.

0
 
mikecrCommented:
If you want it to be transparent you can edit a key in the registry which will allow the same thing.
0
 
RudolfFraDKAuthor Commented:
Sounds interesting about editing the registry, to allow the same thing.. - Where in the registry ?
0
 
mikecrCommented:
HKEY_Local_machine\Software\Microsoft\Windows\Currentversion\run

Click Edit from the menu and then add string value and then use the same command line as above and it should work.
0
 
Cdu021Commented:
Back to the "net use" issue -

Isn't XP Home Ed the same as Win98 - ME in respect to it's core functionality. If so you can't specify the username and password using net use. In 98 it defaults to the currently logged on user or failing that the Guest account.
0
 
RudolfFraDKAuthor Commented:
I have bought XP Pro, so now i really dont care. But thanks anyway.
0
All Courses

From novice to tech pro — start learning today.