RE: net use syntax
"Van Sickler, Jim" <[email protected]> Tue, 28 Nov 2006 11:37:46 -0500
| Newsgroups | gmane.network.ssh.windows |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] [mailto:[email protected]]On Behalf Of > Ming-Ching Tiew > Sent: Friday, November 24, 2006 3:47 AM > To: [email protected] > Subject: net use syntax > > > > I have been trying to solve my problem of using shares when > I remotely signon to a OpenSSH windows machine without > success. > > I want to programmatically perform a 'net use'. These are some > of the things I tried with the error message I got :- > > # ssh -i rsa.pub -l user Server1 'net use \\192.168.1.1\share' > > System error 67 has occurred. > > The network name cannot be found. > > I also tried using Netbios over netbeui ( instead of ip over > netbeui ), > the same error I got :- > > # ssh -i rsa.pub -l user Server1 'net use \\Server2\share' > > Yeah I know I need to supplied username and password, but right now > the problem is I can never get it to accept the share name. > > However, If I sign on and get a command prompt, typing 'net > use \\server2\share' is > accepted ( also the IP syntax is working too ). > > I also tried forward slash :- > > # ssh -i rsa.pub -l user Server1 'net use //Server2/share' > > Then it will reply with error too :- > > The option //Server2/share is unknown. > ..... > > Please help this is driving me nuts ! > > Look what you've started now.... I'm running into the same problem now, after we've been migrated into an Active Directory Domain. It appears to be a cygwin issue; maybe with the SIDs in the user account of the logged-on ssh user. I got the same results with my account and with the local Administrator account. I ran getsid to find out what the correct SIDs were, and modified \etc\passwd and \etc\group on the target server to match (they were different from the pre-migration SIDs). No change... If I ssh into the server, then run cmd to get a command prompt, net view and net use work as they should. That's why I think it's a cygwin issue. I haven't updated my cygwin files since July, so I'll start there and see if it changes anything. I don't think I've been of any help, but this may assure you that you aren't alone! Jim -- List Info: http://erdelynet.com/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Mail mailto:[email protected]