root login bash alias notifications
A few weeks ago, I began seeing these messages when logging into root using SSH.
-bash: alias: source: not found
-bash: alias: /root/.bashrc: not found
-bash: alias: source: not found
-bash: alias: /root/.bashrc: not found
-bash: alias: source: not found
-bash: alias: /root/.bashrc: not found
The login used to be clean and I have done nothing intentional to set up bash aliases. So far, it hasn't inhibited anything I want to do while logged in but I'd like to fix the problem and I honestly don't know where to begin. None of my internet searches have produced useful solutions.
This is my server version information:
Server version: Apache/2.4.41 (cPanel)
Server built: Sep 16 2019 17:10:52
Any advice leading to a solution would be greatly appreciated.
-
Hello, Is anything added in /root/.bash_profile
or/root/.bashrc
? What are the permissions of/root/.bashrc
?stat /root/.bashrc0 -
No. I've not added anything to those files. Up until a few weeks ago, these notifications weren't happening when I used SSH to login to root. Here are the results of the commend you told me to run: root@server [~]# stat /root/.bashrc File: '/root/.bashrc' Size: 455 Blocks: 8 IO Block: 4096 regular file Device: 16h/22d Inode: 37753620 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-11-18 12:24:03.812056593 -0800 Modify: 2019-09-22 09:25:35.560599410 -0700 Change: 2019-09-22 09:25:35.560599410 -0700 Birth: -0 -
Whether or not you've added anything to the files, I'd like to know if anything is present within them. The size indicates that there is data within, the permissions are correct. 0 -
Here is the output from /root/.bashrc_profile root@server [~]# cat /root/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
Here is the output from /root/.bashrcroot@server [~]# cat /root/.bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi alias composer="php -d allow_url_fopen=On /home/virtuall/composer.phar" source /root/.bashrc alias composer="php -d allow_url_fopen=On /home/virtuall/composer.phar" source /root/.bashrc alias composer="php -d allow_url_fopen=On /home/virtuall/composer.phar" source /root/.bashrc0 -
By default the following is present: [root@server ~]# cat /root/.bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi
If you remove those lines at the bottom does the issue persist?0 -
That did it. Maybe those were added by me when I was trying to implement some software that was supposed to help with updating php code. My bad! Thanks for your help. 0
Please sign in to leave a comment.
Comments
6 comments