BladeSystem Forums have moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Showing results for 
Search instead for 
Do you mean 

.profile disappears

Occasional Advisor

.profile disappears

Help:

 

I have a hp-ux 3440 that root's .profile in / keeps disappearing.

 

I recreate and I check a fews hours later and it is gone.....

 

Correct me if I am wrongs but teh .prfile file should be in the root directory correct?

 

I have change the permissions to 444.

 

What's goingin on?

 

Thanks in advance.

5 REPLIES
Honored Contributor

Re: .profile disappears

The .profile file goes into the HOME directory, so if root's HOME is /, then that's the correct location. Are you sure it's gone? The ls and ll commands will not show dot files like .profile unless you add the -a option.

 

A good alias for ls and ll is something like this:

 

alias ls='ls -a'
alias ll='ls -al'

 

Also, the default location for root's HOME directory should never be /. While virtually every Unix manufacturer has done this, it is the worst possible location. As a minimum, it should be moved to /root to prevent disasters like rm -rf *



Bill Hassell, sysadmin
Occasional Advisor

Re: .profile disappears

Yep it's gone.

 

I have changed roots home directory to /home/root, will see what happens.

Highlighted
Acclaimed Contributor

Re: .profile disappears

[ Edited ]

>root's .profile in / keeps disappearing.

 

What HP-UX version?  What is the modification date on /?  ll -d /

 

>the .profile file should be in the root directory correct?

 

The .profile goes into ~/.profile for each user.

 

>The ls and ll commands will not show dot files unless you add the -a option.

 

They will also show if you're explicit: ll ~/.profile

And -A will show them but without showing "." and "..".

Occasional Advisor

Re: .profile disappears

>root's .profile in / keeps disappearing.

 

What HP-UX version?  What is the modification date on /?  ll -d /

 

>the .profile file should be in the root directory correct?

 

The .profile goes into ~/.profile for each user.

 

>The ls and ll commands will not show dot files unless you add the -a option.

 

They will also show if you're explicit: ll ~/.profile

And -A will show them but without showing "." and "..".

 

This is HP-UX appsvr B.11.11 U 9000/800.

 

# ll ~/.profile
/home/root/.profile not found

 

drwxr-xr-x   3 root       sys             96 Jun 23 12:08 .

 

Still disappearing.

Acclaimed Contributor

Re: .profile disappears

[ Edited ]

>Still disappearing.

 

What is the modification date on ~?  ll -d ~

 

Unless you can narrow down the time frame to a specific crontab, you may have to enable auditing to log all file deletions.