You are not logged in.

#1 2016-05-25 19:44:27

bashterm
Member
Registered: 2015-11-23
Posts: 4

[SOLVED]Bash error when trying to su to another user

I have a user on my system called lfs. If I try to su into that user, by entering:

su - lfs 

and then enter the password at the prompt I get this error:

-bash: exec: eng: not found

Any help would be appreciated!

Thanks,

Bashterm

Last edited by bashterm (2016-05-25 21:35:26)

Offline

#2 2016-05-25 19:49:19

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED]Bash error when trying to su to another user

Please post the content of /home/lfs/.bash_profile & /home/lfs/.bashrc

If this is for building an LFS system then these files should *not* exist, see http://www.linuxfromscratch.org/lfs/vie … guser.html

Offline

#3 2016-05-25 19:52:41

bashterm
Member
Registered: 2015-11-23
Posts: 4

Re: [SOLVED]Bash error when trying to su to another user

.bash_profile has:

exec eng -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash

and .bashrc has:

set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_G=$ (uname -m) -lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH

I got the instructions to make these files like this from their book, in chapter 4.4 of LFS v7.9. the link is here

Thanks for the speedy reply!

Bashterm

Last edited by bashterm (2016-05-25 19:54:33)

Offline

#4 2016-05-25 19:58:27

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: [SOLVED]Bash error when trying to su to another user

Just a typo then ?

Offline

#5 2016-05-25 20:04:22

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED]Bash error when trying to su to another user

bashterm wrote:

I got the instructions to make these files like this from their book, in chapter 4.4 of LFS v7.9. the link is here

Ahem, yes well it's been a while since I last built LFS -- sorry about that... big_smile

You have a typo, ~/.bash_profile should be:

exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash

You have eng, it should be env wink

EDIT: Just to note, linuxquestions.org have a dedicated LFS subforum with some very knowledgeable members -- that would probably have been a better place to post this query:
https://www.linuxquestions.org/question … cratch-13/

Last edited by Head_on_a_Stick (2016-05-25 20:11:51)

Offline

#6 2016-05-25 20:11:27

bashterm
Member
Registered: 2015-11-23
Posts: 4

Re: [SOLVED]Bash error when trying to su to another user

I appear to have misspelled env in the bash profile. Sorry about that.

Head on a Stick, we reached the same conclusion at roughly the same time!

Thanks for you Time!

Last edited by bashterm (2016-05-25 20:12:34)

Offline

#7 2016-05-25 20:35:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Bash error when trying to su to another user

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB