1

I'm connecting to another pc via ssh terminal, and I'm able to, but there appeares two lines which are driving me crazy

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted applicable law.
Last login: Thu May 23 12:45:03 2019 from 192.168.45.45
bash: /home/user/newUser: No such file or directory
bash: /home/user/newUser: No such file or directory

newUser it's a Script which doesn't belongs on there, so I'm wondering how could I remove these lines

$ grep newUser ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2>/dev/null
/home/user/.profile:bash /home/olduser/newUser
/home/user/.profile:bash /home/olduser/newUser

migrated from askubuntu.com May 24 at 7:40

This question came from our site for Ubuntu users and developers.

  • Does grep newUser ~/.bashrc return anything? – dessert May 24 at 7:14
  • Nope, it doesn't return anything – Sayrer May 24 at 7:15
  • Or in any other of your dotfiles? – dessert May 24 at 7:23
  • 2
    Please edit your question and show us the results of this command when run on the remote server, after you log in via ssh: grep newUser ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2>/dev/null. That will tell us which of the startup files is the problem. – terdon May 24 at 7:26
4

The offending file is ~/.profile on the remote system. Just open that file in your favorite text editor:

nano ~/.profile

Find these lines (looks like the line is repeated 2 times):

bash /home/olduser/newUser

And delete them. That should solve the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy