Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

.profile disappears

Highlighted
Bob Fraser
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
Bill Hassell
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
Bob Fraser
Occasional Advisor

Re: .profile disappears

Yep it's gone.

 

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

Dennis Handly
Acclaimed Contributor

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 "..".

Bob Fraser
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.

Dennis Handly
Acclaimed Contributor

Re: .profile disappears

>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.