Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems logging in.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
arnbak
n00b
n00b


Joined: 17 Apr 2002
Posts: 40
Location: Denmark

PostPosted: Wed Mar 05, 2003 6:48 pm    Post subject: Problems logging in. Reply with quote

Ive just installed gentoo on my new Acer laptop. Everything worked fine, building bootstrap, stage1 + 2 + 3.

Ive added a new user with the superadduser script, but Im unable to do a login with that newly added user. Only root is able to login.

When typing in the username and passwd, it just jumps down to a new login, it does not show the command prompt. As usual.

I have checked /etc/passwd file to see if the user is using /bin/bash wich it does, also /var/log/auth.log shows nothing unusual.

Whats wrong :?: :cry:
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Wed Mar 05, 2003 7:39 pm    Post subject: Reply with quote

try adding a user the old fashioned way:

Code:
useradd -c "<full name>" -d /home/<username> -k /etc/skel -m -s /bin/bash <username>
passwd <username>

_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Wed Mar 05, 2003 7:56 pm    Post subject: Reply with quote

I'm not sure if the superadduser script makes home directories or not, but you might want to check to make sure that your user has one. If not, you can simply make one manually.
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
scocou
Apprentice
Apprentice


Joined: 16 Aug 2002
Posts: 184
Location: Pacific NW, Canada

PostPosted: Wed Mar 05, 2003 8:49 pm    Post subject: Reply with quote

If you think you've properly created the user, and can log in as root the first thing I would try is this; log in as root, then 'passwd whoever' to reset whoever's password. Next <ctrl>+<d> and try to log in as whoever. I know it sounds obvious (or perhaps stupid :wink: ), but it has worked for me when I've been in the same situation.
Back to top
View user's profile Send private message
arnbak
n00b
n00b


Joined: 17 Apr 2002
Posts: 40
Location: Denmark

PostPosted: Thu Mar 06, 2003 10:19 am    Post subject: Reply with quote

It still does not work. I tried everything you guys said.

I just don't get this :x
Back to top
View user's profile Send private message
arnbak
n00b
n00b


Joined: 17 Apr 2002
Posts: 40
Location: Denmark

PostPosted: Thu Mar 06, 2003 10:24 am    Post subject: Reply with quote

I can su from root to the user, but I can't list the home dir, but ex. /usr/local I have no problems listing with ls... :(
Back to top
View user's profile Send private message
SeaPig
n00b
n00b


Joined: 18 Jun 2002
Posts: 70

PostPosted: Thu Mar 06, 2003 1:56 pm    Post subject: Reply with quote

does the user own their home dir?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Mar 06, 2003 4:05 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
arnbak
n00b
n00b


Joined: 17 Apr 2002
Posts: 40
Location: Denmark

PostPosted: Thu Mar 06, 2003 5:16 pm    Post subject: Reply with quote

Yes the user owns its home dir :?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Mar 06, 2003 5:24 pm    Post subject: Reply with quote

Does the problem happen if you login with a different user (not root)?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
arnbak
n00b
n00b


Joined: 17 Apr 2002
Posts: 40
Location: Denmark

PostPosted: Thu Mar 06, 2003 7:48 pm    Post subject: Reply with quote

Yes thats what the whole problems is about, I can't login with other users than than root. :(
Back to top
View user's profile Send private message
patson
n00b
n00b


Joined: 28 Feb 2003
Posts: 52
Location: Europe

PostPosted: Fri Mar 07, 2003 7:20 pm    Post subject: Reply with quote

have you tried doing "chmod 777 /home/<username>"?
I myself did that and haven't had any login problems... sounds to me like the user doesn't have access to the dir. nevermind who owns it...

just a quick thought.
_________________
[read along, nothing to see here]
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Fri Mar 07, 2003 7:27 pm    Post subject: Reply with quote

patson wrote:
have you tried doing "chmod 777 /home/<username>"?
I myself did that and haven't had any login problems... sounds to me like the user doesn't have access to the dir. nevermind who owns it...

just a quick thought.


Yikes. That's not a good solution. Now everyone in the entire world has access to your home directory. Better to find the real cause of the problem instead of initiating a work around.
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Fri Mar 07, 2003 7:30 pm    Post subject: Reply with quote

It may be useful is you were to post the output of:

