<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: comment in passwd file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992569#M95953</link>
    <description>Thanks Bill!! It was heartening to see your excellent explanation.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Shiv</description>
    <pubDate>Thu, 03 May 2007 12:29:09 GMT</pubDate>
    <dc:creator>Shivkumar</dc:creator>
    <dc:date>2007-05-03T12:29:09Z</dc:date>
    <item>
      <title>comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992561#M95945</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If # has been put in the beginning of a line in /etc/passwd file and it is saved;&lt;BR /&gt;Will it corrupt the /etc/passwd file and system will not come up ?&lt;BR /&gt;&lt;BR /&gt;If this is done by mistake then how to recover it ?&lt;BR /&gt;&lt;BR /&gt;I am just curious to know and this has not been done.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 02 May 2007 12:21:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992561#M95945</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2007-05-02T12:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992562#M95946</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;Why would you want to do this?  If you want to prevent an account from logging in on an untrusted system, replace the second field of the account with an "*".  This is the same as running the safer:&lt;BR /&gt;&lt;BR /&gt;# passwd -l login&lt;BR /&gt;&lt;BR /&gt;If you have manually editted your '/etc/passwd' you would be advised to check its integrity with:&lt;BR /&gt;&lt;BR /&gt;# pwck&lt;BR /&gt;&lt;BR /&gt;If you *must* manually edit '/etc/passwd' the safe way is to use:&lt;BR /&gt;&lt;BR /&gt;# vipw&lt;BR /&gt;&lt;BR /&gt;Using 'vipw' will at least insure you can't mangle the root account.  Attempts to do so will be rejected.&lt;BR /&gt;&lt;BR /&gt;Of course, one always has a backup of key configuration files to restore...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 May 2007 12:29:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992562#M95946</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-02T12:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992563#M95947</link>
      <description>Well, the man page for the password file (man 4 passwd) certainly does not seem to mention any provisions for comments.  I'm not really sure what effect it would have, nor why you would want to - why don't you try it out and let us know?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 02 May 2007 12:34:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992563#M95947</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-05-02T12:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992564#M95948</link>
      <description>Actually, I have tried this. Comments are not recognized in the password file. The authentication system will see the "commented" user as having the # character as part of the username. (I don't recall if I tried logging in with #'ed username though.)&lt;BR /&gt;&lt;BR /&gt;Will this cause the system to not boot? While I never tried rebooting when I tested this, I would guess not... unless you're "commenting" the root user, of course.</description>
      <pubDate>Wed, 02 May 2007 12:45:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992564#M95948</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-05-02T12:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992565#M95949</link>
      <description>It was tried by someone by mistake. It corrupted the /etc/passwd file. I believe system will not boot. &lt;BR /&gt;&lt;BR /&gt;This is a forum of Unix Gurus so just wanted to know their veiwpoint.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 02 May 2007 12:53:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992565#M95949</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2007-05-02T12:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992566#M95950</link>
      <description>The passwd file cannot be modified that way, any other modification to that file could remove another parts of the file and cause more system issues, in this case a recommend you is copy that file to the same location, for example, to /etc/passwd.tmp with all your comments for the users, because is not a good idea modify the file.&lt;BR /&gt;Ex .: If you remove the last : of one of the users, all the data under that will be removed and you will lost your configuration.&lt;BR /&gt;&lt;BR /&gt;In this case the better idea is hold a backup with the comments that you need before change the original file.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Marc0</description>
      <pubDate>Wed, 02 May 2007 12:53:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992566#M95950</guid>
      <dc:creator>Marco A.</dc:creator>
      <dc:date>2007-05-02T12:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992567#M95951</link>
      <description>I have done this on a non-trusted system running NIS. I used this when I needed to test login problems and I didn't know (or want to know) the user's password. I copied the line and commented out the original. then I could change the passwd for my testing. It did survive a reboot without any problems. However, it you would comment out root and not replace it, I suspect you might have a problem.&lt;BR /&gt;Rob...</description>
      <pubDate>Thu, 03 May 2007 08:31:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992567#M95951</guid>
      <dc:creator>Robin T. Slotten</dc:creator>
      <dc:date>2007-05-03T08:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992568#M95952</link>
      <description>There is no optional format for the passwd file. Every line must contain a valid user ID and the appropriate number of : parameters. If you put a blank line or a # character (or anything else), the passwd file is corrupted. If you put a garbage line prior to the root user line, *NO ONE* can ever login. Your system will reboot just fine and no one including root can login. NEVER put anything in the passwd or group files that is not a valid entry, and DO NOT sort the passwd file!!! Although it's fine to have root down at the bottom of the file, if anyone makes a mistake (ie, a badly trained sysadmin) before the root entry, root cannot login. By putting root at the top, at least root's entry is more likely to survive fat-fingers running vi. Always, always run pwck after you edit the passwd file. If you corrupt the the passwd file, you can only fix it in single user mode. If you remove it, you can get a new copy from /usr/newconfig/etc/passwd (but of course, no login users except root are in this file).</description>
      <pubDate>Thu, 03 May 2007 09:37:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992568#M95952</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-05-03T09:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: comment in passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992569#M95953</link>
      <description>Thanks Bill!! It was heartening to see your excellent explanation.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Shiv</description>
      <pubDate>Thu, 03 May 2007 12:29:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comment-in-passwd-file/m-p/3992569#M95953</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2007-05-03T12:29:09Z</dc:date>
    </item>
  </channel>
</rss>

