Operating System - HP-UX
1752587 Members
4488 Online
108788 Solutions
New Discussion юеВ

Re: HP Unix 10.2 LogIn Script

 
mat72
Advisor

HP Unix 10.2 LogIn Script

Hi,

I am new with HP Unix and I need to change a log In script for the system. My company bought the workstation and the previous owner added some lines to the standard script.

Where can I find the script for log in?

Thanks in advance.

Mat

7 REPLIES 7

Re: HP Unix 10.2 LogIn Script

It depends on what shell the user is using, but if its is /usr/bin/sh (or /sbin/sh for root) then the system login script will be in /etc/profile and the user specific login script that runs after this will be in $HOME/.profile


I am an HPE Employee
Accept or Kudo
mat72
Advisor

Re: HP Unix 10.2 LogIn Script

Thanks for replay.

I do not have the $HOME/.profile folder.

How can I check what had been used?

Re: HP Unix 10.2 LogIn Script

.profile is a file, not a folder.

Are you sure you don't have one? $HOME is an environment variable - also .profile won't appear if you just type "ls" as all files starting with a period are treated as hidden files (unless you are root).

Compare what I see as a normal user:

 

 

$ whoami
oracle
$ ls
bin          de.sh        runstuff.sh
$ echo $HOME
/home/oracle
$ ls -la $HOME/.profile
-rw-r-----   1 oracle     dba            650 Jun 12  2009 /home/oracle/.profile

 

 

To what I see as root (note on my system I have a root home directory of /root your system may just be /

 

 

# whoami
root
# ls
.Xauthority       .mozilla          .sw               Mail              fonts.dir
.elm              .profile          .swa              adviser.out       mapfile
.firefox-license  .rnd              .vim              bin
.gpmhp-c3000      .sh_history       .vnc              extractor.sh
.hh               .ssh              .wireshark        fonts.alias
# echo $HOME
/root

 

 

 

Only the root user will see hidden files by default. To see them for other users you need to use the "-a" option on ls.

To check what shell the user you are interested in here uses check for the users entry in /etc/passwd - so for example for the oracle user I can check his shell as follows:

 

 

# grep ^oracle /etc/passwd
oracle:x:200:200:Oracle Owner:/home/oracle:/usr/bin/sh

 

 

Here I can see that the user oracle has the shell /usr/bin/sh so that means they will use the /etc/profile system login script and $HOME/.profile user login script. 

If they were using the C shell (yuck) then the entry would be /usr/bin/csh and you would need to look at the system login file /etc/csh.login and the user login file $HOME/.cshrc

If they were using the Korn shell then the entry would be /usr/bin/ksh and you would still look at the system login file /etc/profile and the user login file $HOME/.profile, but might also need to look in the $HOME/.kshrc file as well as that is run each time a new ksh shell is instantiated 


I am an HPE Employee
Accept or Kudo
mat72
Advisor

Re: HP Unix 10.2 LogIn Script

I cant answer with the log to your request.

Re: HP Unix 10.2 LogIn Script

>> I cant answer with the log to your request.

I'm not sure what you mean by that? 

 

I am an HPE Employee
Accept or Kudo
mat72
Advisor

Re: HP Unix 10.2 LogIn Script

If I want to insert the log from my unix system, it will not be uploaded.

I need to modify /bin/csh

mat72
Advisor

Re: HP Unix 10.2 LogIn Script

Is there a way to change the booting parameter? Someone add a dd to the login script and this slows the sytsem down. I want to remove this command.