LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2010, 02:25 PM   #1
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Rep: Reputation: 15
Moving users to another partition


Hi!

I have 2 harddisks, and a very new SuSE 10 installation.

Suppose I have a user called test in the users group. At present its home directory is /home/test. This is on one of the harddisks, sda.
Now I have a partition on the other harddisk /other. I would like all my users to be on sdb, so that their home directories are /other/users/test for instance for the test user.

I have played around with YaST to create another user "toets" in
/other/gebruikers, but I would like to have it as /other/users/toets.

I want all the user accounts on /other.

Anyone got some advice for me, please?

Thanks!
 
Old 04-26-2010, 02:46 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Anyone got some advice for me, please?
This is not an unusual question, so it has been answered many times before.

Please search on new home partition and you will find many guides.

If you run in to problems, let us know, and we'll help you further.
 
Old 04-26-2010, 03:07 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I would create a partition for the user folders, but mount it at /home. I think there are various processes that expect to find something at /home/username.

I do not typically put /home on a separate partition---I prefer to have data partitions. On these, the folders belonging to a specific user, gets mounted to --eg-- /home/username/docs. I also put thing like e-mail and browser profiles in the data partition(s)
 
Old 04-27-2010, 05:12 AM   #4
UnderV
Member
 
Registered: Mar 2010
Posts: 39

Rep: Reputation: 18
Login as root, rename /home to /home1 (or something). Create empty /home directory.
Easy way to mount sdb1 to /home
1. Open Yast
2. Open Partitioner module
3. Select sdb1 and change mount point to /home

If You haven't sdb1 then You also need to create one partition on /dev/sdb

At the end copy all data from /home1 to /home.
Thats all.

Be very careful - don't loose content of home.
 
Old 05-03-2010, 06:04 AM   #5
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
Hi!

Thanks for your help so far. I have looked at some of the other posts, actually even before I posted the original one.

What I actually want to know is whether there is a way that I could specify my user accounts as /other/groupname/username.

I don't quite want the whole /home on sdb1. I want sdb1 to remain as /other. Perhaps I will leave one user say test under /home on sda5. All the other users' files that will be on the system must be under /other/groupname/user.

Is something like this possible?

Thanks!
 
Old 05-03-2010, 09:38 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You can move your user's home directories anywhere you want. ( Just make sure they are not logged in when you do this. )
Eg /other/foo/username
Then you need to update their entries in /etc/passwd ...

Changing
Code:
username:x:1001:1002:username:/home/username:/bin/bash
to
Code:
username:x:1001:1002:username:/other/foo/username:/bin/bash
Save the changes, then they can login to their moved home directory.
 
Old 05-04-2010, 10:23 AM   #7
UnderV
Member
 
Registered: Mar 2010
Posts: 39

Rep: Reputation: 18
Member tredegar already explained distro independend solution.
I see You are using OpenSuse. In that case you can take advantage of YAST.
1.Open yast
2. Open "User and Group management" module
3. Select "user" tab
4. Double click on user you need to change home directory
5. Select "details" tab
6. change value in "home directory" field (in your case: /other/groupname/username)
7. Press OK.

If You want to change default home directory for all next created users, change "Defaults for New Users" in "User and Group management" module.

Yast is nice tool to make such operations.
 
Old 05-15-2010, 11:14 AM   #8
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
[Solved]

Hi!

It is strange. For some reason it didn't work on Monday, (if I logged out, I couldn't log in as one of the new users that I had created) but then I tried again on Wednesday and everything was fine. Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
,dmrc problem after moving /home partition to NTFS partition yeehung Linux - Newbie 1 11-14-2007 07:17 AM
Moving Users keysorsoze Red Hat 3 02-16-2006 11:40 PM
moving files from windows partition to linux partition M O L8ingN2dust Linux - Newbie 11 01-08-2006 10:11 PM
Moving from extended partition to primary partition joelbudgor Linux - General 5 05-26-2004 07:08 PM
moving users feasant Linux - Newbie 1 04-22-2002 12:44 PM


All times are GMT -5. The time now is 10:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration