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 ...
- 11-21-2006 #1Just 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.
- 11-22-2006 #2Linux 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
- 11-23-2006 #3Just 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:
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.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"
As per the above linked article, I have tried:
but when I click it nothing happens at all, and when I run it from console as user I just get "permission denied".Code:chmod 4711 vvpro.sh
Any suggestions? The less I have to log in as root the better.
- 11-23-2006 #4Linux 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
- 11-23-2006 #5Just 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.


Reply With Quote