View previous topic :: View next topic |
Author |
Message |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sat Jan 25, 2014 8:08 pm Post subject: Cant login [Solved] |
|
|
Hi there.
I have two questions:
1. During month I have installed Gentoo on two PC's. One is ok and on another one suddenly I am not able to login. I do not why. During startup I nocited, that there is problem with xdm and mysql services. Chrooted into distro, removed booth services from startup, created new root account using 'passwd', but no success.
2. On the same PC is installed Sabayon. May I chroot safely from Sabayon into Gentoo or have tu use Live CD everytime?
Thanks
Last edited by apiaio on Fri Jan 31, 2014 6:51 pm; edited 1 time in total |
|
Back to top |
|
 |
The Doctor Moderator


Joined: 27 Jul 2010 Posts: 2600
|
Posted: Sat Jan 25, 2014 8:12 pm Post subject: |
|
|
You probably forgot to run dispatch-conf or etc-update and now you have a stale config file. The cure should be to run one of these and update the config file.
EDIT: You can safely chroot from any linux environment. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sat Jan 25, 2014 8:35 pm Post subject: |
|
|
Thanks for quick answer. Chrooted, ran dispatch-conf, but no success. |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sat Jan 25, 2014 8:47 pm Post subject: |
|
|
can you login as a user? i really wouldnt know where to begin on a problem like this. id probably try cycling kernels out, checking /etc/passwd to make sure the shells are correct, then replacing agetty. |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sat Jan 25, 2014 9:02 pm Post subject: |
|
|
No. I am not able to login as user. I do not know how to cycling kernels. Actualy
Quote: | localhost src # ls -l
total 12
lrwxrwxrwx 1 root root 21 Jan 25 19:42 linux -> linux-3.10.25-gentoo/
drwxrwxrwx 21 root root 4096 Jan 16 20:26 linux-3.10.17-gentoo
drwxrwxrwx 25 root root 4096 Jan 25 19:48 linux-3.10.25-gentoo
drwxrwxrwx 7 root root 4096 Dec 30 08:58 v4l-dvb
| I was trying to change symlink to older version. The same result.
/etc/passwd Quote: | root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucp:/bin/false
operator:x:11:0:operator:/root:/bin/bash
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/var/empty:/bin/false
man:x:13:15:added by portage for man-db:/usr/share/man:/sbin/nologin
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
miro:x:1000:1000::/home/miro:/bin/bash
user:x:1001:1001::/home/user:/bin/bash
messagebus:x:101:249:added by portage for dbus:/dev/null:/sbin/nologin
polkitd:x:102:247:added by portage for polkit:/var/lib/polkit-1:/sbin/nologin
apache:x:81:81:added by portage for apache:/var/www:/sbin/nologin
nullmail:x:88:88:added by portage for nullmailer:/var/nullmailer:/sbin/nologin
mysql:x:60:60:added by portage for mysql:/dev/null:/sbin/nologin
ldap:x:439:439:added by portage for openldap:/usr/lib64/openldap:/sbin/nologin
| Do not know how to replace aggety. |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sat Jan 25, 2014 9:07 pm Post subject: |
|
|
you cycle kernels by changing what kernel loads in grub or lilo or sys linux.... what ever boot loader you're using....
to change out agetty...
https://wiki.gentoo.org/wiki/Qingy
id start with working on kernels, then use the last option as absolute last ditch attempt at saving your gentoo box.
im just throwing out ideas, im not telling you to do anything by any means. |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Sat Jan 25, 2014 9:35 pm Post subject: |
|
|
666threesixes666 wrote: | im just throwing out ideas, im not telling you to do anything by any means. | None of these ideas sound that likely to fix his problem. Nothing so far suggests this is a kernel problem. A problem with getty is possible, but unlikely. Nothing posted so far seems to implicate that, either.
OP: please start from the beginning. You say you cannot login. What happens when you try? Are you unable to login on the console via agetty, unable to login to a graphical display manager, or both? I assume at least the former since you say you removed xdm. What does the agetty do instead of giving you a login shell? Does it display an error message? Does it crash? What error message does it show? After a failed login, if you use a live environment to mount the installed filesystems, what do the system logs say about the failed login? If you use a live environment and chroot into the installed system, what happens when you run /bin/su - and give the root password?
Separately, are you sure that the output of ls -l /usr/src/ is correct? None of those directories should be installed 777 ever. |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sat Jan 25, 2014 10:05 pm Post subject: |
|
|
login - everytime when trying login the output is "login incorrect"
This is what I do when chrooting from another Linux Quote: |
localhost / # mount -t proc proc /cecko/proc
localhost / # mount --rbind /dev /cecko/dev
localhost / # mount --rbind /sys /cecko/sys
localhost / # chroot /cecko /bin/bash
localhost / # source /etc/profile
| After chrooting Quote: | localhost / # /bin/su
localhost / # |
and Quote: | localhost / # ls -l /usr/src
total 12
lrwxrwxrwx 1 root root 21 Jan 25 22:39 linux -> linux-3.10.25-gentoo/
drwxrwxrwx 21 root root 4096 Jan 16 20:26 linux-3.10.17-gentoo
drwxrwxrwx 25 root root 4096 Jan 25 22:40 linux-3.10.25-gentoo
drwxrwxrwx 7 root root 4096 Dec 30 08:58 v4l-dvb
localhost / #
|
When chrooted from Live CD I used the same commands. Mount point was /mnt/gentoo |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sun Jan 26, 2014 9:10 am Post subject: |
|
|
I have chrooted and created new root user Quote: | ocalhost # passwd
New password:
Retype new password:
passwd: password updated successfully
| After that Quote: | localhost # localhost login: root
Password:
Login incorrect
localhost login:
Login timed out after 60 seconds. | Accordingly I think, that login related packages are corrupted. I want to reemerge them, but I do not know which of them. |
|
Back to top |
|
 |
