lfs is not in sudoers file error in LFS 6.6
Hello all,
I started to work on my LFS system a few days ago and was impressed with everything going smoothly. However, I think I might have done something wrong. I thought I had followed the instructions in the book to the letter, but maybe someone can point me in the right direction? I'm using Ubuntu 10.04 as a host system, LFS version 6.6, and am only somewhat new to Linux. If I can put anything else here that would help my question be answered, please let me know. My problem is this: I have gotten all the way to section 5.4, and it's time to build Binutils-2.20. I am executing these commands as lfs, as specified. The first command is Code:
mkdir -v ../binutils-build Code:
sudo mkdir -v ../binutils-build Where could I have gone wrong? I'm very sure I followed the instructions in the book to the letter. If additional details are needed, please let me know, and thanks in advance for any help, it is much appreciated! |
Hi,
check the permissions and owner of Code:
$LFS/sources Hope this helps. |
binutils problem
Mee too facing the same problem....
please share me any suggestion to get rid of such problem.... Not able to run the patch, of binutils.... thanks, Audhil |
Hi
What version of lfs are you building what chapter are you on |
Quote:
Just to make sure: You also get the "lfs is not in the sudoers file. This incident will be reported." message? If so, the solution is simple: You should not use sudo when building lfs, you need a full blown root account (su - ) and then start building lfs. |
Post the output of version-check
also Code:
ls -l /mnt/lfs Code:
ls -l /mnt/lfs/source |
binutils problem
I am building lfs version 7.2...
As per druuna's advice if I become root using su - command, if I may do anything wrong will cause me severe damage...For the sake of security I created (as per the direction given in LFS) a new user lfs to avoid such situations... How to overcome..this..? Please suggest me hints to add my new user lfs into sudoers config file, it will be very helpful... to me... -Audhil... |
Quote:
When you build an LFS system you do need the full power of the root user (only chapter 5 is done as the lfs user). If you don't feel comfortable using root on the machine you do your daily routines I would suggest setting up a virtual machine, install a host and build LFS inside the VM. This way you can only foobar your VM session. |
Hi
At what point/chapter are you using sudo? pls |
binutils problem
Hi,
After big research, I found solution to my problem....I followed these steps... 1) Earlier I found errors like this lfs@boss:/media/LFS$ mkdir audhil mkdir: cannot create directory `audhil': Permission denied lfs@boss:/media/LFS$ sudo mkdir audhil [sudo] password for lfs: Sorry, try again. [sudo] password for lfs: lfs is not in the sudoers file. This incident will be reported. <-- I got this after entering my correct password of lfs user lfs@boss:/media/LFS$ 2) After, adding a line %lfs ALL=(ALL) NOPASSWD: ALL at bottom of /etc/sudoers file It works pretty good, lfs@boss:/media/LFS$ mkdir audhil mkdir: cannot create directory `audhil': Permission denied lfs@boss:/media/LFS$ sudo mkdir audhil lfs@boss:/media/LFS$ ls audhil lost+found sources tools lfs@boss:/media/LFS$ rm audhil -R rm: remove write-protected directory `audhil'? y rm: cannot remove `audhil': Permission denied lfs@boss:/media/LFS$ sudo rm audhil -R lfs@boss:~$ But the problem is I need to enter sudo each and every time, even for a simple task as follows, lfs@boss:/media/LFS$ sudo vim dummy.c lfs@boss:/media/LFS$ gcc dummy.c /usr/bin/ld: cannot open output file a.out: Permission denied collect2: ld returned 1 exit status lfs@boss:/media/LFS$ sudo gcc dummy.c lfs@boss:/media/LFS$ ./a.out jack and jill went upto hill lfs@boss:/media/LFS$ For your information, /media/LFS is the partition which I used to mount it during LFS building process... My query, whether is that safe to build LFS under this scenario...using much more 'sudos'? -Audhil |
Quote:
All the other commands in the book must be done as root user. I've already told you multiple times that you should NOT use sudo. If you still want to use sudo to build LFS then every command (except from 4.3 to 5.33) must be done using sudo <command> (or sudo su -). BTW: good luck with that..... |
@smdaudhilbe:
Quote:
Warning: DO NOT TRY OUT THE BELOW EXAMPLE COMMANDS !!!! The following command will do the same thing (and are as dangerous): Code:
su - Code:
sudo rm -rf / Warning: DO NOT TRY OUT THE ABVOE EXAMPLE COMMANDS !!!! In most cases you do not want to be working as root user and using sudo to do the occasional command that needs root permissions is seen as a good thing, building LFS isn't one of those cases. |
Hi
can you post the oitput ls -l mnt/lfs |
Hi @spiky0011 I face the same error and here is the output of version check ls -l /mnt/lfs
total 24 drwx------ 2 root root 16384 Oct 5 22:14 lost+found drwxrwxrwt 2 lfs root 4096 Oct 6 00:54 sources drwxr-xr-x 2 lfs root 4096 Oct 6 00:57 tools PS: I am compiling version 7.6 and I get this error at section 5.4.1 of the book. |
aashil16
Hi can you start a new Thread Pls. Then can you post the output of the version-check from this page " To make sure your host is compliant." What host are you using? http://www.linuxfromscratch.org/lfs/.../hostreqs.html |
The reason for your problem is the command you used.
If you're already in lfs environment then there's no reason for sudo. The command for entering environment would be Quote:
|
I think this message is strange during lfs build, follow the previous advices.
I had this "problem" but in blfs and i solved with "visudo" and adding my user to wheel group. |
Quote:
|
All times are GMT -5. The time now is 04:23 AM. |