PDA

View Full Version : /home/user missed...



j-billy
24th November 2006, 04:46 AM
At least it is what system says, but it doesn't, I login as root and the whole directory is there, when I try to login as my user; j-billy, it displays this:


No directory /home/j-billy!
Logging in with home = /
-bash /home/j-billy/.bash_profile:Permission denied
$bash-3.1
(using ctrl+alt+F1)


so, that's why I must login as root, I haver though about re-add the user, but I guess it would delete my configuration...

I hope solve this problem as soon as possible...! :confused:

giulix
24th November 2006, 10:39 AM
Just make sure there's a directory called j-billy in /home. No exclamation marks, no nothing: Just the name. If you already have a directory with your stuff in it somewhere, back it up and then restore it after you've created your new user with:


useradd jbilly

as root or, if you really like that dash


useradd j-billy

You can also use the graphical interface, but make sure you're logged in as root.

j-billy
24th November 2006, 04:16 PM
No matter if there is already that username?

giulix
24th November 2006, 05:02 PM
Just back up everyting that is in there and copy it somewhere safe.

j-billy
25th November 2006, 12:49 AM
Mmh.., it didnt work out, I tried to create the "j-billy" user, but it said it already exist, then I change the properties of the user and created another with the same name, but it still denying the directory /home/j-billy and the file .bash_profile :(

know what I think the problem is?, the permissions of the home directory, because I cant either login as any user on home folder, may you send me the chmod xxx permisions? thanks!!

giulix
25th November 2006, 01:27 AM
How did you create it ?

Follow these steps:

Open a terminal window (Menu->Accessories->Terminal if you're using Gnome) and type


su -

type in root's password and back up everything


tar zcf $HOME/home.tgz /home

See how many new users have been created


cat /etc/passwd

Near the bottom of the screen you'll see the users that have been created. Now, delete them: Say, for example that two users, j-billy and jbilly have been created


userdel -fr j-billy
userdel -fr jbilly

will get rid of them and everything that was in their home directories. Don't touch any other user, just the ones that weren't properly created. Mind that the above command (userdel) will destroy ALL data in those user's directories.
Now create the user jbilly


useradd jbilly

set a new password for it


passwd jbilly

and you're done. Close the terminal window, log off root and log in as the user you've just created.

j-billy
25th November 2006, 02:04 AM
Done!, but still the problem... which rights does the /home directory has?

Edit:
I created a user with main directory on /user, nad it succesfully login... then Im sure the /home rights are the problem...

Iron_Mike
25th November 2006, 02:32 AM
Mmh.., it didnt work out, I tried to create the "j-billy" user, but it said it already exist, then I change the properties of the user and created another with the same name, but it still denying the directory /home/j-billy and the file .bash_profile :(

know what I think the problem is?, the permissions of the home directory, because I cant either login as any user on home folder, may you send me the chmod xxx permisions? thanks!!

Login as root, back up everything you think you might from /home/j-billy. Remove j-billy as a user, Reboot and log back on as root and create a new user j-billy with a password, etc, etc. Reboot and log back in as j-billy, does it allow access to your home directory??

j-billy
25th November 2006, 06:22 AM
Well, I can already login as my old user j-billy, but only in command-line mode..., it seems I messed up the graphic mode...

giulix
25th November 2006, 10:09 AM
drwxr-xr-x 9 root root 4.0K Nov 25 01:26 home