cwr Veteran

Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sun Jan 26, 2014 10:21 am Post subject: |
|
|
What happens if you remove the root password altogether by editing the passwd
file (from a chroot)?
Try replacing the first line with:
Code: |
root::0:0:root:/root:/bin/bash
|
and see if you can log in then.
Will |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sun Jan 26, 2014 10:59 am Post subject: |
|
|
Replaced as you suggest Quote: | localhost / # login
localhost login: root
Login incorrect
| Created root user Quote: | localhost / # passwd
New password:
Retype new password:
passwd: password updated successfully
| and Quote: | ocalhost / # login
localhost login: root
Password:
Login incorrect |
|
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sun Jan 26, 2014 11:56 am Post subject: |
|
|
Problem is more serious than I thought. I have no idea what happened with the permission: Quote: | localhost / # ls cecko -l
total 116
drwxrwxrwx 2 root root 4096 Dec 31 22:36 VM
drwxrwxrwx 2 root root 4096 Jan 8 20:19 becko
drwxrwxrwx 2 root root 4096 Jan 16 19:14 bin
drwxrwxrwx 2 root root 4096 Jan 25 22:32 boot
drwxrwxrwx 2 root root 4096 Dec 28 12:56 data
drwxrwxrwx 3 root root 4096 Dec 26 03:22 dev
drwxrwxrwx 70 root root 4096 Jan 26 11:53 etc
drwxrwxrwx 2 root root 4096 Dec 28 20:54 fatdata
drwxrwxrwx 4 root root 4096 Jan 12 21:26 home
lrwxrwxrwx 1 root root 5 Jan 4 21:42 lib -> lib64
drwxrwxrwx 3 root root 4096 Jan 4 21:42 lib32
drwxrwxrwx 13 root root 4096 Jan 16 19:14 lib64
drwxrwxrwx 2 root root 16384 Dec 27 09:46 lost+found
drwxrwxrwx 2 root root 4096 Dec 26 03:19 media
drwxrwxrwx 4 root root 4096 Jan 9 18:48 mnt
drwxrwxrwx 2 root root 4096 Jan 11 09:54 movie
drwxrwxrwx 4 root root 4096 Dec 31 22:20 opt
drwxrwxrwx 2 root root 4096 Dec 26 02:24 proc
drwxrwxrwx 15 root root 4096 Jan 25 23:18 root
drwxrwxrwx 2 root root 4096 Jan 26 12:32 run
drwxrwxrwx 2 root root 4096 Jan 16 20:25 sbin
drwxrwxrwx 2 root root 4096 Jan 19 20:51 solaris
drwxrwxrwx 2 root root 4096 Dec 26 03:19 sys
drwxrwxrwt 4 root root 4096 Jan 26 09:26 tmp
drwxrwxrwx 13 root root 4096 Dec 27 14:01 usr
drwxrwxrwx 12 root root 4096 Jan 12 18:57 var
drwxrwxrwx 2 root root 4096 Dec 28 20:53 windata
| I will have to make a new installation I am afraid. Or it is possible to rescue this one? |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Sun Jan 26, 2014 4:01 pm Post subject: |
|
|
I warned you earlier about the incorrect permissions on /usr/src. It looks like they are more widespread. Even though this installation may not be worth salvaging, you should first identify how it broke. What is the output of cat -n /proc/mounts? |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sun Jan 26, 2014 5:09 pm Post subject: |
|
|
Quote: | localhost / # cat -n /proc/mounts
1 rootfs / rootfs rw 0 0
2 /dev/sda1 / ext4 rw,noatime,data=ordered 0 0
3 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
4 tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=814428k,mode=755 0 0
5 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1017476,mode=755 0 0
6 mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
7 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
8 shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
9 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
10 debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
11 cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
12 openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
13 cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
14 cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
15 cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
16 freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
17 /dev/sdc1 / ext4 rw,relatime,data=ordered 0 0
18 /dev/sdc3 /VM xfs rw,relatime,attr2,inode64,noquota 0 0
19 /dev/sdc6 /movie vfat rw,nosuid,nodev,noatime,uid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
20 /dev/sdb2 /windata vfat rw,nosuid,nodev,noatime,uid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
21 /dev/sdb3 /data xfs rw,relatime,attr2,inode64,noquota 0 0
22 /dev/sdb5 /fatdata vfat rw,nosuid,nodev,noatime,uid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
23 none /var/tmp/portage tmpfs rw,noatime,mode=750,uid=250,gid=250 0 0
24 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
25 proc /proc proc rw,relatime 0 0
26 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
27 debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
28 cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
29 openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
30 cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
31 cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
32 cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
33 freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
34 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1017476,mode=755 0 0
35 mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
36 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
37 shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
|
|
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Sun Jan 26, 2014 5:31 pm Post subject: |
|
|
Root is ext4, so permissions can be saved. Something must have changed them after installation. Have you run any recursive commands that could have done this? |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Sun Jan 26, 2014 5:50 pm Post subject: |
|
|
I do not think so. Ovewrite recursively so many folders must take a plenty of time. |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Sun Jan 26, 2014 9:36 pm Post subject: |
|
|
What was overwritten? Trashing the permissions in the manner shown would only require visiting inodes, which are small. The modification itself is a single field in the inode. Exact performance requirements would vary based on filesystem rules for inode layout, but even the worst case (one inode per disk block) would mean a number of disk writes equal to the number of inodes. No production filesystem lays out inodes that poorly, so you could probably get at least 16 inodes per write in most cases. |
|
Back to top |
|
 |
