?
Solved

unix hp login script

Posted on 2012-04-11
5
Medium Priority
?
435 Views
Last Modified: 2012-04-11
experts,

i have a user acct on my unix server that fires a script when the user logs on. This is some legacy stuff that I'm trying to reverse enginer. I've found the login script that is generated in the user's home directory, but I can't figure out what fires it when he logs in. Can someone help me find out what triggers this script please?

I've looked in the following locations:
/home/user/all files in here
/etc/profile

thanks in advance.
0
Comment
Question by:telliot79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1100 total points
ID: 37834138
Did you use "ls -la" to examine the files in the home directory?

The initialization profiles start with a dot, and such file ares only displayed when using the "-a" flag.

Look for ".profile" or ".bash_profile" or ".bashrc" or ".login"

"/etc/bash.bashrc" and "/etc/profile" are systemwide initialization files.
0
 

Author Comment

by:telliot79
ID: 37834204
i used a ll to examine the files which gives me pretty much the same results as ls -la.

the files listed were:
.cshrs
.exrc
.login
.profile
.sh_history

i searched them all, but none had the script file i was looking for.

a search of the system for the script file has pointed me to the etc/passwd file. I'm no unix expert, but it appears it's validating the password of me user in this file and then running the script from there. Is this possible?

Thanks for the prompt response.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1100 total points
ID: 37834240
What's in the last colon-separated column of the user's entry in /etc/passwd?

That's normally the place for specifying the login shell, but it's also possible to put an arbitrary script/command there.

This script/command will be executed at login time (after successful authentication).
If the script contains "exit" the user will be logged out once the script execution terminates.
0
 

Author Comment

by:telliot79
ID: 37834257
the last column is my script. after reading this - http://en.wikipedia.org/wiki/Passwd_(file) - it looks like that's what's calling it.

thanks for the help and quick responses.
0
 

Author Closing Comment

by:telliot79
ID: 37834261
one step closer to knowing what I'm doing. thanks again
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question