The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP - To handle error while transferring files mahalakshmi Shell Programming and Scripting 1 04-04-2007 03:56 AM
Transferring hidden files with scp matrixmadhan UNIX for Dummies Questions & Answers 13 01-16-2007 04:00 PM
transferring files using ftp but mantaining the dates 435 Gavea Shell Programming and Scripting 4 07-23-2006 11:48 AM
transferring files to and from remote computer yogi1 UNIX for Dummies Questions & Answers 6 05-28-2006 09:58 PM
Transferring data to a windows environment using ftp ccs8217 IP Networking 3 04-20-2002 05:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-20-2005
maybemedic maybemedic is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 8
Transferring users between partitions

Hello All,
I'd like to know how can I transfer users from one partition to another. e.g:
# cat /etc/fstab gave something like this

/fs/garcia ext3
/fs/hendrix ext3
/fs/lennon ext3

These are some of the partitions in my server.Now I ran out of space in garcia and the users in garcia are not able to receive mails coz they ran out of quota. It would be of great help if someone could enlighten me how to transer or move users from (say) garcia to hendrix, i.e a non destructive transfer. Thanks a zillion in advance .
  #2 (permalink)  
Old 04-20-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
just change their ~home in /etc/passwd and move their home dir to the new filesystem. And you might have to manually change their group ID as well.

thats it!
  #3 (permalink)  
Old 04-20-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
if you don't want to change their home directory entries, you can also move the users' home directories to the available filesystem and just create a link to it on the old filesystem ... be careful with the "rm -rf " ... (check the right tar options/syntax for your os) ...
Code:
cd /fs/garcia
for userdir in user1 user2 user3 ...
do
    tar cvfp - $userdir | (cd /fs/lennon; tar xvfp -)
    [ -d /fs/lennon/$userdir ] && rm -rf $userdir
    ln -s /fs/lennon/$userdir $userdir
done
  #4 (permalink)  
Old 04-20-2005
maybemedic maybemedic is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 8
Thank you so much just ice.
  #5 (permalink)  
Old 04-20-2005
maybemedic maybemedic is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 8
Thank you so much magnus, your tip was greatly useful.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0