0

I migrated from Windows 7 to OSX. I am trying to recreate the functionality of "net use" on the Mac via Terminal. Problem is the machine I want to mount has no shares.

In Windows7 I could map the drive and have full access via:

 net use \\address\C$ /USER:user pass

Is there no bash method similar to this this?

rmdir /Volumes/test
mkdir /Volumes/test
mount_smbfs //user:pass@address/ /Volumes/test

Finally realized that the no shares was cause of my problem with that mounting.

vashavoc
  • 129
  • 2
  • 10
  • Administrative shares should work the same with smbfs. You'd still need to specify the share name though: `mount_smbfs //user:pass@address/C\$ /Volumes/test` – Beggarman Jul 31 '14 at 04:40

1 Answers1

0

You probably missed the C$ part.

mount_smbfs '//user:pass@address/C$' /Volumes/test

Quoting ('') may not be necessary since $ does not follow a parameter name but let's just be explicit.

You also need to add your username and password:

mount_smbfs '//user:pass@address/C$' /Volumes/test -o user='user',pass='pass'

Sometimes it doesn't work due to many causes I don't technically know but you can also try:

mount -t smbfs '//user:pass@address/C$' /Volumes/test -o user='user',pass='pass'
mount -t smbfs '//user:pass@address/C$' /Volumes/test -o username='user',password='pass'
mount -t cifs '//user:pass@address/C$' /Volumes/test -o user='user',pass='pass'
mount -t cifs '//user:pass@address/C$' /Volumes/test -o username='user',pass='password'

See Mounting samba shares from a unix client.

konsolebox
  • 72,135
  • 12
  • 99
  • 105
  • gives a "usage: mount_smbfs [-Nh] [-d mode] [-f mode] //[domain;][user[:password]@]server[/share] path" error the -o flag isnt used apparently but other than that, this worked. it was the C$. could have sworn I had tried it as well before and it didnt work but probably wrong. – vashavoc Aug 01 '14 at 16:46