Overwrote ~/.bashrc!

Bug #1733206 reported by Casey Fitzpatrick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LFScript
Invalid
Undecided
Unassigned

Bug Description

Ran `./lfscript -B` as root on a Debian Jessie system, got the following error:
```
  [17-11-19/15:52 UTC] Changing privileges (su): Now running as user 'lfs'
  -su: /sources/buildmgr/buildmgr: Permission denied
  [17-11-19/15:52 UTC] UNEXPECTED PERMISSION ERROR
  [17-11-19/15:52 UTC] A command could not be executed. Most likely you are
  [17-11-19/15:52 UTC] running this program from within a directory which is not
  [17-11-19/15:52 UTC] publicly available.
```
Aborted the build and removed LFScript it since it became clear to me that this script was not what I expected from a build system. I don't think a build script should require alternate users and other strange setup and constantly require looking at the wiki rather than giving helpful error messages and options in the utility itself.

Then I discovered launching terminals on my system no longer worked. At first I thought it was the symlink I had to create `ln -svf bash /bin/sh`, but no, I found this in my .bashrc:
```
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH
/sources/buildmgr/buildmgr --resumebasebuild
exit
```

No no no. No. No no. Why in the hells no. Jesus christ no. No. Why would? No, you know what? No good reason for this. No.

Revision history for this message
Marcel van den Boer (synthehol) wrote :

You do not seem to understand the goal of this project; Nor have you read the documentation:

"--- Before you start ---
It is recommended that you use LFScript on a virtual machine like VirtualBox. This allows you to experiment freely without any risk that you destroy your host system."

(quote from https://www.lfscript.org/wiki/index.php/Quick_Start)

Changed in lfscript:
status: New → Invalid
Revision history for this message
Casey Fitzpatrick (kcghost) wrote :

You do not seem to understand what the word "recommended" means. You act like trashing the host system is somehow a feature. That is insane. This is clearly a bug and exemplary of particularly bad design. Even if I was running in VirtualBox, I wouldn't exactly be pleased that a build script took over my whole VM. I know of no other build system that touches a damn thing outside of the current directory, there isn't a reason to outside of an 'install' target or equivalent.

Revision history for this message
Marcel van den Boer (synthehol) wrote :

Please, read "Linux From Scratch" (http://www.linuxfromscratch.org/lfs/view/stable/), the online book on which this project is based. It explains exactly why it does what it does.

If you have not done that before running LFScript, I have no idea why you were running it in the first place. If you have, you know that potentially dangerous commands are executed.

Don't get me wrong. I'm really sorry if LFScript thrashed your system. But you were running a piece of software you did not understand in a production environment, also giving it root privileges. You should never, ever, do that. (But I also learned that the hard way)

This really would be a non-issue on a VM; If something went wrong you would simply reset it to a snapshot that was taken before running LFScript.

Clearly something went wrong. And you are upset, I understand. But no, this is not a bug. From what you have told me either your host system was not set up properly, or you used LFScript in the wrong way.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.