View previous topic :: View next topic |
Author |
Message |
arnbak n00b
Joined: 17 Apr 2002 Posts: 40 Location: Denmark
|
Posted: Wed Mar 05, 2003 6:48 pm Post subject: Problems logging in. |
|
|
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 |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Wed Mar 05, 2003 7:39 pm Post subject: |
|
|
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 |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Wed Mar 05, 2003 7:56 pm Post subject: |
|
|
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 |
|
|
scocou Apprentice
Joined: 16 Aug 2002 Posts: 184 Location: Pacific NW, Canada
|
Posted: Wed Mar 05, 2003 8:49 pm Post subject: |
|
|
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 ), but it has worked for me when I've been in the same situation. |
|
Back to top |
|
|
arnbak n00b
Joined: 17 Apr 2002 Posts: 40 Location: Denmark
|
Posted: Thu Mar 06, 2003 10:19 am Post subject: |
|
|
It still does not work. I tried everything you guys said.
I just don't get this |
|
Back to top |
|
|
arnbak n00b
Joined: 17 Apr 2002 Posts: 40 Location: Denmark
|
Posted: Thu Mar 06, 2003 10:24 am Post subject: |
|
|
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 |
|
|
SeaPig n00b
Joined: 18 Jun 2002 Posts: 70
|
Posted: Thu Mar 06, 2003 1:56 pm Post subject: |
|
|
does the user own their home dir? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Mar 06, 2003 4:05 pm Post subject: |
|
|
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
arnbak n00b
Joined: 17 Apr 2002 Posts: 40 Location: Denmark
|
Posted: Thu Mar 06, 2003 5:16 pm Post subject: |
|
|
Yes the user owns its home dir |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Mar 06, 2003 5:24 pm Post subject: |
|
|
Does the problem happen if you login with a different user (not root)? _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
arnbak n00b
Joined: 17 Apr 2002 Posts: 40 Location: Denmark
|
Posted: Thu Mar 06, 2003 7:48 pm Post subject: |
|
|
Yes thats what the whole problems is about, I can't login with other users than than root. |
|
Back to top |
|
|
patson n00b
Joined: 28 Feb 2003 Posts: 52 Location: Europe
|
Posted: Fri Mar 07, 2003 7:20 pm Post subject: |
|
|
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 |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Fri Mar 07, 2003 7:27 pm Post subject: |
|
|
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 |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Fri Mar 07, 2003 7:30 pm Post subject: |
|
|
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 |
|
|
patson n00b
Joined: 28 Feb 2003 Posts: 52 Location: Europe
|
Posted: Fri Mar 07, 2003 7:56 pm Post subject: |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri Mar 07, 2003 8:16 pm Post subject: |
|
|
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 |
|
|
dj_choco Tux's lil' helper
Joined: 13 Oct 2002 Posts: 144 Location: North America
|
Posted: Tue Mar 11, 2003 9:34 pm Post subject: normal user login broken? |
|
|
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:
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 |
|
|
wischmopp n00b
Joined: 21 Mar 2003 Posts: 3 Location: germany
|
Posted: Fri Mar 21, 2003 12:51 pm Post subject: |
|
|
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 |
|
|
wischmopp n00b
Joined: 21 Mar 2003 Posts: 3 Location: germany
|
Posted: Fri Mar 21, 2003 5:21 pm Post subject: |
|
|
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 |
|
|
hudsonhauck Apprentice
Joined: 16 May 2002 Posts: 182 Location: Albany, CA
|
Posted: Fri Apr 18, 2003 4:33 am Post subject: Re: normal user login broken? |
|
|
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 |
|
|
dj_choco Tux's lil' helper
Joined: 13 Oct 2002 Posts: 144 Location: North America
|
Posted: Fri Apr 18, 2003 5:27 am Post subject: Re: normal user login broken? |
|
|
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!
A similar 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 |
|
|
dj_choco Tux's lil' helper
Joined: 13 Oct 2002 Posts: 144 Location: North America
|
|
Back to top |
|
|
dweigert Guru
Joined: 04 Oct 2002 Posts: 369 Location: Somerset, NJ USA
|
Posted: Fri Apr 18, 2003 3:24 pm Post subject: |
|
|
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 |
|
|
hudsonhauck Apprentice
Joined: 16 May 2002 Posts: 182 Location: Albany, CA
|
Posted: Fri Apr 18, 2003 5:53 pm Post subject: |
|
|
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!!! _________________ Matthew Hauck
http://matthauck.blogspot.com/ |
|
Back to top |
|
|
dj_choco Tux's lil' helper
Joined: 13 Oct 2002 Posts: 144 Location: North America
|
Posted: Fri Apr 18, 2003 7:08 pm Post subject: unknown user: Fixed! |
|
|
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! 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 |
|
|
|