<?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>Question Re: passwd command in suse linux in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/passwd-command-in-suse-linux/qaa-p/12131714#M4533523</link>
    <description>&lt;P&gt;Hi Prashant. You could write a simple BASH shell script to lock the passwords of multiple users. For example, create a new file called &lt;STRONG&gt;lock-users.sh&lt;/STRONG&gt;, and add the following content:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;#!/usr/bin/env bash

# Loop through usernames in file and lock them
while read user
do
    passwd -l "$user"
done &amp;lt; "user-list.txt"

exit 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Save this file, and run &lt;STRONG&gt;chmod u+x lock-users.sh&lt;/STRONG&gt;. Create a new text file called &lt;STRONG&gt;user-list.txt&lt;/STRONG&gt; in the same directory as the shell script. In this file, enter the usernames that you want to lock line by line. For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;user1
user2
user3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, run the script by typing &lt;STRONG&gt;sudo ./lock-users.sh&lt;/STRONG&gt;. The users specified in the text file will be locked.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 06:00:43 GMT</pubDate>
    <dc:creator>nikhil_prabhu</dc:creator>
    <dc:date>2020-01-27T06:00:43Z</dc:date>
    <item>
      <title>passwd command in suse linux</title>
      <link>https://community.sap.com/t5/technology-q-a/passwd-command-in-suse-linux/qaq-p/12131713</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;How could i lock multiple users in Suse linux using passwd command in suse linux?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 16:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passwd-command-in-suse-linux/qaq-p/12131713</guid>
      <dc:creator>pnagar</dc:creator>
      <dc:date>2020-01-24T16:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: passwd command in suse linux</title>
      <link>https://community.sap.com/t5/technology-q-a/passwd-command-in-suse-linux/qaa-p/12131714#M4533523</link>
      <description>&lt;P&gt;Hi Prashant. You could write a simple BASH shell script to lock the passwords of multiple users. For example, create a new file called &lt;STRONG&gt;lock-users.sh&lt;/STRONG&gt;, and add the following content:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;#!/usr/bin/env bash

# Loop through usernames in file and lock them
while read user
do
    passwd -l "$user"
done &amp;lt; "user-list.txt"

exit 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Save this file, and run &lt;STRONG&gt;chmod u+x lock-users.sh&lt;/STRONG&gt;. Create a new text file called &lt;STRONG&gt;user-list.txt&lt;/STRONG&gt; in the same directory as the shell script. In this file, enter the usernames that you want to lock line by line. For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;user1
user2
user3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, run the script by typing &lt;STRONG&gt;sudo ./lock-users.sh&lt;/STRONG&gt;. The users specified in the text file will be locked.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 06:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/passwd-command-in-suse-linux/qaa-p/12131714#M4533523</guid>
      <dc:creator>nikhil_prabhu</dc:creator>
      <dc:date>2020-01-27T06:00:43Z</dc:date>
    </item>
  </channel>
</rss>

