[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Problem setting aliases



On Tue, 13 Feb 2001, Dirch wrote:

> I have a problem setting aliases for the user root.
> I want to assign some helpful commands to shortcuts, like "alias
> la='ls -la'". If I put this line in .profile for a normal user it works
> fine, but if I change to root via su the /root/.profile seems not to be
> mentioned. Where do I have to put the aliases for root in ?

In the normal place, there's a subtle feature that su has, if you just 'su
root' , it doesn't do a complete login, this is intentional, as you would
be unable to fix a bad shell profile , there is no account with more
privileges than root to use to do it, if you want to become root in the
same was you would if you had actually logged in, add the dash to su, eg
su - root

gsh