Code:
ls -al /home/<user dir>


Also post the offending user's entry from the passwd file.[/code]
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
patson
n00b
n00b


Joined: 28 Feb 2003
Posts: 52
Location: Europe

PostPosted: Fri Mar 07, 2003 7:56 pm    Post subject: Reply with quote

neilhwatson wrote:
patson wrote:
have you tried doing "chmod 777 /home/<username>"?
I myself did that and haven't had any login problems... sounds to me like the user doesn't have access to the dir. nevermind who owns it...

just a quick thought.


Yikes. That's not a good solution. Now everyone in the entire world has access to your home directory. Better to find the real cause of the problem instead of initiating a work around.


yes, I know, that was the "quick fix"... but if it fixes the problem then at least it has to do with directory permissions ;)

after that you could try reducing outside permissions...
_________________
[read along, nothing to see here]
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Mar 07, 2003 8:16 pm    Post subject: Reply with quote

arnbak wrote:
Yes thats what the whole problems is about, I can't login with other users than than root. :(
I was wondering if you had tried more than one non-root user.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Tue Mar 11, 2003 9:34 pm    Post subject: normal user login broken? Reply with quote

I have a similar login problem - I think it started after a recent emerge system.

I can log in directly at a console, but not over ssh. If I try ssh, the connection dies immediately after I enter the password.

Directly at a consoloe login (or if I su over ssh) I get
Code:
/usr/bin/whoami: cannot find username for UID 1002
bash: [: =: unary operator expected


I get the same message when I su over ssh and source /etc/profile.

This might be related - I have three interesting files in my /etc dir:
    group-
    passwd-
    shadow-

Any ideas?

[edit]I just created a new user (to test this issue) with:
Code:
useradd -c "<full name>" -d /home/<homedir> -k /etc/skel -m -s /bin/bash <username>
Same message. I can login at the computer, but my prompt is as follows: I have no name!@<host> <username> $[/edit]
Back to top
View user's profile Send private message
wischmopp
n00b
n00b


Joined: 21 Mar 2003
Posts: 3
Location: germany

PostPosted: Fri Mar 21, 2003 12:51 pm    Post subject: Reply with quote

i have the same problem.

i can login via ssh but not in the shell.
i chown'ed the home directory to the user and checked
everything else ://

( even chmod 777 /home/homedir doesnt work )
Back to top
View user's profile Send private message
wischmopp
n00b
n00b


Joined: 21 Mar 2003
Posts: 3
Location: germany

PostPosted: Fri Mar 21, 2003 5:21 pm    Post subject: Reply with quote

i found a little workaround thats works for me.

i use gdm to login into kde ( kdm crashes when a non-root user trys to login )

and for shell login i use tinylogin.

Code:

emerge tinylogin
mv /bin/login /bin/login.old
cp /bin/tinylogin /bin/login


may be this is "evil" but it works for me
Back to top
View user's profile Send private message
hudsonhauck
Apprentice
Apprentice


Joined: 16 May 2002
Posts: 182
Location: Albany, CA

PostPosted: Fri Apr 18, 2003 4:33 am    Post subject: Re: normal user login broken? Reply with quote

dj_choco wrote:
Directly at a consoloe login (or if I su over ssh) I get
Code:
/usr/bin/whoami: cannot find username for UID 1002



I'm getting the same error!! Any insight as to your solution? Thanks
_________________
Matthew Hauck
http://matthauck.blogspot.com/
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Fri Apr 18, 2003 5:27 am    Post subject: Re: normal user login broken? Reply with quote

hudsonhauck wrote:
dj_choco wrote:
Directly at a consoloe login (or if I su over ssh) I get
Code:
/usr/bin/whoami: cannot find username for UID 1002



I'm getting the same error!! Any insight as to your solution? Thanks


I still have the same issue! :cry:

A similar :arrow: login-related thread suggests the following:

Code:
emerge sync
emerge devfsd cracklib pwdb pam shadow pam-login


The machine with this issue is at work... I'll do this myself later... and post my results
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Fri Apr 18, 2003 5:51 am    Post subject: unknown user: mangled or cracked /etc/passwd? Reply with quote

A related-post suggests a possible security comprimise as the cause of this problem!! 8O :

the security issue is described at: http://list.cobalt.com/pipermail/cobalt-users/2001-April/043393.html
Back to top
View user's profile Send private message
dweigert
Guru
Guru


Joined: 04 Oct 2002
Posts: 369
Location: Somerset, NJ USA

PostPosted: Fri Apr 18, 2003 3:24 pm    Post subject: Reply with quote

Double check the permissions on the passwd, shadow and group files under /etc. They should look like this:

Code:

$ ls -l /etc/passwd /etc/shadow /etc/group
-rw-r--r--    1 root     root          675 Jan 31 09:22 /etc/group
-rw-r--r--    1 root     root         1813 Apr  9 10:52 /etc/passwd
-rw-------    1 root     root         1135 Apr  9 10:52 /etc/shadow
$


the next thing to check are the pam rules...

Code:

$ ls -ld /etc/pam.d
drwxr-xr-x    2 root     root         4096 Jan 31 08:59 pam.d
$


AND the things in the directory

Code:

$ ls -la /etc/pam.d
total 100
drwxr-xr-x    2 root     root         4096 Jan 31 08:59 .
drwxr-xr-x   59 root     root         4096 Apr 18 10:20 ..
-rw-r--r--    1 root     root          227 Jan 31 08:59 chage
-rw-r--r--    1 root     root          227 Jan 31 08:59 chfn
-rw-r--r--    1 root     root          227 Jan 31 08:59 chsh
-rw-r--r--    1 root     root          232 Mar 17 14:28 cups
-rw-r--r--    1 root     root          380 Feb 10 09:28 gdm
-rw-r--r--    1 root     root          406 Feb 10 09:28 gdm-autologin
-rw-r--r--    1 root     root          288 Feb 10 09:28 gdmconfig
-rw-r--r--    1 root     root          227 Jan 31 08:59 groupadd
-rw-r--r--    1 root     root          431 Jan 31 08:59 login
-rw-r--r--    1 root     root          198 Jan 31 08:59 other
-rw-r--r--    1 root     root          214 Jan 31 08:59 passwd
-rw-r--r--    1 root     root          457 Jan 31 03:48 rexec
-rw-r--r--    1 root     root          580 Jan 31 03:48 rlogin
-rw-r--r--    1 root     root          445 Jan 31 03:48 rsh
-rw-r--r--    1 root     root          227 Jan 31 08:59 shadow
-rw-r--r--    1 root     root          294 Jan 31 09:22 sshd
-rw-r--r--    1 root     root         1247 Jan 31 08:59 su
-rw-r--r--    1 root     root          491 Jan 31 08:59 system-auth
-rw-r--r--    1 root     root          227 Jan 31 08:59 useradd
-rw-r--r--    1 root     root          380 Mar 22 10:16 xdm
-rw-r--r--    1 root     root           79 Oct 27 23:51 xscreensaver
-rw-r--r--    1 root     root          284 Mar 22 10:16 xserver
$


The permissions should be similar. What's in pam.d is dependent upon what you have emerged into your system.

Dan
_________________
"Always remember to mount a scratch monkey..."
Back to top
View user's profile Send private message
hudsonhauck
Apprentice
Apprentice


Joined: 16 May 2002
Posts: 182
Location: Albany, CA

PostPosted: Fri Apr 18, 2003 5:53 pm    Post subject: Reply with quote

Thanks dweigert, it was indeed my passwd permissions. I'm guessing I messed them up when I was screwing around with samba? Or maybe I was hacked... :( At any rate, I have a name now!!! :D
_________________
Matthew Hauck
http://matthauck.blogspot.com/
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Fri Apr 18, 2003 7:08 pm    Post subject: unknown user: Fixed! Reply with quote

dweigert wrote:
Double check the permissions on the passwd, shadow and group files under /etc. They should look like this:

Code:

$ ls -l /etc/passwd /etc/shadow /etc/group
-rw-r--r--    1 root     root          675 Jan 31 09:22 /etc/group
-rw-r--r--    1 root     root         1813 Apr  9 10:52 /etc/passwd
-rw-------    1 root     root         1135 Apr  9 10:52 /etc/shadow
$


@dweigert - THANK YOU! :D That was my issue! The /etc/group and /etc/passwd files did not have read access set for group or other.

No I can log in as a normal user, both locally and through ssh, and my name shows up.
Thank you again Dan :!:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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