View previous topic :: View next topic |
Author |
Message |
the brave Tux's lil' helper
Joined: 02 Jul 2004 Posts: 131
|
Posted: Thu Jul 22, 2004 1:50 am Post subject: how to add a new user? |
|
|
I know that in the handbook it's shown and during the installation I ran fdisk /dev/hdb and created /mnt/gentoo/home dir, but the issue is that I forgot to mount it, so the normal user and its home dir was created taking the space of my root partition.
As soon as I figured out this problem, I added to fstab the entries related to my to my home partition and since that I cannot access the normal user environment anymore. It seems the the system has deleted all the contents of my normal user dir.
How to create a new user telling to the system to take the partition I have created for this purpose instead taking the root partition?
Any help will be appreciated. _________________ william |
|
Back to top |
|
|
cadaker Tux's lil' helper
Joined: 05 Jun 2004 Posts: 102 Location: Stockholm, Sweden
|
Posted: Thu Jul 22, 2004 1:59 am Post subject: |
|
|
If it's only the user's home directory that's lost, you should be able to restore the default state with
Code: | cp -r /etc/skel /home/username |
If something else has gone wrong, you could perhaps try userdel and useradd to recreate the user. |
|
Back to top |
|
|
papal_authority Veteran
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Thu Jul 22, 2004 2:04 am Post subject: |
|
|
The useradd and usermod commands both have -d <HOME_DIR> options if you're into that. |
|
Back to top |
|
|
the brave Tux's lil' helper
Joined: 02 Jul 2004 Posts: 131
|
Posted: Thu Jul 22, 2004 2:20 am Post subject: |
|
|
cadaker wrote: | If it's only the user's home directory that's lost, you should be able to restore the default state with
Code: | cp -r /etc/skel /home/username |
If something else has gone wrong, you could perhaps try userdel and useradd to recreate the user. |
At least 3 itens were copied to /home/william directory, but when I type "startx" to load the graphical interface, that ugly wm is loaded instead gnome and when I try to re-add exec gnome-session to it, I got an error message saying that permission is denied even being root. I will try useradd....
BTW. I have installed firefox and xmms as root with emerge and any additional command was made. (sometime I think I'm running mandrake). After a software installation do I have to launch any command in order to update the system? If I'm able to get access to that awfull window manager as normal user (i forgot its name) why I cannot load gnome or even edit .xinitrc? _________________ william |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Jul 22, 2004 2:24 am Post subject: |
|
|
Also see the useradd FAQ entry.
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
the brave Tux's lil' helper
Joined: 02 Jul 2004 Posts: 131
|
Posted: Thu Jul 22, 2004 2:36 am Post subject: |
|
|
but which path do I have to give to useradd -d command to point out to the partition where my home space was created? _________________ william |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Jul 22, 2004 2:40 am Post subject: |
|
|
Do you have /home mounted? If so, you shouldn't have to do anything special. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
the brave Tux's lil' helper
Joined: 02 Jul 2004 Posts: 131
|
Posted: Thu Jul 22, 2004 3:05 am Post subject: |
|
|
thanks pip, I used the command mentioned in the handbook, anyway thanks.
william _________________ william |
|
Back to top |
|
|
|