Operating System - HP-UX
1850909 Members
2898 Online
104056 Solutions
New Discussion

Re: kicked off from logging

 
SOLVED
Go to solution
Stan_17
Valued Contributor

kicked off from logging

Hi there,

for some reasons, if i login as user x with a valid password it allows me in, but immediately logs out. however if i login as root, no problems whatsoever. This weird thing started to happen only today.

what should i look for resolve this issue.

thanks!
15 REPLIES 15
Jeff Schussele
Honored Contributor

Re: kicked off from logging

Hi Stan,

I'd take a hard look at that user's .profile (.login if csh) & whatever else it's calling.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: kicked off from logging

Hi:

Did you modify user x's profile? For instance, and 'exit' at the end of the profile would account for this behavior.

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: kicked off from logging

Has this user (user x) profile (the "dot" files) changed or modified ?
Paul Sperry
Honored Contributor

Re: kicked off from logging

log in as root and look at the users .login or
.profile. I used to play pranks on people by editing those file to log them out right after they logged in.
Stan_17
Valued Contributor

Re: kicked off from logging

okay, i'm sure i haven't changed anything on .profile of user 'x', also i see a core file been generated today on x user home dir.

here is snip of .profile that i have.

bash-2.05# more .profile

# @(#) $Revision: 72.2 $

# Default user .profile file (/usr/bin/sh initialization).

# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs

# Set up the search paths:
PATH=$PATH:.

# Set up the shell environment:
set -u
trap "echo 'logout'" 0

# Set up the shell variables:
EDITOR=vi
export EDITOR
Rajeev  Shukla
Honored Contributor

Re: kicked off from logging

If its only user X definately there is something wrong with his .profile check for any exit command or any script called which has exit.
Dave La Mar
Honored Contributor

Re: kicked off from logging

Stan -
To some this is an old joke. Routinely, as others have pointed out, the .profile has been changed, but it could also be in the .cshrc, .kshrc, or whatever shell the user has been assigned.
Don't be fooled by time stamps.
Touch -t is often used to cover tracks.

Best of Luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Stan_17
Valued Contributor

Re: kicked off from logging

i know for sure the .profile hasn't changed. besides, if i su - x uuser from root, i can login sucessfully, so if i have a problem with .profile of x user, shouldn't i get kick-off when i su - x.

this happens only when i login direcly as user x.

Dave La Mar
Honored Contributor

Re: kicked off from logging

Stan -
Again, does the user have an assigned shell. What does their dot file for the shell look like.
One other place to look would be in /etc/profile as all users access this prior to their own .profiles.
Ours has been modified to perform different things based on the user id.
If possible, could you respond and attach the mentioned items?

Hang in there, we'll get it.

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Stan_17
Valued Contributor

Re: kicked off from logging

hi dave,

yes the user x has been assigned a bash shell. however i don't see a .bash_profile in x's home dir. i've already posted the .profile of user x.

as per your request, i'm also attaching /etc/profile. wondering what could be the reasons of not working today. anyways, let me know what you find.

thanks,
Stan
Dave La Mar
Honored Contributor

Re: kicked off from logging

Stan -
One more attempt before I leave for the day ...
Not noticed before was the bash reference (I'm going blind.).
Assuming this is linux, my linux for dummies indicates it could be due to the .bash_profile you say is missing, or to a missing .bashrc.

I tried to duplicate this in HP-UX.
In the password file for a given user I declared a shell on that user's entry but put no .profile or dot file for the shell type.

Next I tried to login as the user and bang!==> no shell, I was logged out.

Can I suggest copying in a .bash_profile or .bashrc from another user to this one's home directory?

As I said before, Hang In There, we'll get this.

Will pick up your reply in the a.m.

Go get 'em Stan.

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Stan_17
Valued Contributor

Re: kicked off from logging

hi dave,

sorry for not posting this info. earlier. this happens on a hpux B.11.00 U 9000/800 box.

another strange thing is that i've another user 'y', its shell is also bash but it doesn't have a .bash_profile (only .profile like user x) no log-on problems with user y (direct).

so i think the problem is some where else ?
Dave La Mar
Honored Contributor
Solution

Re: kicked off from logging

Stan -
Next plan of attack.
1. Rename the current .profile.
2. Copy in the .profile from a working user.

If the problem still exists -
1. Does someone else have root priviledge?
2. Is there a script running that might be searching for the user log in, then killing the pid? (another old practical joke.)

The diffrence you see in doing an su is explained in "man su".

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Stephanie Jenkins_1
New Member

Re: kicked off from logging

Where is the home directory located. Local machine or server? If the home directory is located on the server, check to see if the mounts are working properly. We had this issue here.
Steph
Stan_17
Valued Contributor

Re: kicked off from logging

Dave, finally i got it work. renamed current .profile and copied over the profile from a working user.

thanks for everyone's help