Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using a server running Suse Enterprise 11.1. I need to add some locations to the path for all users and for all the shells. Is there a nice and easy way to do this or do I have to modify the profile file for each shell.

Also I don't know if this is the default config for suse or if someone mess the server up, but there isn't a /etc/profile nor a /etc/shellnameprofile.local

How can I archive this? Please help.

share|improve this question
add comment

2 Answers

You can set the default path for all users in /etc/login.defs.

ENV_SUPATH PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/extra/dir
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/extra/dir
share|improve this answer
    
I tried this but it didn't work. –  Topo Feb 15 '13 at 21:45
add comment

Just in addition - If a SuSE dist and the bash shell is used, you can put the path modifications also into

/etc/bash.bashrc.local

PATH=$PATH:/my/myscripts
export PATH
share|improve this answer
    
But if I need it to work in other shells like ksh it doesnt't work. –  Topo Feb 15 '13 at 21:46
    
Yes, it's just an additional information for other SLES / bash users –  domi27 Feb 16 '13 at 12:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.