Koozali.org: home of the SME Server

Copy just users from one 7 box to another

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
Copy just users from one 7 box to another
« on: August 25, 2006, 07:51:57 AM »
Hi
I want to copy all the users data and their account info from one sme 7 box to another. Dont want a full backup restore scenario - just users.

Presumably I copy users directories,  etc/passwd, etc/groups, etc/shadow and what else??

and yes I have spent an hour searching.....

cheers

Mark

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Copy just users from one 7 box to another
« Reply #1 on: August 25, 2006, 08:35:45 AM »
hello,

i think you want tht your users and groups be the same on the two boxes.
It could be a great thing  to me.


so here what i suggest more:

/home/e-smith/db/accounts

and i suggest you to copy too (even if you don't copy what is inside)
/home/e-smith/files/ibays/*/html
/home/e-smith/files/ibays/*/files
/home/e-smith/files/ibays/*/cgi-bin
/home/e-smith/files/ibays/*/.AppleDesktop

/home/e-smith/files/users/*/home
/home/e-smith/files/users/*/Maildir
/home/e-smith/files/users/*/.ssh

I suggest this avoiding errors.

I think this would be a great step.

Offline kmccarn

  • ****
  • 112
  • +0/-0
Copy just users from one 7 box to another
« Reply #2 on: August 25, 2006, 11:17:06 AM »
Sounds like a job for Lazy Admin Tools.....

  :-D
Kevin in WV 8-)......

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
Copy just users from one 7 box to another
« Reply #3 on: August 26, 2006, 01:20:34 AM »
Thank you for your answers

I was missing the /home/e-smith/db/accounts file
when I copied that as well as the other files it allows me to mirror the users on a backup server (email is all I am after and webmail/pop works fine)

thanks again


Mark

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Copy just users from one 7 box to another
« Reply #4 on: August 26, 2006, 11:47:16 PM »
sounds great !

can you tell exactly what files you choose to mirror, just in case somebody tries to do the same thing.

Is it this:

/home/e-smith/db/accounts
/etc/group
/etc/group-
/etc/gshadow
/etc/gshadow-
/etc/shadow
/etc/gshadow-

+ ibays and users home directory ?

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
Copy just users from one 7 box to another
« Reply #5 on: August 26, 2006, 11:59:44 PM »
as you list plus /etc/passwd and  /etc/passwd-
(I dont think the *- files are needed but it can't hurt)

I am primarily interested in mirroring email accounts (backup email server) but the ibays worked fine as well after I expanded the /etc/samba/smb.conf file and restarted smb

cheers

Mark

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Copy just users from one 7 box to another
« Reply #6 on: August 28, 2006, 09:09:47 PM »
OK, i have 2 sme, in one i have email accounts, an in the second i want the same accounts but to use it as domain controler an ftp server.
So i need tha same users with the same password in the 2 servers all the time, copy there files am i having my wish setup?
if i dont want the same ibays in both of them? thats will be reason of erros?
i dont want the same emails in the box of each user, in fact in the dc i dont want any mail. So if i dont copy the folder of each user, i will have problems?
thks

Offline mark

  • **
  • 34
  • +0/-0
    • http://webcoda.com
Copy just users from one 7 box to another
« Reply #7 on: August 28, 2006, 09:59:39 PM »
Hi lucho115

based on my very limited experience I would think that while you could write some scripts to merge the relevant bits of the needed files that in practice it would be a nightmare.

I am basically mirroring the users and data from one box to another and it seems to be working fine but to try and mix and match bits and pieces of both boxes be difficult because the ibay information is in the same files as user information (/home/e-smith/db/accounts, /etc/passwd, /etc/group, /etc/shadow, /etc/gshadow).

BTW I forgot that you have to copy /home/e-smith/db/domains as well

does anyone know what commands I should run after copying?

cheers

Mark

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Copy just users from one 7 box to another
« Reply #8 on: August 31, 2006, 02:55:21 PM »
ok, i add to your question:
does anyone know what commands I should run after copying?

frond

Copy just users from one 7 box to another
« Reply #9 on: August 31, 2006, 03:40:46 PM »
lucho115

signal-event post-upgrade
signal-event reboot

or you can just select the Reconfigure option in server manager Shutdown/Reconfigure/Reboot panel

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Copy just users from one 7 box to another
« Reply #10 on: August 31, 2006, 05:03:25 PM »
ok, so i can do a sync every nigth and reset the slave server.
But thats not a real time sync , in fact its a day time, jeje, Sounds like backup server , using the rigth backup setting this backup server is redundant , i win only the time thats spend a fresh install of sme , about 40 min, thats ridiculous.
SO somebody could make a real time sync of sme servers, or at least almost real time sync , like 15 min or 1 hr at most.
thks

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Copy just users from one 7 box to another
« Reply #11 on: September 07, 2006, 01:55:14 PM »
somebody can help me?