Sample Header Ad - 728x90

bash: cannot set terminal process group (-1): Inappropriate ioctl for device

23 votes
2 answers
119805 views
Trying to execute the source command using "lfs" user on ubuntu 14.04 and getting this: root@linux:~/lfs# su lfs - -c "source ~/.bash_profile" bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell Any ideas? Background info: I am following the LFS book, making a script out of it, so in my script which I execute with sudo, when it gets to this part, after creating the lfs user and his .bashrc and .bashprofile, I guess it is loading it. #Context: echo "info: create 'lfs' group and user..." groupadd -f lfs id -u lfs &>/dev/null || useradd -s /bin/bash -g lfs -m -k /dev/null lfs passwd -d -q lfs echo "info: make 'lfs' own the 'tools' and 'sources' directories..." chown lfs $LFS/tools chown lfs $LFS/sources echo "info: creating a clean '.bash_profile' as user 'lfs'..." su lfs - -c "cat > ~/.bash_profile ~/.bashrc << \"EOF\" 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 EOF" su lfs - -c "source ~/.bash_profile" #Edit: It has been suggested that my syntax is incorrect, I am not at my linux machine at the moment, so will try to use different syntax when I get the chance. However, for info, I got the syntax from the answer here: https://serverfault.com/questions/411307/cannot-set-terminal-process-group-during-su-to-another-user-as-login-shell
Asked by sprocket12 (569 rep)
Nov 21, 2016, 07:11 PM
Last activity: Feb 29, 2024, 12:09 PM