LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices


Reply
  Search this Thread
Old 08-27-2010, 01:21 AM   #16
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297

Quote:
Originally Posted by filterfann View Post
Here is what my profile looks like just in case

# Unison preferences file
root = Users/Developer2/Desktop/test.txt
root = ssh://Graphics3@192.168.1.54/Users/Graphics3/Desktop/test.txt
Hi,

I don't quite remember but if you connect to a remote server using SSH you get connected to the home directory of the user you are connecting as. So you should put for the second root statement:
Code:
root = ssh://Graphics3@192.168.1.54//Users/Graphics3/Desktop/test.txt
if Users is in the root (/) of your remote server. I just checked my config to verify. I run it as root, connect as root to the remote server and syncronise directories under /opt so I had to put //opt as the second root reference.

Maybe this causes also the disconnection since you try to synchronise a non-existing directory/file combination.

Also you can put:
Code:
log = true
logfile = /var/log/yourunison.log
in your profile so that everything gets logged, just to debug/troubleshoot.

Kind regards,

Eric
 
Old 08-27-2010, 01:23 AM   #17
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

A good manual for Unison can be found here. It's very complete.

Kind regards,

Eric
 
Old 09-09-2010, 03:24 PM   #18
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
Ok, I've got this syncing host files on the desktop by doing the following

sudo unison -ui text profilename

however, when I set up a profile to sync within /private/etc/ (host file) on my two Macs, it throws a permission denied and fails to sync the host files. Any idea how to get around this as I'm already in super user mode?

Last edited by filterfann; 09-09-2010 at 03:25 PM.
 
Old 09-09-2010, 11:59 PM   #19
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Again, I'm not familiar with Mac in any way, but I'm thinking about encryption. Is the 'private' directory in any way encrypted? Don't see any other reason for why it woun't work, since you're already in super user mode.

Kind regards,

Eric
 
Old 09-10-2010, 10:00 AM   #20
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
You can open the directory but it's hidden. You can view it's contents through a text editor or terminal. However, you can only modify in super user mode via terminal. They have a terminal based text editor called Pico. I'm almost positive it's a permissions issue. I just have no idea how to get around it.
 
Old 09-10-2010, 01:04 PM   #21
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
Ok I have some good news, and some bad news.

Good news is I fixed the permissions issue.

Bad news is, after doing a sync of host files, it somehow breaks the alias on my local host file rendering it non-functional. I had to grab my snow leopard disk to repair the host file.
 
Old 09-10-2010, 04:08 PM   #22
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

What do you mean that it 'breaks' the alias on your host file? Can you explain that a bit?

Kind regards,

Eric
 
Old 09-11-2010, 10:48 AM   #23
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
It's the Windows equivalent to a shortcut.

I'm not exactly sure why it turns that file into an alias however since that is the location of the host file itself but in any case it dumps everything out of the file and when I click on it I get a fix alias error dialog box. When I try to view it in a terminal based text editor the file is completely empty and when I attempt to save it says the file is missing.

This is strange because I can already ssh into the other machine and remotely run a terminal base text editor and update the host file myself. I don't understand why this isn't working right. Both files have read/write permissions.
 
Old 09-11-2010, 10:52 AM   #24
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

That's indeed a strange behavior, one I haven't come across yet. Maybe this from the Unison manual can help you:
Quote:
Symbolic Links

Ordinarily, Unison treats symbolic links in Unix replicas as “opaque”: it considers the contents of the link to be just the string specifying where the link points, and it will propagate changes in this string to the other replica.

It is sometimes useful to treat a symbolic link “transparently,” acting as though whatever it points to were physically in the replica at the point where the symbolic link appears. To tell Unison to treat a link in this manner, add a line of the form
follow = pathspec
to the profile, where pathspec is a path pattern as described in the Path Patterns section.

Windows file systems do not support symbolic links; Unison will refuse to propagate an opaque symbolic link from Unix to Windows and flag the path as erroneous. When a Unix replica is to be synchronized with a Windows system, all symbolic links should match either an ignore pattern or a follow pattern.
Kind regards,

Eric
 
Old 09-27-2010, 02:42 PM   #25
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
Ok, I got rid of the Unison software as it kept wiping out my host file. I did however find a solution that works perfect. Here it is.

tell application "Terminal"
do script "ssh Graphics3@192.168.1.54" in window 1
delay 3
do script "password" in window 1
delay 3
do script "sudo cp \"//Volumes//My X Server Drive//conf/hosts.txt\" /etc/hosts" in window 1
delay 3
do script "jdi123" in window 1
delay 3
do script "exit" in window 1
end tell

This AppleScript when ran will copy the new host file and paste it into the /etc directory. I can use CronTab to run these scripts automatically every 15 minutes. My question to you Eric now pertains to the Windows side of things.

What ssh client do you prefer for Windows? Also, what do I need to do as far as permissions go to copy the host file as Windows does not use sudo? I know of the admin account but XP doesn't have the user account control to elevate user privileges like Vista/7.

Thanks
 
Old 09-28-2010, 12:43 AM   #26
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by filterfann View Post
Ok, I got rid of the Unison software as it kept wiping out my host file. I did however find a solution that works perfect. Here it is.

tell application "Terminal"
do script "ssh Graphics3@192.168.1.54" in window 1
delay 3
do script "password" in window 1
delay 3
do script "sudo cp \"//Volumes//My X Server Drive//conf/hosts.txt\" /etc/hosts" in window 1
delay 3
do script "jdi123" in window 1
delay 3
do script "exit" in window 1
end tell

This AppleScript when ran will copy the new host file and paste it into the /etc directory. I can use CronTab to run these scripts automatically every 15 minutes. My question to you Eric now pertains to the Windows side of things.

What ssh client do you prefer for Windows? Also, what do I need to do as far as permissions go to copy the host file as Windows does not use sudo? I know of the admin account but XP doesn't have the user account control to elevate user privileges like Vista/7.

Thanks
Hello,

Glad to hear you got that part solved and sad to hear that Unison caused you problems. Has to be something typical to the OSX platform I think (or at least the version of Unison for that OS), at least I've never encountered that behaviour in Debian and/or RedHat.

I use SSH Secure Shell and Putty in combination with Putty Connection Manager.

Can you explain what exactly you need to know about the permissions? It's a bit unclear to me what you mean by that question.

Kind regards,

Eric
 
Old 09-29-2010, 11:11 AM   #27
filterfann
Member
 
Registered: Dec 2005
Posts: 61

Original Poster
Rep: Reputation: 15
I know Windows is strict on permissions. If I ssh in as admin, can I modify the host file without Windows throwing permissions denied messages? From what I'm familiar with, even though logged in as admin, Windows doesn't allow all admin privileges. I would have to log in to safe mode in order to have FULL admin rights. This is what I was after with the question. I hope this helps. I don't want to over complicate this as it is most likely not an issue.

Last edited by filterfann; 09-29-2010 at 11:15 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Resolving windows machines automatically. Palula Linux - Software 2 03-31-2008 02:51 PM
how to automatically synchronize files on different machines? parv Linux - Software 7 02-03-2007 10:31 AM
Need help setting up the Host & network files. hitbob Linux - Networking 4 08-22-2003 03:45 AM
Update network install files UKnewWho Linux - Newbie 0 08-10-2003 10:08 PM
Automatically mounting to other machines ankitgdit Linux - Security 1 08-08-2003 10:08 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration