Re: /etc/profile not executable
In article <slrn7ls6ti.3r1.peter@eyes1.eiserloh> you wrote:
: Last week I installed Debian-2.1 on a few machines, then
: I attempted to put some configuration into profile. Actually
: I created a directory /etc/profile.d and a few scripts within
: it. /etc/profile was modified with
: for file in /etc/profile.d/*.sh ; do
: if [ -x $file ] ; then
: . $file
: fi
: done
: Well, this didn't work. I hadn't gotten it to work at home
: either (back in May when I first got 2.1).
: Curious, I put in some echo lines, and finally discovered
: that /etc/profile was never executed. Soon I found out why,
: just look at the permissions!
: -rw-r--r-- 1 root root 412 May 21 03:08 /etc/profile
: drwxr-xr-x 2 root root 1024 May 21 03:20 /etc/profile.d
: The shell never even attempts to execute profile, so it never
: gets a chance to descend into the subdirectory profile.d.
: /etc/profile should be exectuable by everyone.
: #chmod 755 /etc/profile
/etc/profile should not be executable. It does not contain a
#!/bin/sh
in the begin, because it is used by all bourne shell clones, as well
as korn shell.
First please make sure that the scripts in /etc/profile.d are
executable since you are checking, though they need not be. Second
understand that login shells run /etc/profile. Other shells like
xterms do not, unless you use the -ls option. Login shells can be
checked because they print the message of the day. Other shells do
not. I do not like this action. And have ~/.bashrc do a
. /etc/profile
But please remember that /etc/profile is a global change, and should
only be done there when you want all users to be affected.
--
Dan Nguyen | It is with true love as it is with ghosts;
nguyend7@msu.edu | everyone talks of it, but few have seen it.
dnn@debian.org | -La Rochefocauld, Maxims
25 2F 99 19 6C C9 19 D6 1B 9F F1 E0 E9 10 4C 16
Reply to: