Advertisement

07.08.2008 at 02:43AM PDT, ID: 23545943
[x]
Attachment Details

login script for every user does not work

Asked by 1Tsupp in Linux, Bourne Shell (sh), Bourne-Again Shell (bash)

Tags: , ,

I want files to be copied for every user when they log in to RHEL 5 workstation.
I modified /etc/gdm/PostLogin/Default to execute a script.
This script works if run manually in the terminal by a user account after logging in.
However although it appears to be run when they log in, it does not copy the files and I cannot see any reason why. The echo statements were added for debugging and /var/log/login.log shows it is executed when a user logs in except no files are copied to the home directory.
What am I missing here and how can I debug why files are not being copied?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
localroot="root"
if [ $USER != $localroot ]
then
 date
 echo "   ---Not root" >>/dev/null
 echo "   ---`date` Not root" >>/var/log/login.log
 if [ ! -d /home/$USER/.mplayer ]
  then
   echo "   ---setting up mplayer PostLogin to /home/$USER" >>/var/log/login.log
   `/bin/cp -Rd /etc/skel/.mplayer /home/$USER/`
   `/bin/chown -R $USER /home/$USER/.mplayer`
  fi
 if [ ! -d /home/$USER/.mozilla ]
  then
   echo "   ---setting up mozilla PostLogin to /home/$USER" >>/var/log/login.log
   `/bin/cp -Rd /etc/skel/.mozilla /home/$USER/`
   `/bin/chown -R $USER /home/$USER/.mozilla`
  fi
else
 echo "   --- ROOT user" >>/dev/null
fi
exit 0
[+][-]07.08.2008 at 02:49AM PDT, ID: 21952228

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.08.2008 at 02:55AM PDT, ID: 21952253

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 05:36AM PDT, ID: 21953131

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 06:15AM PDT, ID: 21953425

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 06:29AM PDT, ID: 21953565

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Bourne Shell (sh), Bourne-Again Shell (bash)
Tags: RedHat, RHEL 5, 5.2
Sign Up Now!
Solution Provided By: brutuz
Participating Experts: 3
Solution Grade: B
 
 
[+][-]07.08.2008 at 06:47AM PDT, ID: 21953744

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 06:51AM PDT, ID: 21953783

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.08.2008 at 06:52AM PDT, ID: 21953797

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 06:57AM PDT, ID: 21953858

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.08.2008 at 07:10AM PDT, ID: 21953981

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:26AM PDT, ID: 21954133

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 08:00AM PDT, ID: 21954452

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 08:17AM PDT, ID: 21954620

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.08.2008 at 08:19AM PDT, ID: 21954652

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 08:25AM PDT, ID: 21954718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 08:56AM PDT, ID: 21955078

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.11.2008 at 03:17PM PDT, ID: 21986496

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.11.2008 at 08:39PM PDT, ID: 21987543

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 03:50AM PDT, ID: 21988624

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 07:12AM PDT, ID: 21998181

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628