Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Possible Duplicate:
Who creates /etc/{group,gshadow,passwd,shadow}-?

I have a strange passwd- file in /etc, notice the trailing dash:

root@ubuntu:~# ls /etc/passw*
/etc/passwd  /etc/passwd-

Notice the different permissions:

root@ubuntu:~# ls -hl /etc/passw*
-rw-r--r-- 1 root root 2.0K Oct 26 13:38 /etc/passwd
-rw------- 1 root root 1.9K Oct 26 13:38 /etc/passwd-

and the difference in content:

root@ubuntu:~# diff /etc/passwd{,-}
< mysql:x:119:129:MySQL Server,,,:/nonexistent:/bin/false
> mysql:x:119:129::/nonexistent:/bin/false

What's happening here?

root@ubuntu:~# uname -a
Linux ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux
root@ubuntu:~# cat /etc/issue
Ubuntu 12.04.1 LTS \n \l
share|improve this question

marked as duplicate by Gilles, jasonwryan, warl0ck, phunehehe, Renan Oct 29 '12 at 0:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 3 down vote accepted

/etc/passwd- is a backup of /etc/passwd maintained by some tools, see the man page. There's also a /etc/shadow- usually, for the same purpose.

So nothing seems fishy here. Someone (or something) changed the name of your mysql user.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.