| View previous topic :: View next topic |
| Author |
Message |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 12:34 am Post subject: can only login as root |
|
|
Ok, I searched for this and the only other post I could find seemed to be about someone who didn't create a home directory for the user they created. Here's what happens. When I try to login as my non-root user, I get a /home/jthorndy does not exist. error and I can't log in. I can log in as root, so I did, but I couldn't su over to the user because I got /bin/bash: access denied.
The only change I've made on my system was getting rid of my Windows installation and replacing it with a second Linux installation (Mandrake). I am sharing a /home partition (ReiserFS if it's in any way relevant) between the two, and I've verified that it is mounting correctly (when logged in as root I can cd to /home/jthorndy). I have also verified that /home and /home/jthorndy are both readable by the user. One post I read said to make sure that the UID is the same, not just the name of the user, and jthorndy is 1001 on both Gentoo and Mandrake...
The directory is clearly accessible to the user on Mandrake, because that's what I'm logged in to right now.
If anyone has some suggestions they would be greatly appreciated. _________________ Excellent.. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 19, 2002 12:53 am Post subject: |
|
|
What does "ls -ald /home/jthorndy" say? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 1:07 am Post subject: |
|
|
| Code: |
drwxr----- 70 jthorndy users 3768 Nov 18 19:58 /home/jthorndy
|
_________________ Excellent.. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 19, 2002 1:11 am Post subject: |
|
|
How about dotfiles? Does "ls -al /home/jthorndy/.*" pick up anything that's not owned by jthorndy, that should be? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 1:18 am Post subject: |
|
|
Nope, just about everything was owned by jthorndy including dot files and otherwise. The only files that weren't were definitely not anything that should interfere with my ability to log in. _________________ Excellent.. |
|
| Back to top |
|
 |
mooman Apprentice


Joined: 06 Nov 2002 Posts: 175 Location: Vancouver, WA
|
Posted: Tue Nov 19, 2002 1:34 am Post subject: |
|
|
How about doing a:
grep thorn /etc/passwd
to see if that part matches the directory you listed earlier...? What'ya get there? _________________ Linux user off and on since circa 1995 |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 19, 2002 1:36 am Post subject: |
|
|
If you have strace installed, maybe stracing the attempt to su to jthorndy from root will tell us which system call is generating the error, and then hopefully what file is causing the problem. _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 1:51 am Post subject: |
|
|
grep verified that my home directory was set correctly. I installed strace and here is the last part of the output.
| Code: |
execve("/bin/bash", ["bash"], [/* 29 vars */]) = -1 EACCES (Permission denied)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1a4000
_llseek(3, 0, 0xb8bfbfa0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "Cannot execute /bin/bash: Permis"..., 44) = 44
close(3) = 0
munmap(0x1a4000, 4096) = 0
_exit(1) = ?
|
The complete file can be viewed here. _________________ Excellent.. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 19, 2002 2:06 am Post subject: |
|
|
| Delphiki wrote: | | execve("/bin/bash", ["bash"], [/* 29 vars */]) = -1 EACCES (Permission denied) |
That looks like the relevant line to me. Is /bin/bash world-executable? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 2:13 am Post subject: |
|
|
| Code: |
-rwxr-xr-x 1 root root 588412 Oct 13 12:57 bash*
|
It looks to me like it's world executable... am I missing something..? /bin is....
| Code: |
drwxr-xr-x 2 root root 2800 Nov 14 22:22 bin/
|
_________________ Excellent.. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 19, 2002 2:23 am Post subject: |
|
|
Looks OK to me. Any grsecurity in your kernel? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 2:26 am Post subject: |
|
|
Yeah, I use Grsecurity, Medium. It's been in the kernel since I started usiing the gentoo sources and today is the first time it's given me any problems. _________________ Excellent.. |
|
| Back to top |
|
 |
Delphiki Guru


Joined: 04 Oct 2002 Posts: 337 Location: A2
|
Posted: Tue Nov 19, 2002 4:41 am Post subject: |
|
|
Grsecurity wasn't the problem. I removed it, but that didn't fix it. What it turned out to be was that something during the installation, somehow took the a+x bit off of /, which would explain why only root could access anything.. _________________ Excellent.. |
|
| Back to top |
|
 |
|