I was checking my user account in the /etc/passwd file to confirm I'm not logged in as root. While doing some research, I came across a chatbot that warned that this file isn't just open for editing. However, I found I could open it in the text editor Kate without any restrictions. The file appears to be owned by root, so I'm skeptical about getting access to it this way. Is this normal, or is that chatbot correct? I'm using Arch Linux with KDE, and I'd like to ensure everything is configured properly.
2 Answers
Yeah, you’re right! The /etc/passwd file is meant to be readable by all users, but it's only writable by root. If you’re able to edit it in Kate, you may just be able to access it without appropriate permissions. Just to be safe, make sure your system’s permissions are intact. And don’t worry about /etc/passwd holding your passwords; they’re securely stored in /etc/shadow.
The /etc/passwd file does have 644 permissions by default, which means everyone can read it, but only root can write to it. So, while it’s normal you can view it, you shouldn’t be able to make changes unless you have root access. Also, keep in mind that the actual passwords aren't stored in /etc/passwd anymore; they’re in /etc/shadow, which is much more restricted in terms of permissions.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures