Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-23-2005, 11:44 PM   #1
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
net use command

how can I map a network drive with different user name and password on windows from the current user logged in using the net use command.
Old 11-24-2005, 01:22 AM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I haven't used DOS/alike for a while...but I guess

net use x: \\machine\sharename /user:remoteusername hispassword /persistent:yes

would create an X:\ drive for you, mapping \\machine\sharename share in it, and using "remoteusername" as the user who logs in the other machine and "hispassword" as the password for that user. and make the map persistent (so it doesn't disappear when rebooting..)
Old 11-24-2005, 10:59 PM   #3
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
thanx b0uncer i will check it
Old 12-09-2005, 07:27 AM   #4
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Two things:

Did it work?

Is this a fair restatement of the command:
net use x: \\MACHINE\SHARE /user:USER PASS /persistent:yes 

REM        Where:
REM   MACHINE == NetBIOS name of remote machine
REM   SHARE   == name of SMB share on MACHINE 
REM   USER    == user name on MACHINE 
REM   PASS    == user pasword on MACHINE
MACHINE is running Win or *nix + Samba.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
command to resize forms contents when form is resized mrobertson Programming 1 07-14-2005 10:39 AM
Where is 'net' command for Samba3? Les62 Linux - Networking 3 06-20-2005 02:14 PM
Line command to see what's using the net? Rotwang Linux - General 4 03-31-2005 12:55 AM
net join ads command Steve1445 Linux - Networking 4 02-25-2005 07:44 AM
what to use in place of net command puru_09 Linux - Networking 2 12-02-2002 04:52 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration