<?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: change character in the passwd file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540924#M652178</link>
    <description>tanx my friend,&lt;BR /&gt;&lt;BR /&gt;i'll try it on my test machine&lt;BR /&gt;&lt;BR /&gt;have a good week-end</description>
    <pubDate>Fri, 27 Nov 2009 20:49:21 GMT</pubDate>
    <dc:creator>Jocelyn Dinel</dc:creator>
    <dc:date>2009-11-27T20:49:21Z</dc:date>
    <item>
      <title>change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540916#M652170</link>
      <description>i want to change the following&lt;BR /&gt;&lt;BR /&gt;cafeteri::4397:30:Cafeteria:/users/cafe:/bin/sh&lt;BR /&gt;by&lt;BR /&gt;cafeteri:,..:4397:30:Cafeteria:/users/cafe:/bin/sh&lt;BR /&gt;i have some other user with the same case no passwd. i tried a lot of things with cut and tr but never be able to do the right thing.&lt;BR /&gt;tanx to answer me</description>
      <pubDate>Fri, 27 Nov 2009 16:23:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540916#M652170</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-27T16:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540917#M652171</link>
      <description>To edit passwd file use "vipw".</description>
      <pubDate>Fri, 27 Nov 2009 16:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540917#M652171</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2009-11-27T16:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540918#M652172</link>
      <description>no i know the command vi,&lt;BR /&gt;&lt;BR /&gt;i want a program to check regularly if a user don't have password et put :,..: at the place&lt;BR /&gt;&lt;BR /&gt;tanx</description>
      <pubDate>Fri, 27 Nov 2009 17:30:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540918#M652172</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-27T17:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540919#M652173</link>
      <description>"no i know the command vi,"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ok, you know "vi", but "vipw" *is* vi for use w/ the password file, and is what should be used.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"i want a program to check regularly if a user don't have password et put :,..: at the place"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Lets start with what you hope to accomplish by making that substitution.  It appears to me (and I could well be mistaken) the the password is still left unset and the password aging stuff is disabled.&lt;BR /&gt;&lt;BR /&gt;Depending upon your answer, its conceivable that this could be done with the "password" command and "expect" as well.  Also, if this is occuring frequently, you've other issues, such as "How come the password isn't set?"&lt;BR /&gt;&lt;BR /&gt;OS version would be helpful.  The system doesn't appear to be in trusted mode...Is that correct?&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Nov 2009 18:19:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540919#M652173</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-27T18:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540920#M652174</link>
      <description>tanx my friends for the answer,&lt;BR /&gt;&lt;BR /&gt;the problem is the following, by default i have a program who control the aging of the passwd file and it works properly, i know the aging by unix but the organisation want to write a french message with the change of the password so i construct a program for the aging, but&lt;BR /&gt;&lt;BR /&gt;i use shadowing for better protection and sometimes for the use of another special program i have to return with no-shadowing.&lt;BR /&gt;&lt;BR /&gt;and in this case the aging like :,..: return to :: it's the reason i want a little program to add in this program to not let my password file without password.&lt;BR /&gt;&lt;BR /&gt;i use 11i for the version</description>
      <pubDate>Fri, 27 Nov 2009 18:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540920#M652174</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-27T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540921#M652175</link>
      <description>"....it's the reason i want a little program to add in this program to not let my password file without password."&lt;BR /&gt;&lt;BR /&gt;but, unless I'm mistaken, setting it to ":,..." *does* leave the passwd unset.  would not it look something like "asdaksd,..." if there were a password?</description>
      <pubDate>Fri, 27 Nov 2009 19:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540921#M652175</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-27T19:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540922#M652176</link>
      <description>no,&lt;BR /&gt;&lt;BR /&gt;when we create a new employe, by default we let the user put the password they want, so it's the reason i want to put :,..: when we returned with no-shadow passwd</description>
      <pubDate>Fri, 27 Nov 2009 19:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540922#M652176</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-27T19:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540923#M652177</link>
      <description>hmm...well, I would have assigned a default password and made them change it on first login...which probably would prevent this, but to each their own.&lt;BR /&gt;&lt;BR /&gt;awk can help you out...&lt;BR /&gt;&lt;BR /&gt;awk.scr:&lt;BR /&gt;========================&lt;BR /&gt;BEGIN{&lt;BR /&gt;FS=":";&lt;BR /&gt;OFS=":";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;if ($2 == "")&lt;BR /&gt; {$2=",..";&lt;BR /&gt;  print $0;&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;=====================&lt;BR /&gt;&lt;BR /&gt;will find any lines with :: after the login name.  you'd run it like the following&lt;BR /&gt;&lt;BR /&gt;awk -f awk.scr /etc/passwd &amp;gt; (temp file here)&lt;BR /&gt;&lt;BR /&gt;further refinements are possible (and recommended) to apply it to a list of ids or whatever</description>
      <pubDate>Fri, 27 Nov 2009 20:44:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540923#M652177</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-27T20:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540924#M652178</link>
      <description>tanx my friend,&lt;BR /&gt;&lt;BR /&gt;i'll try it on my test machine&lt;BR /&gt;&lt;BR /&gt;have a good week-end</description>
      <pubDate>Fri, 27 Nov 2009 20:49:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540924#M652178</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-27T20:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540925#M652179</link>
      <description>i execute the program,&lt;BR /&gt; the result is exactly what i need.&lt;BR /&gt;&lt;BR /&gt;Is it possible to have this result directly in the passwd file?&lt;BR /&gt;&lt;BR /&gt;tanx again</description>
      <pubDate>Sat, 28 Nov 2009 12:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540925#M652179</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-28T12:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540926#M652180</link>
      <description>While some of the GNU utilities have the ability to do "in-place" changes (as does perl, i believe) that doesn't work for awk that I know of.  One liner like:&lt;BR /&gt;&lt;BR /&gt;awk -f awk.scr /etc/passwd &amp;gt; (temp_file); cp (temp_file) /etc/password&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Should get what you want&lt;BR /&gt;</description>
      <pubDate>Sat, 28 Nov 2009 16:45:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540926#M652180</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-28T16:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540927#M652181</link>
      <description>or something like:&lt;BR /&gt;&lt;BR /&gt;cp /etc/passwd (tempfile); awk -f awk.scr (tempfile) &amp;gt; /etc/passwd</description>
      <pubDate>Sat, 28 Nov 2009 16:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540927#M652181</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-28T16:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540928#M652182</link>
      <description>unfortunately, the result is good but not replace directly in the file, only put the line where the :: is find</description>
      <pubDate>Sat, 28 Nov 2009 20:22:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540928#M652182</guid>
      <dc:creator>Jocelyn Dinel</dc:creator>
      <dc:date>2009-11-28T20:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540929#M652183</link>
      <description>&lt;!--!*#--&gt;&amp;gt;the result is good but only put the line where the :: is found&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;awk -F: '&lt;BR /&gt;{&lt;BR /&gt;if ($2 == "")&lt;BR /&gt;   $2 = ",.."&lt;BR /&gt;print $0&lt;BR /&gt;}' /etc/passwd &amp;gt; (temp file here)</description>
      <pubDate>Sat, 28 Nov 2009 23:47:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540929#M652183</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-28T23:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: change character in the passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540930#M652184</link>
      <description>I told you...."will find any lines with :: after the login name" &lt;BR /&gt;&lt;BR /&gt;It does nothing with the lines that don't match.  &lt;BR /&gt;&lt;BR /&gt;Dennis's version should handle that case as well, by changing the second field if required, and always printing each line.....&lt;BR /&gt;&lt;BR /&gt;That may (or may not be) *exactly* what you need either, but they are places for you to start from....</description>
      <pubDate>Sun, 29 Nov 2009 17:29:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-character-in-the-passwd-file/m-p/4540930#M652184</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-29T17:29:46Z</dc:date>
    </item>
  </channel>
</rss>

