LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   many bugs on ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/many-bugs-on-ubuntu-786170/)

elishac 02-01-2010 05:28 AM

many bugs on ubuntu
 
hello,

I noticed that my log in /var/log/syslog doesn't report any passwords failure, as it should with unix-chkpwd.
So I googled it and I found a manipulation that should help me with that. Here is what I did :
- I installed this : http://www.kernel.org/pub/linux/libs...AM-0.77.tar.gz
- I wrote this :
Code:

./configure --enable-static-libpam --with-mailspool=/var/mail \
--enable-read-both-confs --sysconfdir=/etc &&
make &&
make install &&
mv /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a /usr/lib &&
ln -sf ../../lib/libpam.so.0.77 /usr/lib/libpam.so &&
ln -sf ../../lib/libpam_misc.so.0.77 /usr/lib/libpam_misc.so &&
ln -sf ../../lib/libpamc.so.0.77 /usr/lib/libpamc.so

In the end, unix-chkpwd still doesn't work (please help me to make this work) and even worse, when I type su or sudo ls and then my password, it says my password is incorrect.
I don't know if this has anything to do with the manipulation I just made, because I'm a newbie, but I think it does.
I now fear to shut my computer down because I'm afraid I won't be able to log in anymore. So please help me fast because I'll wait for your instructions before turning it down.

On another matter, which I'm not sure it's related either, my syslog is now getting spammed with "ureadahead-other main process (xxx) terminated with status 2" (several messages per second).
I googled it too, and I found it may be related to fstab issues, but I'm not sure, and I don't know enough anyway to modify it.
Here it is, tell me if there's anything wrong with it, and how to modify it :

Code:

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
# / was on /dev/sda5 during installation
UUID=b58... /              ext2    relatime,errors=remount-ro 0      1
# swap was on /dev/sda6 during installation
UUID=a67... none            swap    sw              0      0
/dev/scd0      /media/cdrom0  udf,iso9660 user,noauto,exec,utf8 0      0
/dev/sda2  /media/DATA  ntfs-3g  rw,auto  0  0

Thanks.

repo 02-01-2010 05:33 AM

Quote:

I noticed that my log in /var/log/syslog doesn't report any passwords failure, as it should with unix-chkpwd.
Aren't these logged in
/var/log/auth.log ?

elishac 02-01-2010 05:53 AM

:S
Thanks a lot. You solved one of my problems, and the one that interested me the most.
Can you please help me to fix all the mistakes I did while trying to make this work on my own ?

repo 02-01-2010 05:58 AM

First see if there is a uninstall option
In general make uninstall
Then remove the softlinks you created
Code:

rm /path/to/soft/link

elishac 02-01-2010 12:12 PM

