Locked out of normal user when building from slackbuilds

Post here if you are a new Porteus member and you're looking for some help.
rodyaj
White ninja
White ninja
Posts: 16
Joined: 06 Jul 2012, 23:56
Location: Liverpool

Locked out of normal user when building from slackbuilds

Post#1 by rodyaj » 17 Aug 2012, 05:27

I just built a slackbuild of tmux and was happy to see it compile without errors and generate a tgz in my /tmp directory. I converted the tgz with txz2xzm, but it caused catastrophic permission problems. Once the converted .xzm module was activated I couldn't execute any program at all as normal user, so I was effectively locked out the normal user account. The only way I found to save the system was to log in to another tty as root (ctrl-alt-f2) and deactivate the offending package. Rebooting didn't solve the problem.

This appears to be happening with any slackbuild generated package. I tried installing the shc slackbuild from porteus-package-manager: same problem. 64-bit system. 3.4-4 porteus kernel KDE edition. I'm not sure if this applies to all .tgz converted packages, or just slackbuild generated ones.

Posted after 5 hours 54 minutes 51 second:
Thinking about it, I did something rather stupid as root yesterday and somehow managed to chown the whole of var to normal user. So I did chown -R root /var and hoped for the best. Could this be causing side effects?

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Locked out of normal user when building from slackbuilds

Post#2 by Ahau » 17 Aug 2012, 05:45

I just built tmux from slackbuilds (through PPM) while logged in as guest, and everything seemed to work OK. I don't see anything in /var that is supposed to belong to guest (just a couple files that belong to avahi and everything else as root), but something along these lines is most likely the culprit. I usually run into this problem when I create a module with /home/guest and forget to chown it to guest:guest...

You should be able to delete everything from /var out of your changes (I would log in without changes active to do this) to test. In fact, the best test might be to log in without saved changes and try one of the modules that was causing problems -- if it works OK, you know something in your changes is to blame.
Please take a look at our online documentation, here. Suggestions are welcome!

rodyaj
White ninja
White ninja
Posts: 16
Joined: 06 Jul 2012, 23:56
Location: Liverpool

Re: Locked out of normal user when building from slackbuilds

Post#3 by rodyaj » 17 Aug 2012, 06:32

Thanks for the ideas. I booted using the fresh option and the packages I'd already built still caused the errors even in a clean environment. But guess I got lucky as after rebooting back into my changed environment I can all of a sudden build slackbuilds correctly again (don't know how). Even so, I'm still a bit paranoid about what damage I might've done to my /var. I'm going to backup the changes folder and then login without changes and delete /var from changes as you suggested. I'm guessing this will be safe considering the only thing that changes in /var - outside the modules - are log files and cache anyway. Right?

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Locked out of normal user when building from slackbuilds

Post#4 by Ahau » 17 Aug 2012, 12:49

Yes, you should back up your saved changes first (I should have mentioned that... :oops: ) If everything on your system is working fine now, you may not need to do this, but I'm always to curious to avoid experimenting :)

I don't yet understand how an ownership change in /var would affect the slackbuild process, but I can't say that issues are entirely unexpected given the circumstances (did you create your slackbuilds after chowning var back to root, but prior to rebooting?) -- please upload your problematic module for tmux somewhere. I'll download and test it, and compare the files and permissions against the working module I compiled. Perhaps that will point us in the right direction.
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply