title: How to add user with out using useradd or similar command?
body: <p>How to add user on linux bash script with out using <code>useradd</code> or similar command.</p>
  
  <p>Also copy the startup script which located in <code>/etc/skel/</code>, and change password for the user which you have been added.</p>
  
  <pre><code>user1=$1
  read -p "Enter your home name" home_name
  read -p "Enter your login shell" loginshell
  echo "$user1:x:500:500:$user1:/home/$home_name:$loginshell" &gt;&gt; /etc/passwd 
  echo "$user1:x:500:" &gt;&gt; /etc/group
  mkdir /home/$home_name
  chmod 744 /home/$home_name
  cp -pr /etc/skel/.bashrc /home/$home_name
  echo "$user1: " &gt;&gt; /etc/shadow
  echo "`passwd` $user1"
  </code></pre>
  
  <p>The error i have got it after execute  this script </p>
  
  <pre><code>passwd: Authentication token manipulation error
  </code></pre>
  
  <p>Please could you advice me if there any mistakes?</p>