-1

I need to run a script in /etc/profile to setup aliases for all users login thru SSH. But this doesn't work:

setup_aliases.sh

#!/bin/bash
alias d='sh /opt/d/d.sh'
alias dc='d c'
alias de='d e'


------------
append this to: /etc/profile
. /opt/d/setup_aliases.sh

After login, I type 'd' but it says "command not found". Please help. Thanks. (I'm using Debian5)

ngduc
  • 109
  • 2

1 Answers1

2

You login as ? I'm assuming you log ing as root which

(a) by default skips some of the initialization scripts (like /etc/bash_completion e.g.) (b) might run a restricted shell

Could this be (related) to what is happening?

You could do

bash -x -l

to see what happens, and optionally save it to some location for insepction

sehe
  • 450
  • 3
  • 9