You are not logged in.

#1 2006-10-06 22:47:10

Slash
Member
Registered: 2005-04-19
Posts: 66
Website

AUTOFS

Can anyone confirm this bug with autofs?

Stop autofs. I recommend doing it twice so it gives a "FAIL" message, to confirm it stopped. Sometimes stop doesn't actually unmount the directory.

/etc/rc.d/autofs stop
/etc/rc.d/autofs stop

Now, by default the permissions of the files in /etc/autofs are:

-rw-r--r--  1 root root  247 2006-10-05 16:45 auto.master
-rw-r--r--  1 root root  110 2006-10-05 16:47 auto.media
-rw-r--r--  1 root root  409 2006-09-21 14:19 auto.misc
-rwxr-xr-x 1 root root 1087 2006-09-21 14:19 auto.net

Change all of them to 755.

chmod 755 /etc/autofs/*

Start autofs again.

/etc/rc.d/autofs start

Does it still work? It doesn't work for me. My friend had a problem with autofs not working after a reinstall. It was driving us INSANE trying to figure out why the hell it wouldn't work. The error log says something worthless like:

automount[15043]: lookup(program): lookup for dvd failed
automount[15043]: failed to mount /media/dvd

Searching for information on this error just leads you down the wrong path, I ended up recompiling and messing with things I didn't need to. Turns out the reason my friend had this problem is because he restored his configs from a backup made on a vfat permission, so they were all 755. Changing auto.master, auto.media, auto.misc back to 644 corrected the problem and autofs works fine.

I also had problems upon reinstall of my OS recently, I didn't backup/restore my configs like my friend, but after banging my head against the wall for hours, it magically started working and I think it was because I needed a blank line at the end of one of my config files. UGH.

Does autofs have a website where bugs can be reported? Are the developers aware of stuff like this? I like autofs but the bugs like these make Slashbunny go crazy. :shock:

Offline

#2 2006-10-07 08:35:13

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: AUTOFS

Slash wrote:

Turns out the reason my friend had this problem is because he restored his configs from a backup made on a vfat permission, so they were all 755. Changing auto.master, auto.media, auto.misc back to 644 corrected the problem and autofs works fine.

That was bad idea. Wrong permissions on config files lead to security issues and wrong behaviour of some software. He should first make a tar archive of config files, this will preserve all permissions and symlinks.

Slash wrote:

I also had problems upon reinstall of my OS recently, I didn't backup/restore my configs like my friend, but after banging my head against the wall for hours, it magically started working and I think it was because I needed a blank line at the end of one of my config files. UGH.

This is mentioned on Wiki page.


to live is to die

Offline

#3 2006-10-11 08:08:23

nahoj
Member
Registered: 2004-11-05
Posts: 30

Re: AUTOFS

Thank you Slash!
I have been struggling for long to get autofs to work again! I had a disc-crash but managed to get the old disc work again enough long to copy /etc to a usb-stick. But when I reinstalled everything autofs would just not work!

Should be a good idea to add in the wiki that permissions need to be 644 for all files in /etc/autofs. That solved my issue!

And if my - and probably many other guys - way of saving configurations by copying /etc to a usb-stick is a bad idea, maybe someone could make an wiki on best way to handle these panic situations (ie how to preserve configurations when you need to reinstall whole system to a new disc).

smile


Computers never saves time - but they help you produce more in the same timespan...

Offline

#4 2006-10-11 16:15:58

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: AUTOFS

nahoj wrote:

maybe someone could make an wiki on best way to handle these panic situations

Backup:

$ sudo tar -czvvf configs.tar.gz /etc
$ cp configs.tar.gz /mnt/thumbstick

Restore:

$ cd /
$ sudo tar -xzvvf /mnt/thumbstick/configs.tar.gz

Offline

Board footer

Powered by FluxBB