Solved

unix hp login script

Posted on 2012-04-11
5
433 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 275 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 275 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

728 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