Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems adding users (YES, I read the FAQ)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
PiperTex
n00b
n00b


Joined: 24 Apr 2004
Posts: 6
Location: Richmond, TX

PostPosted: Sun Apr 25, 2004 12:35 am    Post subject: Problems adding users (YES, I read the FAQ) Reply with quote

I recently installed Gentoo on my system, and am having problems adding a regular user. Following the instructions in the FAQ (and as found elsewhere while searching for an answer to this problem) I created the user with:

useradd <username> -m -G users,audio,wheel -s /bin/bash
chown <username> -R /home/<username>

However, when I try to log onto the new account, I get a message:
-bash: /home/<username>/.bash_profile: Permission denied
... and when I logout of the account, I get:
-bash: /home/<username>/.bash_logout: Permission denied
I executed ls -la on the home directory, and I have a .bash_profile, but there is no .bash_logout, ether. This reflects what is in /etc/skel.

I'm confused and befuddled. I have used other distributions (RedHat, SuSE, and Debian) for several years, but have never run into a problem like this.

Any ideas?
Back to top
View user's profile Send private message
scruff
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2003
Posts: 142
Location: Boston, MA

PostPosted: Sun Apr 25, 2004 1:28 am    Post subject: Reply with quote

Try running 'cat /etc/passwd' to make sure your user has been added properly. Then, I always do the chown command like 'chown -R scruff /home/scruff' and it works fine. I am not sure if it makes a difference, but you are putting the username before the recursive option where I am not.

Why are you trying to do chown anyway? Is this a /home directory created from another distro/install? If that is the case (and your username is the same), you could just create your new user with the same UID as the last distro and you shouldn't have to do the chown.

emerge superadduser if you would like an easier tool for creating accounts. It is exactly like Slackware's useradd and much simpler IMO.
_________________

AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ @ oc'd to 2.3ghz
DFI Lanparty UltraD nForce4 SLI
2x1gb Geil PC4000
GeForce 7800GT
Sound Blaster Audigy Platinum
200gb Maxtor DiamondMax 10
74gb WD Raptor 10k RPM


Last edited by scruff on Sun Apr 25, 2004 1:33 am; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sun Apr 25, 2004 1:32 am    Post subject: Reply with quote

What are the permissions on the home directory of the user?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
PiperTex
n00b
n00b


Joined: 24 Apr 2004
Posts: 6
Location: Richmond, TX

PostPosted: Mon Apr 26, 2004 11:46 pm    Post subject: Reply with quote

First of all, thanks for the replies.

In /etc/passwd, the user looks like:
hcblassin:x:1003:100::/home/hcblassin:/bin/bash

I emerge'd superadduser and tried add a new user with that, but still had the same results.

The permissions on the home directory look like:
drwx--x--x 2 hcblassin users 136 Apr 24 17:39 hcblassin

and the contents look like:
drwx--x--x 2 hcblassin users 136 Apr 24 17:39 .
drwxrw-r-- 3 root root 104 Apr 24 18:06 ..
-rw-r--r-- 1 hcblassin users 232 Apr 25 08:51 .bash_profile
-rw-r--r-- 1 hcblassin users 812 Apr 25 08:51 .bashrc
-rw-r--r-- 1 hcblassin users 1466 Apr 25 08:51 .tcsh.config
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


Joined: 12 Feb 2004
Posts: 1650
Location: /home/NL/ehv/

PostPosted: Tue Apr 27, 2004 12:17 am    Post subject: Reply with quote

if you login as the newly created user, what does the command "groups" give you?
Back to top
View user's profile Send private message
serzz
Apprentice
Apprentice


Joined: 03 Apr 2004
Posts: 153

PostPosted: Tue Apr 27, 2004 12:46 am    Post subject: Reply with quote

have you changed new user's password with #passwd user ?
Back to top
View user's profile Send private message
PiperTex
n00b
n00b


Joined: 24 Apr 2004
Posts: 6
Location: Richmond, TX

PostPosted: Tue Apr 27, 2004 12:59 pm    Post subject: Reply with quote

