LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2004, 07:47 PM   #1
nmayotte
Member
 
Registered: Jan 2004
Location: Minnesota
Distribution: SuSE 8.0-9.0
Posts: 37

Rep: Reputation: 15
weird login problem


This may end up being a scripting question, so I wasn't sure if it should go here or in the programming forum. But here goes... Sometimes when users try to log into a machine they can type their username and password in, then the screen goes black and then the login splash screen appears again, and then they can login normally. This has only happened on a couple machines, which are hardware and software identical to a dozen others that haven't had problems. They run SuSE 8.2. My hunch is that the problem is in these two nanny scripts that I have running, but I am not sure. I haven't been able to replicate the problem for me, even by running the scripts by hand. Does anyone have any ideas what could cause this or where to look to try to fix it? I can post the two scripts that I'm suspicious of if anyone wants to try to decipher them to see if they could be the root of the problem.
 
Old 04-05-2004, 09:27 PM   #2
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
That does sound pretty strange...post the scripts, and that way we can look at them. Also, have these machines always behaved this way or is this a new problem?
 
Old 04-07-2004, 02:56 PM   #3
nmayotte
Member
 
Registered: Jan 2004
Location: Minnesota
Distribution: SuSE 8.0-9.0
Posts: 37

Original Poster
Rep: Reputation: 15
I think, this has been going on since I imaged the machines in the fall, altough I've only just heard about it recently.

First one:

#!/bin/sh

# This script is designed to nanny a daemon. It can be run from cron and it wil
l restart a daemon if it has determined that the daemon has died.
#

PS_MATCH=postfix
RESTART="/etc/rc.d/postfix start"

PS_OUT=`/bin/ps -e -f | grep $PS_MATCH | grep -v nanny | grep -v root`
echo $PS_OUT > /tmp/nanny2.tmp
WC_OUT=`/usr/bin/wc -c /tmp/nanny2.tmp | awk -F"/" '{print $1}' | sed s/" "//g`

if [ $WC_OUT -lt 2 ]
then
PS_OUT2=`/bin/ps -e -f | grep $PS_MATCH | grep -v nanny | grep -v root
`
echo $PS_OUT2 > /tmp/nanny2.tmp
WC_OUT2=`/usr/bin/wc -c /tmp/nanny2.tmp | awk -F"/" '{print $1}' | sed
s/" "//g`
if [ $WC_OUT2 -lt 2 ]
then
$RESTART
echo "will restart"
else
echo "is running"
fi
else
echo "is running-1st"
fi


Second one:

#!/bin/sh

# This script is designed to nanny a daemon. It can be run from cron and it wil
l restart a daemon if it has determined that the daemon has died.
#

PS_MATCH=rpc.statd
RESTART=/sbin/rpc.statd

PS_OUT=`/bin/ps -e -f | grep $PS_MATCH | grep -v grep`
echo $PS_OUT > /tmp/nanny.tmp
WC_OUT=`/usr/bin/wc -c /tmp/nanny.tmp | awk -F"/" '{print $1}' | sed s/" "//g`

if [ $WC_OUT -lt 2 ]
then
PS_OUT2=`/bin/ps -e -f | grep $PS_MATCH | grep -v grep`
echo $PS_OUT2 > /tmp/nanny2.tmp
WC_OUT2=`/usr/bin/wc -c /tmp/nanny2.tmp | awk -F"/" '{print $1}' | sed
s/" "//g`
if [ $WC_OUT2 -lt 2 ]
then
$RESTART
echo "will restart"
else
echo "is running"
fi
else
echo "is running-1st"
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
weird, weird problems with logitech precision USB gamepad ikataii Linux - Hardware 4 10-14-2005 05:31 AM
Login screen weird problem TigerLinux SUSE / openSUSE 5 10-05-2005 07:47 PM
Weird switch between login managers maelstrom209 Linux - Software 1 12-15-2004 07:04 PM
Weird, weird apache2 problem atheist Debian 1 09-17-2004 09:26 PM
weird kernel problem and fs mount problem intense Slackware 5 03-16-2004 01:36 PM


All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration