I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem.
Is there a simple way to move the /home directory? And the non-system users in the password and group files?
Todd
On 9/1/05, Todd Cary todd@aristesoftware.com wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem.
I only have a few users on my machine. What I do is, use useradd or what not to create the users in the same order as the UID. Copy over the home dirs, moving the newlly created ones elsewhere. Then copy and paste the crypted password in the shadow file.
You could paste the users from /etc/passwd shadow and group if you have a lot of users instead of creating the accounts.
Dave -
I am curious what is done in an environment with many users.
Todd
Dave wrote:
On 9/1/05, Todd Cary todd@aristesoftware.com wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem.
I only have a few users on my machine. What I do is, use useradd or what not to create the users in the same order as the UID. Copy over the home dirs, moving the newlly created ones elsewhere. Then copy and paste the crypted password in the shadow file.
You could paste the users from /etc/passwd shadow and group if you have a lot of users instead of creating the accounts. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I've been playing with the LVM snapshot feature under Centos 4.4 and it looks great! I've read about creating a "Volume shadow Copy" feature on Linux that is similar to the Win2k3 Shadow Copy feature. I have several clients who like this feature and see it as a reason to keep the MS product. I'd like to offer them a true alternative.
I've searched high and low on Google and the best I can find are incomplete instructions on how to create the "Shadow Copy" feature on samba. Samba.org has VLM instructions but incomplete instructions for any kind of Shadow Copy functionality.
I have the snapshop feature working great. However, I'm looking for exactly how to setup everything so that I can rotate the snapshots like MS does with VSC so users can restore files and folders using Windows XP.
Is anyone doing this already? I would love to know more.
Thanks. Scott
On Thu, 2005-09-01 at 15:06 -0700, Todd Cary wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem. Is there a simple way to move the /home directory? And the non-system users in the password and group files?
Yes, It's called NIS and NFS. It makes it extremely easy and painless.
It may seem like I'm suggesting more work, but once you do it once your network, you will never do it again. Even if you leave NIS and NFS disabled, once you set them up, you can always start the services.
With NIS, merely setup your current server as an NIS master. Reference the HOWTO (see TLDP.org). Now setup the new server as a slave. The maps get pushed and now you have a copy of all essential UNIX configuration files necessary (passwd, hosts, services, etc...). Merely cat >> the maps into the new server's files and make it the master.
With NFS, just export /home from the old server with "no_root_squash" for the new server IP, and mount it on the new one. Now you can move (mv) things directly over from one /home to another.
Bryan -
As you do doubt call tell, Linux/UNIX is not my area of expertise resulting in some basic questions. Using the designations of Master and Slave, my Master and Slave have two different versions of RH software: RH 9 and Centos 4.1. The Slave has it's own set of Services: HTTP, FTP and Samba along with other supporting Services.
Will this create a problem?
Todd
Bryan J. Smith wrote:
On Thu, 2005-09-01 at 15:06 -0700, Todd Cary wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem. Is there a simple way to move the /home directory? And the non-system users in the password and group files?
Yes, It's called NIS and NFS. It makes it extremely easy and painless.
It may seem like I'm suggesting more work, but once you do it once your network, you will never do it again. Even if you leave NIS and NFS disabled, once you set them up, you can always start the services.
With NIS, merely setup your current server as an NIS master. Reference the HOWTO (see TLDP.org). Now setup the new server as a slave. The maps get pushed and now you have a copy of all essential UNIX configuration files necessary (passwd, hosts, services, etc...). Merely cat >> the maps into the new server's files and make it the master.
With NFS, just export /home from the old server with "no_root_squash" for the new server IP, and mount it on the new one. Now you can move (mv) things directly over from one /home to another.
No you shouldn't have a problem as such, I think that you can do the LDAP bitty without issues, now NIS is a different beast altogther.
AD
On Fri, 2 Sep 2005, Todd Cary wrote:
Bryan -
As you do doubt call tell, Linux/UNIX is not my area of expertise resulting in some basic questions. Using the designations of Master and Slave, my Master and Slave have two different versions of RH software: RH 9 and Centos 4.1. The Slave has it's own set of Services: HTTP, FTP and Samba along with other supporting Services.
Will this create a problem?
Todd
Bryan J. Smith wrote:
On Thu, 2005-09-01 at 15:06 -0700, Todd Cary wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem. Is there a simple way to move the /home directory? And the non-system users in the password and group files?
Yes, It's called NIS and NFS. It makes it extremely easy and painless.
It may seem like I'm suggesting more work, but once you do it once your network, you will never do it again. Even if you leave NIS and NFS disabled, once you set them up, you can always start the services.
With NIS, merely setup your current server as an NIS master. Reference the HOWTO (see TLDP.org). Now setup the new server as a slave. The maps get pushed and now you have a copy of all essential UNIX configuration files necessary (passwd, hosts, services, etc...). Merely cat >> the maps into the new server's files and make it the master.
With NFS, just export /home from the old server with "no_root_squash" for the new server IP, and mount it on the new one. Now you can move (mv) things directly over from one /home to another.
On Fri, 2005-09-02 at 06:36 -0700, Todd Cary wrote:
Bryan - As you do doubt call tell, Linux/UNIX is not my area of expertise resulting in some basic questions. Using the designations of Master and Slave, my Master and Slave have two different versions of RH software: RH 9 and Centos 4.1. The Slave has it's own set of Services: HTTP, FTP and Samba along with other supporting Services. Will this create a problem?
Nope. The Remote Procedure Call (RPC) services do not conflict with any of those. In fact, NFS and Samba work together without issue on the same files, including kernel-level locking between the two.
Hello,
I would suggest LDAP as NIS/NIS+ are slowly dying out in favour of LDAP. You can use something like FDS or OpenLDAP to accomplish this, PADL has some migration scripts for this to happen. The site, http://directory.fedora.redhat.com has some more information about this under the howto's especially the Posix one.
Cheers,
Aly.
On Thu, 1 Sep 2005, Bryan J. Smith wrote:
On Thu, 2005-09-01 at 15:06 -0700, Todd Cary wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem. Is there a simple way to move the /home directory? And the non-system users in the password and group files?
Yes, It's called NIS and NFS. It makes it extremely easy and painless.
It may seem like I'm suggesting more work, but once you do it once your network, you will never do it again. Even if you leave NIS and NFS disabled, once you set them up, you can always start the services.
With NIS, merely setup your current server as an NIS master. Reference the HOWTO (see TLDP.org). Now setup the new server as a slave. The maps get pushed and now you have a copy of all essential UNIX configuration files necessary (passwd, hosts, services, etc...). Merely cat >> the maps into the new server's files and make it the master.
With NFS, just export /home from the old server with "no_root_squash" for the new server IP, and mount it on the new one. Now you can move (mv) things directly over from one /home to another.
On Fri, 2005-09-02 at 08:34 -0600, aly.dharshi@telus.net wrote:
Hello, I would suggest LDAP as NIS/NIS+ are slowly dying out in favour of LDAP.
My point started with ... "It makes it extremely easy and painless."
In other words, it would take _less_ effort to setup than to manually figure out what files, copy them over, etc...
I love LDAP, and now that Netscape Directory Server is now Fedora Directory Server, yes, for the long haul, it's great.
You can use something like FDS or OpenLDAP to accomplish this, PADL has some migration scripts for this to happen. The site, http://directory.fedora.redhat.com has some more information about this under the howto's especially the Posix one.
Yes, I use the PADL tools all-the-time. But the endeavor to setup LDAP and everything else gets involved.
Whereas you can setup the current server as an NIS server, run "Makefile" in /var/yp and bam! You're done.
Bryan -
Sounds like it is time to break out the books....
And this sounds like NIS will work in some capacity for backups...right?
Todd
Bryan J. Smith wrote:
On Fri, 2005-09-02 at 08:34 -0600, aly.dharshi@telus.net wrote:
Hello, I would suggest LDAP as NIS/NIS+ are slowly dying out in favour of LDAP.
My point started with ... "It makes it extremely easy and painless."
In other words, it would take _less_ effort to setup than to manually figure out what files, copy them over, etc...
I love LDAP, and now that Netscape Directory Server is now Fedora Directory Server, yes, for the long haul, it's great.
You can use something like FDS or OpenLDAP to accomplish this, PADL has some migration scripts for this to happen. The site, http://directory.fedora.redhat.com has some more information about this under the howto's especially the Posix one.
Yes, I use the PADL tools all-the-time. But the endeavor to setup LDAP and everything else gets involved.
Whereas you can setup the current server as an NIS server, run "Makefile" in /var/yp and bam! You're done.
On Fri, 2005-09-02 at 13:38 -0700, Todd Cary wrote:
Bryan - Sounds like it is time to break out the books....
Nah, not even that: http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/NIS-HO...
Again, I suggested NIS because it uses your _existing_ /etc/hosts, /etc/passwd, etc... files. You literally just setup the Makefile on what UID/GID to start with, and everything else is turned into NIS maps.
And this sounds like NIS will work in some capacity for backups...right?
NIS can push to a slave server which services in its absence (or even for load considerations), yes.
LDAP is definitely better when you have a large network and aren't interested in just taking existing files.
Is there a rpm that can be installed via yum for nis? In reading the HOWTO, some of the referred to components are present, yet others are not.
Also, the port mapper is not running and I am not sure what man page addresses that.
Any help/suggestions are appreciated.
Todd
Bryan J. Smith wrote:
On Fri, 2005-09-02 at 08:34 -0600, aly.dharshi@telus.net wrote:
Hello, I would suggest LDAP as NIS/NIS+ are slowly dying out in favour of LDAP.
My point started with ... "It makes it extremely easy and painless."
In other words, it would take _less_ effort to setup than to manually figure out what files, copy them over, etc...
I love LDAP, and now that Netscape Directory Server is now Fedora Directory Server, yes, for the long haul, it's great.
You can use something like FDS or OpenLDAP to accomplish this, PADL has some migration scripts for this to happen. The site, http://directory.fedora.redhat.com has some more information about this under the howto's especially the Posix one.
Yes, I use the PADL tools all-the-time. But the endeavor to setup LDAP and everything else gets involved.
Whereas you can setup the current server as an NIS server, run "Makefile" in /var/yp and bam! You're done.
On Fri, Sep 02, 2005 at 07:23:56PM -0700, Todd Cary enlightened us:
Is there a rpm that can be installed via yum for nis? In reading the HOWTO, some of the referred to components are present, yet others are not.
Also, the port mapper is not running and I am not sure what man page addresses that.
Any help/suggestions are appreciated.
You're looking for the yp* packages (Yellow Pages, changed to NIS to avoid legal issues :-)
$ yum list "yp*" yp-tools.x86_64 2.8-7 base ypbind.x86_64 3:1.17.2-3 base ypserv.x86_64 2.13-5 base
Matt
On Thu, 2005-09-01 at 15:06 -0700, Todd Cary wrote:
I have a new Centos installation that has an empty /home dir and there are no users...just root. I want to move the home directory from another server to the new one. At this time the old /home directory has been tarred with "-prf". That will keep permissions which could be a problem.
How big is this file? -z would have also compressed it. Alternately, see below.
Is there a simple way to move the /home directory? And the non-system users in the password and group files?
1. sort and extract the non-system users/groups from the respective /etc files passwd/shadow/group. scp the delta files to new system and append them to the respective files there. 2. scp/rsync /home/ (from old system) to /home (new system) see man scp/rsync. Note options for compression and sym links. 3. Ensure file/dir ownership at /home. If need be use "chown -R <userid>: on <userid>/"
The above is off the cuff :)
HTH, -- Arun Khan (knura at yahoo dot com) If you're going to do something tonight that you'll be sorry for tomorrow morning, sleep late. -- Henny Youngman