Solved

unix hp login script

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
to update from RHEL 6.0 to 6.8 anything needed other than "yum update"? 7 138
awk sed 8 135
swp file in unix 16 39
grep command usage 10 26
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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

739 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