RH6.1 wierdness.

A colleagues machine has a bit of a wierdness built in :=)

When he logs on as root he has aliases defined, but as a normal user there are no aliases, all users use tcsh.

More specifically he would like to enable "colored ls" for all users.
LVL 12
j2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

j2Author Commented:
even more wierd, when he logs on the alias command gives

mc      setenv MC `/usr/bin/mc -P !*`; cd $MC; unsetenv MC

but after launching screen, alias returns blank.

root however has the aliases

alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

regardless if logged on directly, or in a screened session.

clues?

0
jamesRCommented:
Aliases are defined in either the globally, or locally.

Have a look in the root home directory ( /root ), for the local alias files ..

'ls -a' will list the dot-files in root's home directory. You can then see a file called .cshrc or .login or .tcshrc ( note the leading . )

The aliases that are missing from other users are probably defined in one of those files.

If they are you can add them to the global file '/etc/cshrc', '/etc/tcshrc', '/etc/login' ( without the leading dot! ).

I'll guess that the rm, mv and cp aliases are defined in the global file.

The end of the man page for tcsh ( 'man tcsh' ) should tell you the exact names of the files it uses.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
j2Author Commented:
Uhm, creating a /etc/tcshrc didnt help, neither did a /etc/cshrc.

creating a local .tcshrc helped. But can we set this globally for all users to have a "skeleton" config?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

gruseCommented:
As you (or your friend) is using RH6.1, there should be a /etc/skel directory, where skeleton profiles are kept. Those are copied when new users are added by using the "useradd" command. I don't know if those files are used if user accounts are added by other methods like linuxconf.

> Uhm, creating a /etc/tcshrc didnt help, neither did a /etc/cshrc.

But did you try /etc/login, as j2 suggested? That *should* do it...

Another point to check may be the access rights to those profile files. A lot of modern shells check that
a) global profiles are not world-writable
b) local profiles are only user-writeable
and don't execute them if not, as they may have been compromised. Some "echo" commands in those files will reveal if they are executed or not.
0
jamesRCommented:
I've just checked the tcsh man page.. the global files for tcsh are /etc/csh.cshrc and /etc/csh.login. Have a look there for the global settings.

Using /etc/skel is the correct choice to set defaults for all users. It will only work when you setup new users though, it won't change anything for users that already exist.
0
j2Author Commented:
Redhat seems to have modified that.. because for me .tcshrc is what i need to use, but now i have got the general idea. And since the you gave me the general idea, the points are your. Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.