.profile disappears (230 Views)
Reply
Occasional Advisor
Bob Fraser
Posts: 10
Registered: ‎04-12-1998
Message 1 of 6 (230 Views)

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

Honored Contributor
Bill Hassell
Posts: 14,226
Registered: ‎05-29-2000
Message 2 of 6 (208 Views)

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 *

Occasional Advisor
Bob Fraser
Posts: 10
Registered: ‎04-12-1998
Message 3 of 6 (205 Views)

Re: .profile disappears

Yep it's gone.

 

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

Acclaimed Contributor
Dennis Handly
Posts: 25,298
Registered: ‎03-06-2006
Message 4 of 6 (199 Views)

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
Bob Fraser
Posts: 10
Registered: ‎04-12-1998
Message 5 of 6 (168 Views)

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
Dennis Handly
Posts: 25,298
Registered: ‎03-06-2006
Message 6 of 6 (163 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.