skellr l33t


Joined: 18 Jun 2005 Posts: 901 Location: The Village, Portmeirion
|
Posted: Mon Jan 27, 2014 12:58 am Post subject: Re: Cant login |
|
|
apiaio wrote: | Hi there.
I have two questions:
1. During month I have installed Gentoo on two PC's. One is ok and on another one suddenly I am not able to login. I do not why. During startup I nocited, that there is problem with xdm and mysql services. Chrooted into distro, removed booth services from startup, created new root account using 'passwd', but no success.
2. On the same PC is installed Sabayon. May I chroot safely from Sabayon into Gentoo or have tu use Live CD everytime?
Thanks |
Sacrifice a goat. |
|
Back to top |
|
 |
Tony0945 Advocate

Joined: 25 Jul 2006 Posts: 3290 Location: Illinois, USA
|
Posted: Mon Jan 27, 2014 1:12 am Post subject: |
|
|
Quote: | I warned you earlier about the incorrect permissions on /usr/src. It looks like they are more widespread. Even though this installation may not be worth salvaging, you should first identify how it broke. What is the output of cat -n /proc/mounts? |
I also have permission 777 on /usr/src/linux. This is the system I posted about strange warnings about user/group portage not existing when they are. I tried deleteing the symlink and re-creating it and it's still 777. What should it be? 755?
Something unknown seems to have screwed up both systems, although mine still runs and updates, albeit with the bogus permissions. |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Mon Jan 27, 2014 1:53 am Post subject: |
|
|
Symbolic links always have mode 777. The kernel uses the permissions of the underlying object for permission checks. The poster in this thread has mode 777 for every inode he has shown us. |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Mon Jan 27, 2014 7:35 am Post subject: |
|
|
Hu wrote: | What was overwritten? . | All permissins in all folders, but no in all files. |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Mon Jan 27, 2014 7:35 am Post subject: |
|
|
i think it is good practice to make it so you can easily sacrifice your install. backups, data partitions, redundancy, posting configs online, leaving files at friends houses, 512gb flash drives from ebay for 40 bucks...... ETC then just wipe screwed up permissions and cook up a new gentoo box, perfecting your techniques of installing / maintaining systems. uptime / years of install say to me you tip toe around your machine and do not seriously beat on it. i beat on my computer like a 17 year old beats on a 300 dollar car with a brown pain job.
production webserver on the other hand, i tip toe around that... make double sure anything i do is what i want done. check locally first. |
|
Back to top |
|
 |