make: *** No rule to make target `uninstall'. Stop.

As you said 'then', I didn't execute the second part of your instructions.

repo 02-01-2010 01:13 PM

You need to use "make uninstall" in the source directory you used to install.
However, seems to me there is no uninstall option.
You could try to reverse what you did here
Quote:

mv /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a /usr/lib &&
ln -sf ../../lib/libpam.so.0.77 /usr/lib/libpam.so &&
ln -sf ../../lib/libpam_misc.so.0.77 /usr/lib/libpam_misc.so &&
ln -sf ../../lib/libpamc.so.0.77 /usr/lib/libpamc.so
This is why you always should use the packagemanager to install software.

elishac 02-01-2010 01:53 PM

I did it in the same directory, but it seems that there is no uninstall option indeed.
What do you mean by "reverse", tell me exactly what I need to type in...

repo 02-01-2010 02:05 PM

Just wondering, can you use su and sudo now ?

remove the softlinks you created
Code:

rm /path/to/soft/link

elishac 02-01-2010 05:24 PM

I'm really a newbie, you must help me more. I don't know what a softlink is, let alone where it is. All I know is that the directory in which I copied and made all the commands that I pasted above is : #HOME/Downloads/Linux -PAM-0.77. What exactly am I supposed to do ?

And by the way, I just noticed that what is logged in /var/log/auth.log isn't really a unix-chkpwd. unix-chkpwd seems to use /var/log/syslog only.

repo 02-02-2010 03:05 AM

Quote:

In the end, unix-chkpwd still doesn't work (please help me to make this work) and even worse, when I type su or sudo ls and then my password, it says my password is incorrect.
I don't know if this has anything to do with the manipulation I just made, because I'm a newbie, but I think it does.
I now fear to shut my computer down because I'm afraid I won't be able to log in anymore. So please help me fast because I'll wait for your instructions before turning it down.
Does the system work?
Can you use su and sudo ?

elishac 02-02-2010 09:22 AM

The system works, but I cannot use su or sudo.

repo 02-02-2010 09:49 AM

Quote:

The system works, but I cannot use su or sudo.
If you can't use su or sudo, you can't remove the installed files and softlinks you created.
You need to boot from a live CD, and undo what you did from the live CD
You also need to know which files are installed using the "make install" command.
If you go to a terminal using CTRL_ALT_F2, can you login as root?

elishac 02-02-2010 10:38 AM

I don't have a live CD.
I had to shut the computer down because the battery was low.
Now I can't login anymore. It says authentification failure, although the password I entered is correct.
What can I do ?

repo 02-02-2010 11:12 AM

Quote:

I don't have a live CD.
The CD you used to install, is a live CD

elishac 02-02-2010 01:03 PM

I don't have a single CD in my house, so there's no way I have a live CD.
I wasn't the one who installed ubuntu on my computer.
I managed to change my password and now I can use ubuntu again (i just followed a procedure on internet ; and by the way it seems very strange to me that someone is able to change the root's password without needing to know the previous password). But I still need to uninstall everything I did. How to do that ?

EricTRA 02-03-2010 12:21 AM

Hello elishac,

Just like repo said, your best option (and utility to have around) is a LiveCD of the version you're running. Do you have the option to download and burn an ISO of the same Ubuntu you have?

It's quite normal that you can change the root password if you have console access (physical access to the machine). There are always ways to bypass what's installed. Even in Windows (what you're referring to in my opinion) you don't really need the 'old' password to be able to reset a password (for example if you've forgotten it). All you need is physical access to the machine.

Kind regards,

Eric

elishac 02-03-2010 01:57 AM

Hello Eric,

thanks again for helping me.
Does that mean I'll have to reset all the configurations I made ?
I'd rather not do that, I've had enough problems already, I don't need to go through them twice :/.

I managed to log in so I can do whatever is needed now. Maybe I can undo what I did without actually using a liveCD ? (that really sounds like the worse option to me)

EricTRA 02-03-2010 02:30 AM

Hi,

I don't know what has been changed by the installation you performed so I'm unsure how to uninstall/remove it. If now you have full access to the system you should be able though to perform the necessary actions. Before trying out things I suggest you take a backup of your configuration files and important documents (to USB stick or other drive/partition).

With a LiveCD you could boot your computer in that environment and thus not touching your harddisk. Next you could make a copy of all your configurations to a USB stick before attempting to uninstall the previous installation.

Kind regards,

Eric

elishac 02-05-2010 06:12 AM

Well, now I have yet another problem.
I rebooted my computer, but the file system check started, and now it says :
init:mountall main process 1139 terminated with status 3.
mount of filesystem failed
a maintenance shell will now be started.
ctrl+d will terminate this shell and retry
give root password for maintenance
(or type ctrl d to continue):

(if i type ctrl d, the computer restarts and i get the same thing all over again...)

EricTRA 02-05-2010 07:30 AM

Hello,

Enter the maintenance console by typing in your root password when asked for it. Next type in the following to force a system check:
Code:

e2fsck -C0 -p -f -v /dev/sda5
(I thought I saw in one of your posts that that's the root partition)
Let the check fix errors if any. If that process is finished then try to mount your system with:
Code:

mount -a
If you can mount successful then check your fstab and mtab with:
Code:

cat /etc/fstab
cat /etc/mtab

and post the contents here so we can see if there is any strange stuff in it.

Also check, if you're able to mount the system, the log files for errors (syslog and kern.log) in /var/log and post any errors here.

Kind regards,

Eric

elishac 02-05-2010 08:09 AM

Hello Eric,

I did what you asked. It took over a minute to execute the first command.
Then the result was :
unattached inode 1431542.

/dev/sda5: unexpected inconsistency. run fsk manually (ie without -a or -p options)

What should I do now ? mount -a or e2fsck -C0 -f -v /dev/sda5 or something else ?

EricTRA 02-05-2010 10:06 AM

Hi,

Sorry for the late reply, just got home. Try in the maintenance console:
Code:

fsck -r /dev/sda5
and see where that leads. Post the output please.

Kind regards,

Eric

elishac 02-05-2010 10:36 AM

The output was :
/dev/sda5 contains a file system with errors, check forced.
pass1:...
...
pass4:...unattached inode 1431542
connect to /lost+found<y>?

(i suppose it's "yes" but I'll just wait for you to tell me to be sure)

EricTRA 02-05-2010 10:39 AM

Hi,

Just accept by typing y

Kind regards,

Eric

elishac 02-05-2010 11:55 AM

Sorry I didn't see you had answered.
I pressed yes but another question appeared.
inode 1431542 ref count is 2, should be 1. fix<y>?

EricTRA 02-05-2010 11:56 AM

Hi,

Answer yes (y) again.

Kind regards,

Eric

elishac 02-05-2010 12:15 PM

another yes/no question... should i answer yes to all of them?
this time the question is :
pass5: checking group summary information
block bitmap differences: +1488039 + 1488045 + 1488051 + 1488053
fix<y> ?

EricTRA 02-05-2010 12:17 PM

Hi,

If the errors seem similar and the choice is presented then answer yes to all of them.

Kind regards,

Eric

elishac 02-05-2010 12:23 PM

ok, i answered yes to all of them. the questions were :
free blocks count for group #xx (yy, count = zz). fix?
free blocks count (xx, count = yy). fix?
inode bitmap differences: +xx. fix?

and then :
/dev/sda5 : file system modified. Reboot linux.
root:^#

EricTRA 02-05-2010 12:39 PM

Hello,

Ok, let's see where the reboot takes you and if everything is indeed fixed so that you can access your system again and 'undo' what you've done in the first place.

Kind regards,

Eric

elishac 02-05-2010 01:34 PM

Ok so I wrote reboot (I suppose that's what you meant), a few lines appeared and it restarted.
Not that it matters for the main problem, but I've always wondered : where are the lines that appear on start up/shut down logged ? (I'm sure they're logged somewhere otherwise it's useless, as you don't have time to read them).

Anyway, now I'm back to the login window. It seems it's ok.
So how can I delete what I did in the first place ?

EricTRA 02-05-2010 01:39 PM

Hi,

First of all, check if you can log in to your system and tryout a couple of things. Also check if you can use su or sudo in a terminal. Main issue is to have full access to your system, otherwise you will not be able to complete the necessary steps I think.

Kind regards,

Eric

elishac 02-05-2010 01:42 PM

Yes I can use sudo.

EricTRA 02-05-2010 02:04 PM

So basically, you've got your system up and running again? That's good news. Regarding the package you installed, I've never installed it myself that way. Since it doesn't have an uninstall option (like you checked with repo) it's going to be a lot harder I think to do it correctly and completely, and more important without breaking anything again.

First of all I had a look at the site where you got the download from. May I ask why you downloaded version 0.77 and not the latest? Is there any particular reason for that?

You could delete the files that are created and the links to them. Files are described here.

Do you have a log file in the directory from where you ran the install? If you do, then check that log file to find out what was installed and where, such as links as per your first post.

If there's no log file then we'll have to go through the scripts to find out what's done in order to undo it.

Kind regards,

Eric

elishac 02-05-2010 02:14 PM

Yes it seems to be running again.
No there's no reason I installed the 0.77, I just didn't know it wasn't the latest.
I didn't find any file called exactly "log", but there's quite a lot of files including the word "log", as i found out during a quick search :
changelog, config.log, faillog.h,pam_lastlog.c, pam_nologin.c,...
(do you want me to list all of them?)

EricTRA 02-05-2010 02:17 PM

Have a look inside the config.log if it mentions locations and files that are installed.

Kind regards,

Eric

EricTRA 02-05-2010 02:22 PM

In the meantime, may I offer you a small advice? Actually two?

1. If you want to install things and don't want to run the risk of breaking your system, stick to the package manager (also stated by repo) instead of installing from source until you know what the installation will do. To find out what it will do, read what's in the package, the README, INSTALL and other files are there for a reason. And don't install old versions of software unless you really need them/want them.

2. If you want to experiment and install from source, you'll have to take into account that you might break your system. So be prepared that you might have to reinstall everything (if the break cannot be fixed). So; the golden rule: BACKUP, BACKUP, BACKUP.

Kind regards,

Eric

EricTRA 02-05-2010 02:24 PM

:D

On the other hand: You're learning a lot about fixing broken things real fast.
:D

Kind regards,

Eric

elishac 02-05-2010 02:29 PM

Yeah I know. But I was quite in a hurry to try this, and I don't think it is in the package manager.

the config.log file is quite big.
there are some c-like lines. gcc is mentionned some times as well.
the first two lines are :
this file contains any messages produced by the compilers while running configure, to aid debugging if configure makes a mistake.
Would you like me to mail you the whole file ? (312 lines)

elishac 02-05-2010 02:30 PM

Quote:

On the other hand: You're learning a lot about fixing broken things real fast.
yeah, that's what i would like us to review everything we've done when it's fixed, if you don't mind, because so far I didn't really understand half of the things i did.

EricTRA 02-05-2010 02:31 PM

Sure, I'll have a look at it to see if it holds what you need to remove installed things.

Kind regards,

Eric

EricTRA 02-05-2010 02:33 PM

Quote:

Originally Posted by elishac (Post 3854172)
yeah, that's what i would like us to review everything we've done when it's fixed, if you don't mind, because so far I didn't really understand half of the things i did.

I don't mind at all.

EricTRA 02-05-2010 03:00 PM

Hello,

I had a quick look at the log you mailed me but didn't see anything that can be of use. Can you check if you don't have an install.log or so in the directory where you ran the install from?

Kind regards,

Eric

elishac 02-05-2010 03:18 PM

ls ~/Downloads/Linux-PAM-0.77 :
bin config.status doc libpam_misc _pam_aconf.h
CHANGELOG configure dynamic Makefile _pam_aconf.h.in
conf configure.in examples Make.Rules pgp.keys.asc
config.cache Copyright libpam Make.Rules.in README
config.log defs libpamc modules security

of which the following are directories :
bin, conf, defs, doc, dynamic, examples, libpam, libpamc, libpam_misc, modules, security.

Would you like me to compress and send you all the ~/Downloads/Linux-PAM-0.77 ? (3MB uncompress)

EricTRA 02-06-2010 01:12 AM

Hello,

Yes, you can do that. Then I'll have a look if I can find something that gives you a complete list of what to delete/change in order to get your system to the previous state.

Kind regards,

Eric

elishac 02-06-2010 08:32 AM

I sent you an email.

EricTRA 02-06-2010 08:35 AM

Quote:

Originally Posted by elishac (Post 3854739)
I sent you an email.

To which I just replied. :)

Kind regards,

Eric

elishac 02-06-2010 09:02 AM

I'm embarrassed. When I right click and go to properties, it is said the file is 2.9MB. But the archive is 30MB (?) ; and I can only send up to 10MB with my email account :(.

EricTRA 02-06-2010 09:04 AM

Hi,

That can happen to all of us. Send just the files in the directory where you ran the installation from, excluding the subdirectories.

Kind regards,

Eric

elishac 02-06-2010 09:05 AM

I just noticed a weird thing. In $HOME/Downloads/Linux-PAM-0.77, there's a folder (called security) that points to $HOME/Downloads/Linux-PAM-0.77... The archive manager should either ignore it or go to an infinite loop, but why stop at 30MB?


All times are GMT -5. The time now is 10:44 PM.