Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 3
    @Menasheh This site's colours don't make them stand out as much as on other sites, but "OK doing this" in this answer is a hyperlink. Commented Feb 18, 2018 at 22:59
  • 2
    OK, fine, but... In general, are there valid reasons to manually edit /etc/passwd and similar files? Isn't it considered better to access these via the tools that are designed to create and modify them? Commented Feb 19, 2018 at 14:05
  • 1
    @mickeyf I've seen people manually edit /etc/passwd when they're making batch changes, like changing the GECOS field for all users due to moving/restructuring (global room or phone number changes, etc.) It's not common anymore, but there are specific reasons that crop up from time to time. Commented Feb 20, 2018 at 21:21
  • @MickeyfAgain_BeforeExitOfSO What ErikF said, plus the useradd and other tools may do things you may not want, like generate a user group or populate home directories (unless you know the options to suppress that) and this may not be desired in some cases. vi certainly gives more direct control. Commented May 11, 2024 at 23:50