Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Login Script to Mount SMB Drive to Desktop
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="redbergy" data-source="post: 532335" data-attributes="member: 42016"><p>I guess I should have been more clear in my post. For some reason, I cannot use Go > Connect to Server... in the Finder options. I get some type of error to the effect of "You do not have permission to access this drive" - when I type in an incorrect login I get a different error saying "Bad username or password". I can connect to this samba server using Windows and other Linux machines. I can also connect using smb in the command line of my Mac and I can mount the drive using mount_smbfs but for some reason I can't do the easy Finder way.</p><p></p><p>This is why I am asking about a start up script since it seems the only way I can access this share is by typing in the command line. I have a basic script going below, however I would like it to remove the two directories it creates first at startup, determine whether I can mount the share, then if I can, recreate those folders (that way if I'm not at work, I won't see the empty folders on my desktop)... Below is my script (.command file set to run at login):</p><p></p><p>mkdir /Users/adam/Desktop/blxshare</p><p>mkdir /Users/adam/Desktop/blxweb</p><p>mount_smbfs //username<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick out tongue :p" loading="lazy" data-shortname=":p" />assword@192.168.1.216/blxshare /Users/adam/Desktop/blxshare</p><p>mount_smbfs //username<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick out tongue :p" loading="lazy" data-shortname=":p" />assword@192.168.1.216/blxweb /Users/adam/Desktop/blxweb</p><p>KillAll Terminal</p><p>exit</p><p></p><p>So, like I said, first, I need to add a rm /Users/adam/Desktop/blxshare, then I need some way to check and see if 192.168.1.216 exists, if so, recreate the folder and mount the SMB share.</p></blockquote><p></p>
[QUOTE="redbergy, post: 532335, member: 42016"] I guess I should have been more clear in my post. For some reason, I cannot use Go > Connect to Server... in the Finder options. I get some type of error to the effect of "You do not have permission to access this drive" - when I type in an incorrect login I get a different error saying "Bad username or password". I can connect to this samba server using Windows and other Linux machines. I can also connect using smb in the command line of my Mac and I can mount the drive using mount_smbfs but for some reason I can't do the easy Finder way. This is why I am asking about a start up script since it seems the only way I can access this share is by typing in the command line. I have a basic script going below, however I would like it to remove the two directories it creates first at startup, determine whether I can mount the share, then if I can, recreate those folders (that way if I'm not at work, I won't see the empty folders on my desktop)... Below is my script (.command file set to run at login): mkdir /Users/adam/Desktop/blxshare mkdir /Users/adam/Desktop/blxweb mount_smbfs //username:password@192.168.1.216/blxshare /Users/adam/Desktop/blxshare mount_smbfs //username:password@192.168.1.216/blxweb /Users/adam/Desktop/blxweb KillAll Terminal exit So, like I said, first, I need to add a rm /Users/adam/Desktop/blxshare, then I need some way to check and see if 192.168.1.216 exists, if so, recreate the folder and mount the SMB share. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Login Script to Mount SMB Drive to Desktop
Top