[Bradford] problem with alias

Wayne Hanley wayney at gmail.com
Tue Aug 4 09:25:44 UTC 2009


Hi Martyn,

Thanks for that, it did occur to me after reading your reply that I might
have had some random stuff going on with .bashrc from when I was having
issues with Ibex, sure enough starting with a fresh .bashrc and chucking my
aliases in that as solved it for me.

Many thanks.

Wayne

2009/8/4 Martyn Ranyard <ranyardm at gmail.com>

> Hi Wayne,
>
> hmm... this sounds suspiciously like a .profile vs .bashrc thing.
> I hate trying to work it out (especially at this kind of time when I
> couldn't sleep) but a google for .profile vs .bashrc did come up with some
> interesting links, most immediately clear was this one :
> http://www.linuxquestions.org/questions/linux-general-1/etcprofile-v.s.-etcbashrc-273992/
>
> Are you sure that you haven't set the aliases in both locations for some of
> the machines and only one location for the others?
>
> Just my insomniac instinct, might be way off because of lack of sleep but
> thought I'd share it.
>
> --
> Martyn
>
> On Mon, Aug 3, 2009 at 11:04 PM, Wayne Hanley <wayney at gmail.com> wrote:
>
>> Hi all,
>>
>> I'm having a random issue with my .profile just wondering if anyone might
>> have any suggestions as what is going on.
>>
>> What the problem is is that I have some aliases set up as follows
>>
>> alias kong='ssh admin at kong'
>> alias invader='ssh admin at invader'
>> alias percy='ssh phluidity at percy'
>> alias merlin='ssh phluidity at merlin'
>>
>> I also have corresponding entries in /etc/hosts on my local machine to the
>> machines, the ip's of which are a mixture of local and remote addresses.
>> The random part is that my hosts file is fine, I can browse to the the
>> machines via hostname or do a simple "ping hostname" and that confirms
>> that
>> the right ip's are mapped to the right names so I am almost certain there
>> is
>> nothing wrong with that side of things.
>>
>> So then a simple command of "kong" or "Invader" (both of these are remote
>> machines off my local network ergo have realworld ip's mapped to the host
>> names locally) presents me with a password prompt as you would expect this
>> good.
>>
>> Doing so with either percy or merlin however gives me a "command not
>> found"
>> error.  OK the first time I had edited my .profile so I reload it with ".
>> .profile" no problem try again and all is fine, all four of the aliases
>> work.  Closing that terminal session and then opening another however
>> yields
>> the same problem, I can ping the host names of all four machine and I get
>> the correct IP's responding, but entering just the aliases only kong and
>> invader work, percy and merlin give me the same command not found!  doing
>> a
>> quick ". .profile" again solves the problem for the duration of that shell
>> session.  The problem is persistent between reboots but only for percy and
>> merlin, invader and kong work fine!
>>
>> I have no other conflicting aliases in my .profile I've stripped it back
>> to
>> a virgin .profile with no other custom additions to it and still the
>> problem
>> persists! adding another alias to a IP rather than a hostname gives the
>> same
>> problem changing the string to ssh -l etc gives the same problem also but
>> works fine for invader and kong :/
>>
>> I've tried with several different terminal emulators also just in case.
>>  I'm
>> using Ubuntu 9.04 on the machine showing the problem and all of the
>> servers
>> are running Ubuntu server 8.04lts.  Trying to connect with another alias
>> to
>> a non ubuntu distro gives the same problem, I have tested this with
>> aliases
>> to debian and slackware boxes.
>>
>> Granted it is not a issue I've got around it by running . .profile every
>> time I open a shell and yeah I can automate this, I would like to get to
>> the
>> bottom of the issue though just out of interest.  Any idea's or
>> suggestions
>> as to why this could be happening or how to get around it would be greatly
>> appreciated.
>>
>> Regards
>> Wayne
>>
>> --
>> -------------------------------
>> Geeks are people too.
>> _______________________________________________
>> Bradford mailing list
>> Bradford at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/bradford
>>
>
>


-- 
-------------------------------
Geeks are people too.


More information about the Bradford mailing list