LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how is gshadow- different than gshadow file? No reference in man page (http://www.linuxquestions.org/questions/linux-newbie-8/how-is-gshadow-different-than-gshadow-file-no-reference-in-man-page-4175444711/)

Rogue45 01-08-2013 02:39 PM

how is gshadow- different than gshadow file? No reference in man page
 
I wanted to double check default permissions on my /etc/gshadow file. When i ls -l | grep gshadow it gives me two listings.

----------. 1 root root 563 Jan 2 17:19 gshadow
-rw-------. 1 root root 563 Jan 2 17:19 gshadow-

What is the difference between the two files? I have done due diligence googling but am finding nothing. Why would one be set to 000 and the other 600?

Habitual 01-08-2013 05:06 PM

Code:

diff gshadow gshadow~

Rogue45 01-08-2013 05:51 PM

I'm not questioning the contents. I can see those. I want to know why there are two files. I can read the purpose of gshadow in the man page but why is there a gshadow- file. No documentation i find says anything about a gshadow- file. There are also similar corresponding "-" files for the group, passwd, and shadow file.

Habitual 01-08-2013 09:19 PM

vi makes those when you edit with that editor.
I think
Code:

set nobackup
in .vimrc will disable it.

Rogue45 01-09-2013 05:16 PM

Hmm. The gshadow- file is there when i first install the OS before i edit or open it. That is what i was originally thinking though. Sort of similiar to when you open a file in windows it creates file~ temporarily. Difference is gshadow- never goes away. Still don't think i have a definite answer.

Habitual 01-09-2013 07:14 PM

Quote:

...The gshadow- file is there when i first install the OS...
What OS is that?

jschiwal 01-09-2013 07:41 PM

Your /etc/gshadow file has no permissions enabled. The /etc/gshadow- files seems to be a working replacement. Maybe for a PAM module that adds audit info, or failtoban,,etc.

If your distro uses RPM, try "rpm -qf /etc/gshadow-" to see what package installed it. Also try using lsof to see if any program has it open.

Rogue45 02-15-2013 11:33 AM

I found the answer to this out myself and figured i'd post it. Anytime you edit with gedit it saves an additional file of your pre-edited file.


All times are GMT -5. The time now is 08:12 AM.