Trying to write an application to mount Windows Share in osx

Hello,
I am very new to the osx environment and I was hoping someone could point me in the right direction. I have a decent amount of programming experience in windows environment, but absolutely no experience writing apps for osx. I would like to write an application that users can launch, enter their credentials and connect to a windows share which I have already designated for them. I can easily do this in automator, however I was hoping to create something where there is a little less confusion. I haven't had any luck finding any resources on this topic and I was hoping someone could give me a little guidance. thanks for your time.

I managed to make it work.
I did entry as below in /etc/fstab
//192.168.1.1/RHEL5 /mnt/win cifs credentials=/etc/
smbcred 0 0
run
mount -a
/etc/smbcred file contains username and password
now it is mounted as read write mode.
~

Similar Messages

  • I have one paid mobileme account, few days ago I have done transition to iCloud and all my iDisk, contact... gone. Today I tried login to iCloud application on my windows pc but can not, it said "this apple id is valid but is not iCloud account"

    I have one paid mobileme account, few days ago I have done transition to iCloud and all my iDisk, contact... gone. Today I tried login to iCloud application on my windows pc (64bit) but I can not, it said "this apple id is valid but is not iCloud account". I can login on website icloud.com but can not login into iCloud application installed on pc. What's wrong?
    I have tried another free apple ID and logged on. That's funny when I can login with free account and can not login with paid mobileme account!!!!!!

    By the way - the only reason I downloaded iCloud is because Apple deleted the backup option from iTunes.  Since iCloud doesn't work, I guess we have no way to protect our iTunes music collection.  Absolutely stupid.

  • Applescript for mounting Windows Shares

    I have scoured the web for this script for mounting windows shares in OS X. I am compiling it as an application and dropping it into the startup items:
    tell application "Finder"
    activate
    try
    mount volume "cifs://SERVER/SHARE"
    end try
    end tell
    My question is this: I have a MacBook(Pro) and use it at home and at work... I have scripts setup for both locations, to mount various shares, but when I'm at home and the work scripts run, they fail to mount (because I'm not on the work network), or when I'm at home, the work shares fail to mount, generating a dialog with something to the effect of "couldn't find that share"... I've got a dozen of these scripts, it would be nice if it would just silently fail, rather then generating multiple dialogs.
    I was thinking of making the apple script check my ip address, and if it returns a work IP address, then it would go onto talking to the finder, if it doesn't find a matching IP address, then it would just end.
    Or, somehow have applescript ping the server that it's trying to connect to, and on success, run the script, and on fail just end it.
    Any thoughts?
    Thanks,
    Dan Ormsby

    You should probably post in the AppleScript forums:
    http://discussions.apple.com/forum.jspa?forumID=724

  • CFB trying to write to application dir

    G'day
    I'm just trying to troubleshoot why CFB completely locks up every coupla hours, and just saw this in my workspace log:
    Exception saving preferences to: C:/Program Files (x86)/Adobe/Adobe ColdFusion Builder 2/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.ec lipse.equinox.p2.metadata.repository.prefs.
    What the hell is CFB trying to write preferences to my application dir?  It should not be writing files there.  Well: especially given I'm not an adminstrator of this machine, I specically can't write files there.  But CFB should not be putting config stuff in the application dir in the first place.  It should be writing to the workspace dir.
    Is this a cock-up in my install, or a cock-up in CFB?
    Adam

    It seems to me that your nickname from the iTunes Store on a computer does not necessarily carry over to the App Store on the iPad.
    So I suggest simply re-entering your nickname.  Surely there is no harm in doing that.

  • Can't Mount Windows Partition in OSX After Upgrading to 10.5 and BC 2.0

    I just installed Leopard today, using the upgrade option (as opposed to a clean install). I was happy to see that I could boot into Windows still, and installed all of the Boot Camp 2.0 drivers while booted into Vista. However, I can no longer mount my Windows partition in OSX. While using Tiger, I did use MacFuse and ntfs-3g to get read-write support, but in Leopard, I can't even read. When I try to mount the Windows volume in Disk Utility, I get an error stating that it cannot be mounted. I also do not have the option to perform "First Aid" or "Repair" on the volume.
    I realize that the latest version of ntfs-3g isn't proven to work with Leopard, but I would at least like read access in OSX. Is it possible that some settings were left over from my Tiger configuration that would not allow Leopard to mount the partition? Any ideas?
    Thank you.

    Ok. I'm in the club with the same problem...
    Strange things:
    * For the first days after Leopard's install, my BootCamp disk0s3 partition (I'll name it "BillGates") was mounted correctly. Then, after a few days (but BEFORE upgrading to 10.5.1), it disappeared.
    * If I launch DiskUtility "BillGates" is shown, but (in the right device navigation bar) it's named "-n BillGates". If I click the Erase menu, it's named "-nBillGates" (without the space between "-n" and "BillGates"). If I launch SystemProfiler it's named "-n BillGates", but the mount point is "/Volumes/billgates". Can't understand where this "-n" thing is coming from!
    * If I try to mount "-n BillGates" from DiskUtility it doesn't work and the log says "Mount of -n BillGates failed".
    * In the FSTAB there were no instructions: it was empty.
    Now, I tried the MacFUSE-solution: no results (meaning BillGates was not mounted on startup).
    I tried the modify-the-FSTAB-solution: no results (with "BillGates", "-n BillGates" nor "-nBillGates".
    I tried the chkdsk-solution: all tests were ok, but nothing happened.
    The only trick that worked was mounting the partition with Terminal's commands (thanks rtracy!!). It made appear "BillGates" on the desktop (without the "-n thing", that is still present in DiskUtility).
    Problem is at the first reboot, the Boot Camp partition disappears again. Any ideas for a permanent fix?!
    Giangiacomo.
    ADDENDUM: I've tried to move a file from desktop to an unlocked folder in BillGates and System did not copy them. "The item could not be moved because "BillGates" cannot be modified" !!!!!!!!
    Message was edited by: Giangiacomo Castelfranchi1

  • Samba mounting windows share

    Hi, I'm trying to mount a windows share but all I can do after mounting is seeing the folders and files on the share. I can not read any file, I get "permission denied". On windows everything should be set to allow for the files to be read (if my brother didn't forget, overlooked anything). I even disabled the windows firewall.
    The windows 2000 computer can access the arch linux samba shares without a problem.
    I'm running arch current up to date.
    Here's how I mount, as root:
    mount -t smbfs -o username=gast,password=gast //192.168.0.132/Muziek /mnt/LW/Muziek/
    (gets mounted succesfully, but I can't read the files)
    Here's my /etc/samba/smb.conf:
    #Global Parameters
    [global]
    workgroup = THUIS
    netbios name = gel
    passdb backend = smbpasswd
    force create mode = 0770
    force directory mode = 0770
    wins support = yes
    case sensitive = no
    encrypt passwords = yes
    security = share
    server string = Linux                 
    [share]
    path = /mnt/hda1
    public = yes
    only guest = yes
    writable = no
    printable = no
    create mask = 777
    Can anyone help me out? I've been trying to get it working for at least a few hours :s.

    You are right. I did not need the dir_mode and file_mode, and I did have full control enable, but no dice.
    However it seems there is a folder aliasing feature, that was introduced in windows vista (though I don't recall the windows name for the feature and I am running win7), I believe to be the problem. For example, if I share and mount  C:\Users I have access to C:\Users\myuser and can create folders and documents there. However the predefined folders Music, Documents, Pictures I have no write permission inside of.
    Next if I share and mount C:\Users\myuser I have the same result for those folders however now I can see additional folders  one is 'My Documents' in this folder I have write access and changes are mapped back to the Documents Folder. Additionally there are now showing in the Documents folder, I had no write access to, additional folders which also weren't showing before 'My Music', 'My Pictures', and 'My Videos' in which I now have write access and they map back as well.
    When I connected to the shares from an XP machine I could simply access the original folders.

  • Finder can't access a mounted windows share - but the Terminal can...

    When I mount a drive using the finder's "Go / Connect to Server..." command I can choose the share to connect to and Finder mounts the share, puts it on the desktop etc... but then it tells me that:
    "The folder “Sharename” can’t be opened because you don't have permission to see its contents."
    Any attempt to access the folder through the finder will result in the same error message.
    Since the share does otherwise mount sucessfully, it shows up in /Volumes/ and using the terminal I can access the contents of the drive and open files. Applications, both terminal and GUI can read and save to files and folders opened in this way, but the GUI application cannot find the path again if you browse away in the app's browsable dialog boxes (like Save or Open). I can access any file using an absolute path in any program.
    There are more nuances to this behaviour:
    Other shares hosted by the same server don't have this problem.
    Using the terminal, I appear to have the same Unix permissions to the files and folders on the shares that work as the ones that don't work.
    Using Finder's "Go to Folder..." command I can open some, but not all folders in the flaky sharepoint mounts. All files seem to work though.
    My guess is that there are some permissions that are making Finder unhappy, but I'm not sure what they might be. But regardless, why then can I access everything from the Terminal? I'd like to use the Finder - it makes my experience much smoother!
    Some other people in this forum seem to have had the same problem with their NAS drives, but I don't think anyone has yet suggested they try accessing it via the terminal. It would be really helpful if anyone could confirm this Finder/Terminal discrepant behaviour.
    Any thoughts?

    I am having the same problem but with OS X 10.9 (Mavericks).
    I try to connect to the NAS via the Go / Connect to Server utilizing smb or cifs protocols and it will mount but then I can't enter the mounted drives/directories with finder.
    The workaround for forcing smb1 has been applied and I find that Finder would not permit me to enter those mounted directories but I can go via the command line and work fine. The  only issue is that with a Mac, as much as everybody say, you should not need to go to the command line... Yeah, right.
    For the amount of money that I paid for the Mac Book Pro, it should work. So, now I can confirm that even Mac OS X can be as bad as Windows...
    Any idea when will Apple put out a fix or an update to finder?

  • Mount windows share in linux

    How can i mount a windows share in read-write mode from my linux system
    I am able to mount in readonly mode as below even though i mentioned rw in that.
    mount -t cifs -o username=administrator,password=adminpass,rw,0,0 //192.168.1.1/RHEL5 /mnt/win
    This post is related to Re: backup strategy

    I managed to make it work.
    I did entry as below in /etc/fstab
    //192.168.1.1/RHEL5 /mnt/win cifs credentials=/etc/
    smbcred 0 0
    run
    mount -a
    /etc/smbcred file contains username and password
    now it is mounted as read write mode.
    ~

  • [Solved] Mounting Windows Share

    Well what a 2nd post this is!
    I've just spent forever trying not to have to post for help but its time i do.
    I'm trying to mount a windows share on bootup in autostart.sh so that mpd doesn't die via not being able to find the tunes.
    It seams you HAVE to be root to do this. Yes sudo will work but you don't get a password prompt.
    I've only found one useful thread from google but these solutions don't seam to work for me http://bbs.archlinux.org/viewtopic.php?pid=272495
    [dan@z0r ~]$ mount /mnt/shares/tank_d
    mount: only root can mount //10.1.1.69/d$ on /mnt/shares/tank_d
    Last edited by DanWA (2008-12-14 06:54:35)

    Don't try and mount it at GUI start, mount it with all the other drives when your system starts. Put it in your /etc/fstab file so that it mounts at system boot - no password required.
    Something similar to below. See the fstab link for exact details:
    /dev/xxxx /mnt/shares/tank_d ntfs auto,user,rw 0 0
    Bob
    Last edited by Hrod beraht (2008-12-13 15:53:39)

  • Auto-mounting Windows shares at login?

    When I bring my PowerBook to work, there are five different Windows shares I need to connect to in order to access all my files. I've added the shares to my Login Items under my account in System Preferences, so they connect automatically every time I log in.
    The only problem is that this opens a separate Finder window for each connection. I'd like to just have it connect to the shares in the background without opening any new windows. Is there any way to do this? I tried checking the "hide" checkbox in Login Items, but it didn't make a difference.

    I discovered a better solution - if you make an Automator action (get specified servers > connect to servers), it won't open any new Finder windows.
    So I created the action, filled it in with the 5 servers I need to connect to, saved it as an application, and added it to my login items. Now when I log in, I just get a dialog for each server asking for my username/password, and it connects to each in the background without opening any windows.

  • Lost a lot of files during move to a mounted Windows share via SMB

    Hi,
    after mounting a network Windows share via SMB and then using the Finder to move files from my local disk to that share all the files that were to be moved are lost in ****. I am totally upset because these were very important files. What is it that drives 10.5.2 nuts here? Has anybody any ideas?

    Look in \Music\iTunes\iTunes media\ (or \iTunes music\).

  • [SOLVED] mounted windows shares from fstab dont stay mounted

    i have windows shares mounted through fstab and when i first boot up, they are mounted fine, but after a certain amount of time (not sure how long it takes) they disappear and it hangs thunar (oh yeah, using xfce) and i have to reboot to get them back. running mount -a doesnt bring them back
    line from fstab
    //charger/share /home/user/Documents cifs rw,uid=1000,gid=1000,file_mode=0700,dir_mode=0700,credentials=/home/credfile 0 0
    daemons line from rc.conf
    DAEMONS=(hwclock syslog-ng hal network netfs samba @alsa crond)
    Last edited by dodgefan (2011-08-03 20:01:44)

    thanks anyway, figured it out, installed autofs and setup everything to mount to /media and made links to my home folder

  • I get "ordinal 5 (and at times 18) is not found when trying to start the application? Using windows Vista Business.

    when starting the application I get the following message "ordinal 5 ( and at times 18) can not be found in the dynamic link libray" I'm using a Lenovo x300 with "Vista Business"

    Have you tried to put the Main-Class under a package (e.g. move LaunchSimulator to org.jyothi.sunke.LaunchSimulator or something)? I'm not sure but it's possible that Main-Class can't be located in the "root package", because the JAR launcher can't address it.
    Always put your stuff in a package, otherwise it can't be addressed by other packaged classes.
    - Erik

  • Running applications and mounting network shares are system boot...

    I have found plenty of User boot tricks for OSX. I am looking for the correct and best way to do 2 things.
    1. I want to run Aptana (a OSX application) which is the bootstrap for the service. Right now I have to manually start the service after rebooting. Where would one start.
    2. I want my server to mount a smb share on startup, I do NOT need boot time access.
    Any help and/or links would be awesome. Google is failing me.

    An applescript application set as a user login item should be a better choice.
    I'm just about to work this out for an SMB mount of a users Windows home (augmented AFP homes are breaking preventing the 'Mount UNC path' option in the AD plugin).
    Post back if you still want info.
    D

  • How to mount windows share as a drive letter?

    I have a user that has interlinking excel spreadsheets that are located on a network share. Spreadsheet A on K: links to Spreadsheet B on K:. The links in excel are defined as K:\adirectory\spreadsheetb.xls...
    How do I mount a drive on a Mac, such that MacOffice will be able to follow the links?

    *"How do I mount a drive on a Mac, such that MacOffice will be able to follow the links?*
    Sorry, but you don't, at least not in that sense, as Macs don't follow Windows drive letters.
    The user will have to mount the same share on the Mac desktop and link to it via standard SMB links an hope that the links translate server for server and share for share.

Maybe you are looking for

  • ITunes Version 6 and Quicktime version 7.0.3

    I am able to run the install for iTunes + Quicktime from the site and when I save it on the hardrive. I'm on a PC running Windows XP. The portion that installs iTunes seems to go through fine, but once the installation for Quicktime is done I get an

  • How do I change settings for opening/saving documents from web?

    I have an iMac running OS X 10.5.8 and Firefox 3.6.3. When I try to open a document (pdf) from a website, the dialog box only gives a save option with drop down for location. I'm used to a dialog box with open and save options. Open then offers the a

  • Split elements at paragraph breaks

    Using FM 8.0p277 on Windows XP. I have a structured document with some content copied from unstructured documents and pasted into the structure. Inside some elements, there are paragraph breaks that do not coincide with the end of an element, for exa

  • How does one delete events?

    How can events be totally deleted from a calendar?

  • RFQ & PR NO in PO

    Hi Gurus, I'm a functional guy and I'm preparing FD for PO Samrt Form printing.My client wants RFQ NO,  and PR NO in PO Printing header level. There are two possibilities a) Reference to a PR number RFQ has been created and PO has been created refere