Quote:
have you changed new user's password with #passwd user ?

yes. I did that after executing superadduser.

Quote:
if you login as the newly created user, what does the command "groups" give you?

users wheel audio

The other really bizarre thing is that when I log on to the new user (from a console, mind, i can't get anywhere using gdm with this user) the first messages I get are:
no directory /home/<username>!
logging in with home="/"
-bash: /home/<username>/.bash_profile: Permission denied

HOWEVER, when I log in as root, I can see that directory! in fact, my last reply lists the permissions and structure on that directory.

If I log in as root and try to su - to that user, I get
Unable to cd to "/home/<username>"


I'm going to try again with a different username, and see what gives. This makes no sense to me.

Any more ideas? Has anyone else seen anything like this?
Back to top
View user's profile Send private message
PiperTex
n00b
n00b


Joined: 24 Apr 2004
Posts: 6
Location: Richmond, TX

PostPosted: Tue Apr 27, 2004 1:02 pm    Post subject: Reply with quote

I just tried again with a different username, and got the same results. I thought perhaps there was something funky (trailing space, or >8 chars) with the original, but that was not the case.
Back to top
View user's profile Send private message
fdamstra
n00b
n00b


Joined: 11 Feb 2004
Posts: 39
Location: Grand Rapids, MI

PostPosted: Tue Apr 27, 2004 1:06 pm    Post subject: Reply with quote

Just a thought, but what are the permissions on the actual /home directory?

Do a:
# ls -d /home
Back to top
View user's profile Send private message
scruff
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2003
Posts: 142
Location: Boston, MA

PostPosted: Tue Apr 27, 2004 1:12 pm    Post subject: Reply with quote

Log in as your user and before starting X, do 'echo $HOME'

I think your path is set incorectly.

Code:
no directory /home/<username>!
logging in with home="/"
-bash: /home/<username>/.bash_profile: Permission denied

_________________

AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ @ oc'd to 2.3ghz
DFI Lanparty UltraD nForce4 SLI
2x1gb Geil PC4000
GeForce 7800GT
Sound Blaster Audigy Platinum
200gb Maxtor DiamondMax 10
74gb WD Raptor 10k RPM
Back to top
View user's profile Send private message
scruff
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2003
Posts: 142
Location: Boston, MA

PostPosted: Tue Apr 27, 2004 1:16 pm    Post subject: Reply with quote

I dunno.... I think I misread that error message. It does seem to look in /home/username first...

Try the echo command anyway, and for the hell of it give us a ls -la of / , /home , /home/username.

This is bugging me now. It all looks fine from your previous posts.

Post your fstab too. It might be the way you set that up.
_________________

AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ @ oc'd to 2.3ghz
DFI Lanparty UltraD nForce4 SLI
2x1gb Geil PC4000
GeForce 7800GT
Sound Blaster Audigy Platinum
200gb Maxtor DiamondMax 10
74gb WD Raptor 10k RPM
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue Apr 27, 2004 3:03 pm    Post subject: Reply with quote

`chmod 755 /home`?
Back to top
View user's profile Send private message
furkan
Guru
Guru


Joined: 11 Dec 2003
Posts: 520
Location: Montreal CA

PostPosted: Tue Apr 27, 2004 8:58 pm    Post subject: Reply with quote

try those
Code:
chown <username> /home/<username>
and
chown /home/<username>/.bashrc

and if that don't work try that
Code:
usermod -d /home/<username> <username>

:) ....
Back to top
View user's profile Send private message
PiperTex
n00b
n00b


Joined: 24 Apr 2004
Posts: 6
Location: Richmond, TX

PostPosted: Sun May 02, 2004 7:22 pm    Post subject: Reply with quote

I want to say THANK YOU to everyone who replied ot my post, and offered their help.

My problem seems to be fixed, but I had to go the long way around to get to it :P. My hard drive died completely, and would not boot. I had to install a new drive, and then re-install. For some reason (perhaps something wrong on the old drive, or something I missed during install on the old drive) everything works fine now.
Back to top
View user's profile Send private message
groover
n00b
n00b