apiaio Apprentice

Joined: 04 Dec 2008 Posts: 217
|
Posted: Mon Jan 27, 2014 8:34 am Post subject: |
|
|
New Gentoo has already been installed, but on another partition keeping the old one still available. I would like to know what happened and if it is possible to rescue it. In the past I had installed several not only Gentoo distros ( LFC, Arch, Sabayon, FreeBSD, GentooBSD etc.) and never encountered issue like that |
|
Back to top |
|
 |
Tony0945 Advocate

Joined: 25 Jul 2006 Posts: 3290 Location: Illinois, USA
|
Posted: Mon Jan 27, 2014 10:50 am Post subject: |
|
|
Quote: | Symbolic links always have mode 777. The kernel uses the permissions of the underlying object for permission checks. The poster in this thread has mode 777 for every inode he has shown us. |
How did this prevent him from logging in? Isn't 777 Octal with every bit set? |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 14364
|
Posted: Tue Jan 28, 2014 2:23 am Post subject: |
|
|
Tony0945 wrote: | How did this prevent him from logging in? Isn't 777 Octal with every bit set? | Some programs check that your permissions are not insanely open and refuse anyone access until it is fixed. However, it is more likely that the wide open permissions are not responsible for the login failure. Wide open permissions are an indication something is wrong. Inability to login is also a problem, and may be somehow tied to the same mistake that produced the bad permissions.
666threesixes666: good backups are a good idea, but routinely trashing the system just because you know you can recover it sounds like making work for yourself unnecessarily. I use my system how I like to use it and have yet to break it in a way that required a reinstall. One of the regular posters on these forums has mentioned having a Gentoo install that has gone through three motherboards (and presumably other hardware upgrades) over a span of 9+ years without needing a reinstall. |
|
Back to top |
|
 |
|
|
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
|
|