Find the answer to your Linux question:
Results 1 to 5 of 5
I have been looking at ways to synchronise files between a local folder on my desktop and a network folder on a Win2K machine, without installing any software on the ...
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    94

    A couple of questions...

    I have been looking at ways to synchronise files between a local folder on my desktop and a network folder on a Win2K machine, without installing any software on the remote machine. I used to use a program called Vice Versa Pro, but that was when I ran WinXP on my desktop.

    Anyway, I have found and installed a program called Unison, which pretty much does what I want it to do. I mount the remote shared drive as a folder on my desktop using:

    mount -t smbfs //Server/Server /home/kieren/Desktop/Server -o username=jdoe,password=ABC123

    and then run Unison as if it's backing up files locally.

    What I'd like to know is:

    1- How can I set my machine up so that the network file is mounted on bootup? I also notice it must be run as root, which I'm not sure how to automate either.

    2-I currently access Unison through Kmenu > tools > sync > Unison, but it can't write to the mounted network drive without running as root. How can I either set things up so it runs as root by default, or run it as root when I need to?

    Any info is much appreciated.

  2. #2
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    On my work systems I have many samba shares that automount on boot. Just google around for howtos on samba and fstab.

    The following is pretty functional, just remember that alot of the values are variable and you will have to do some manual tweaking.

    http://www.cyberciti.biz/faq/configu...with-etcfstab/
    Operating System: GNU Emacs

  3. #3
    Just Joined!
    Join Date
    Aug 2006
    Posts
    94
    Ok thanks. I am still struggling a little to get that to work. I will do some more investigations.

    In the meantime I'm trying to set up the samba share and the program execution via a script file that can be run by a user, but has root priveliges when it runs, as per this guide. But it doesn't seem to work. The file is called vvpro.sh and contains the code:

    Code:
    #1/bin/sh
    mount -t smbfs //Server/Server /home/kieren/Desktop/Server -o username=myusername,password=mypassword
    wine "/home/kieren/.wine/drive_c/Program Files/ViceVersa Pro/ViceVersa.exe"
    The file works fine when executed by root, so all I have to do is be able to run it as a user and I won't have to log in as root at all.

    As per the above linked article, I have tried:
    Code:
    chmod 4711 vvpro.sh
    but when I click it nothing happens at all, and when I run it from console as user I just get "permission denied".

    Any suggestions? The less I have to log in as root the better.

  4. #4
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    can you put your user in the wheel group, and edit /etc/sudoers to allow him sudo access without password, then add sudo to the script? Not sure...
    Operating System: GNU Emacs

  5. #5
    Just Joined!
    Join Date
    Aug 2006
    Posts
    94
    That certainly sounds like something I could do. What is the wheel group, and are there any security issues envolved by running as a user with sudo privileges?

    Whilst I think of it, is there any way to pass the current username and password into the script, without having them typed in permenantly for all to see? Not that I have major security issues in my household, but it seems bad practise to have my server's username and password in black and white in a text file. It would be nice for the script to pass on the details of whomever is logged on at the time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...