Joined: 04 Jan 2004
Posts: 38

PostPosted: Thu Jun 03, 2004 9:13 pm    Post subject: Reply with quote

Hello.

I've got absolutely the same problem...
I create a user groover:
Code:
groupadd -u 101 groover
useradd -u 101 -g groover -G wheel,audio,cdrom,video,cdrw,portage,users -d /home/groover -s /bin/zsh -m -k /etc/skel/ groover
passwd groover

When I try to login this user, the message is:
No directory /home/groover
Becoming groover using su - groover follows in:
Unable to cd to "/home/groover"

Something more about my system and my fresh install...
I have an Asus M2N notebook, kernel 2.6.7-rc2 (development-sources with ~x86), using reiser-3.6 filesystems. My partitions are:

    /dev/hda1 -> /boot (reiserfs)
    /dev/hda2 -> sw
    /dev/hda3 -> / (reiserfs)
    /dev/hda5 -> /home (reiserfs)
    /dev/hda6 -> /mnt/data (reiserfs)

In /etc/fstab /home looks so:
Code:
/dev/hda5   /home   reiserfs   defaults   0 1

ls -alhF /
Code:

insgesamt 13K
drwx------  18 root root   408  4. Jun 01:27 ./
drwx------  18 root root   408  4. Jun 01:27 ../
drwxr-xr-x   2 root root  3,6K  3. Jun 18:46 bin/
drwx------   2 root root    48  2. Jun 03:24 boot/
drwxr-xr-x  20 root root     0  4. Jun 02:42 dev/
drwxr-xr-x  35 root root  2,8K  4. Jun 02:01 etc/
drwxr-xr-x   4 root users   72  4. Jun 01:55 home/
drwxr-xr-x   8 root root  3,4K  2. Jun 19:01 lib/
drwxr-xr-x   5 root root   144  3. Jun 14:05 mnt/
drwxr-xr-x   2 root root    72 12. Apr 23:28 opt/
dr-xr-xr-x  50 root root     0  4. Jun 2004  proc/
drwx------   3 root root   216  3. Jun 21:37 root/
drwxr-xr-x   2 root root  4,0K  3. Jun 21:41 sbin/
drwxr-xr-x   9 root root     0  4. Jun 2004  sys/
drwxrwxrwt   5 root root   160  4. Jun 01:59 tmp/
drwxr-xr-x  12 root root   424  2. Jun 15:56 usr/
drwxr-xr-x  12 root root   312  2. Jun 17:54 var/

ls -alhF /home
Code:

insgesamt 0
drwxr-xr-x   4 root    users  72  4. Jun 01:55 ./
drwx------  18 root    root  408  4. Jun 01:27 ../
drwxr-xr-x   2 groover users 160  4. Jun 01:55 groover/


The login process itself runs fine,
Code:

Jun  4 02:42:47 bomile login(pam_unix)[8298]: session opened for user groover by (uid=0)
Jun  4 02:42:47 bomile login(pam_unix)[8298]: session closed for user groover

I'd think.

I have absolutely no idea anymore how to fix this.
I checked permissions in /dev, udev, everything what has to do with the devices.
Because this is my first 2.6 I got running, I tried to find an error there, but we all don't think, that there's the problem.

What I want to say: I need help :<

In fact, I can't login the user!

Thanks for everything,

Mark
_________________
If I was you, I'd like to be me.
Back to top
View user's profile Send private message
dmitri
n00b
n00b


Joined: 17 Sep 2003
Posts: 20

PostPosted: Thu Jun 03, 2004 9:26 pm    Post subject: Reply with quote

Check your permissions on /

See this thread for more info.

https://forums.gentoo.org/viewtopic.php?p=1207156
_________________
Evil does not wear a BONNET!
Back to top
View user's profile Send private message
groover
n00b
n00b


Joined: 04 Jan 2004
Posts: 38

PostPosted: Thu Jun 03, 2004 9:30 pm    Post subject: Reply with quote

Thanks a lot!

That's it :)

Mark
_________________
If I was you, I'd like to be me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum