Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

unix hp login script

Posted on 2012-04-11
5
Medium Priority
?
437 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.
Suggested Courses

618 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