Discussion:
Command line mount smb shares not showing in Finder
(too old to reply)
b***@gmail.com
2006-07-31 10:03:55 UTC
Permalink
I'm missing something, and I hope someone can point me in the right
direction....

I can mount shares using:

mount -smbfs //server/share /Volumes/mountpoint

but, although the share is accessible via the terminal, I can't access
it from the Finder (It doesn't show up at all)

If I put the mountpoint under the users directory, the mountpoint
directory changes to an alias, and the share pops up on the Desktop as
I would expect, but then won't go away when I umount it.

How do I mount a share from the command line and have the same effect
as if it had been mounted using the Finder?

(Using OS X 10.4.4)
Jollino
2006-07-31 11:26:11 UTC
Permalink
Post by b***@gmail.com
How do I mount a share from the command line and have the same effect
as if it had been mounted using the Finder?
I'm not sure how to do that, but maybe you can use cmd-K in the Finder
and give the samba share using the format "smb://server", which will
give you a list of the available share and the opportunity to
authenticate (should you need so).

You should also be able to find the remote machine inside the Finder's
"Network" window, but for some reason this doesn't always happen. In
that case, cmd-K is your friend.


I hope this helps.
--
Jollino
b***@gmail.com
2006-07-31 15:08:00 UTC
Permalink
Post by Jollino
I'm not sure how to do that, but maybe you can use cmd-K in the Finder
and give the samba share using the format "smb://server", which will
give you a list of the available share and the opportunity to
authenticate (should you need so).
You should also be able to find the remote machine inside the Finder's
"Network" window, but for some reason this doesn't always happen. In
that case, cmd-K is your friend.
Yes, I can do that, thanks - but I'm looking for the equivalent
terminal command line to put in a shell script to automatically mount
shares at login.
Michael Vilain
2006-07-31 17:27:36 UTC
Permalink
Post by b***@gmail.com
Post by Jollino
I'm not sure how to do that, but maybe you can use cmd-K in the Finder
and give the samba share using the format "smb://server", which will
give you a list of the available share and the opportunity to
authenticate (should you need so).
You should also be able to find the remote machine inside the Finder's
"Network" window, but for some reason this doesn't always happen. In
that case, cmd-K is your friend.
Yes, I can do that, thanks - but I'm looking for the equivalent
terminal command line to put in a shell script to automatically mount
shares at login.
Don't think there is one. Have you ever noticed that Finder alias files
are just plain files, while soft and hard links create files that the
Finder sees.

This may be an area where the command line and Finder don't play well
together.

Have you asked this in the Apple Developer Forums or other places like

http://www.macosxhints.com/
http://osxfaq.com/
--
DeeDee, don't press that button! DeeDee! NO! Dee...
b***@gmail.com
2006-08-01 01:21:19 UTC
Permalink
Post by Michael Vilain
Don't think there is one. Have you ever noticed that Finder alias files
are just plain files, while soft and hard links create files that the
Finder sees.
This may be an area where the command line and Finder don't play well
together.
Have you asked this in the Apple Developer Forums or other places like
http://www.macosxhints.com/
http://osxfaq.com/
Thanks. I'm glad it's not just me! I may try the other forums.

Why do directories under '/Volumes' not show in the finder then?
Art Gorski
2006-08-01 13:43:55 UTC
Permalink
Post by b***@gmail.com
Yes, I can do that, thanks - but I'm looking for the equivalent
terminal command line to put in a shell script to automatically mount
shares at login.
Something like

osascript -e 'mount volume "cifs://yadda.yadda/"'

This assumes authentication is not required. You would need to insert
the username and password into the URL above and pass them in the clear
otherwise.
--
Art Gorski * Mac Integration Staff * Rice University * Houston, Texas
Remember to remove NOSPAM from address when replying via email
b***@gmail.com
2006-08-02 11:15:45 UTC
Permalink
Post by Art Gorski
Something like
osascript -e 'mount volume "cifs://yadda.yadda/"'
This assumes authentication is not required. You would need to insert
the username and password into the URL above and pass them in the clear
otherwise.
That mounts the share, and shows it on the desktop, but gives 700
permissions and sets the owner to the current user (root in this case,
as this will run from a loginhook)

Seems awfully roundabout, doesn't it. I'm just trying to have a central
logon script, with the user as a parameter, to give access and mount
various smb shares. I would have thought this was a frequent
requirement. Maybe I'm approaching it from the wrong angle?
Art Gorski
2006-08-02 14:02:10 UTC
Permalink
Post by b***@gmail.com
Post by Art Gorski
Something like
osascript -e 'mount volume "cifs://yadda.yadda/"'
This assumes authentication is not required. You would need to insert
the username and password into the URL above and pass them in the clear
otherwise.
That mounts the share, and shows it on the desktop, but gives 700
permissions and sets the owner to the current user (root in this case,
as this will run from a loginhook)
Seems awfully roundabout, doesn't it. I'm just trying to have a central
logon script, with the user as a parameter, to give access and mount
various smb shares. I would have thought this was a frequent
requirement. Maybe I'm approaching it from the wrong angle?
Typical users never use loginhook, or know it exists. The use of login
scripts in Mac OS X is rare, usually done by those thinking in *nix
terms. ;-)

Most use login items in their user account, done individually, not
globally. But since you are trying to administer the Mac for other
users, and doing this globally, I'd recommend searching the archives at
lists.apple.com, especially "client-management."
--
Art Gorski * Mac Integration Staff * Rice University * Houston, Texas
Remember to remove NOSPAM from address when replying via email
b***@gmail.com
2006-08-03 05:29:51 UTC
Permalink
Post by Art Gorski
Typical users never use loginhook, or know it exists. The use of login
scripts in Mac OS X is rare, usually done by those thinking in *nix
terms. ;-)
Most use login items in their user account, done individually, not
globally. But since you are trying to administer the Mac for other
users, and doing this globally, I'd recommend searching the archives at
lists.apple.com, especially "client-management."
Typical user - what's that? :-)

Thanks, Art. I'll have a look there.

Continue reading on narkive:
Search results for 'Command line mount smb shares not showing in Finder' (Questions and Answers)
14
replies
Creating a "Why we should switch to Mac" Speech. Help Please?
started 2007-10-26 15:44:14 UTC
desktops
Loading...