{"id":3138,"date":"2021-10-18T13:35:01","date_gmt":"2021-10-18T13:35:01","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=3138"},"modified":"2021-10-18T13:35:01","modified_gmt":"2021-10-18T13:35:01","slug":"creating-new-users-in-a-batch-file-2","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/","title":{"rendered":"Creating New Users in a Batch File"},"content":{"rendered":"<p>When positioning a brand new web server, it becomes necessary to move the existing users of the old server to the new server. If the amount of users are least, it is added simply to your new server manually, however if the users are massive in numbers like one 100, 200, 500, etc\u2026 then manually migrating the users may become a very time consuming task. Fortunately, a linux command \u201cnewusers\u201d permits you to migrate multiple users in least time.<\/p>\n<p>Usually, a brand new user is created using the \u201cadduser\u201d command, whereas using the \u201cnewusers\u201d command, you&#8217;ll be able to add an entire file holding the users list. Create a plain text file (.txt) and embody the info of a user per line as per the subsequent format:<\/p>\n<blockquote><p><em>loginname:password:uid:gid:comment:home_dir:shell<\/em><\/p><\/blockquote>\n<p><strong>For Example:<\/strong><\/p>\n<blockquote><p><em>mac:abcxyz:1045:1021:Lazy Mac:\/home\/mac:\/bin\/bash<\/em><\/p><\/blockquote>\n<p>Same way, add multiple users data per line using a similar format. To create this method more faster, you&#8217;ll be able to use a spreadsheet or an easy database program so as to export the user list.<\/p>\n<p>Once you&#8217;re finished the text file, upload it to your new web server to secured directory. Lastly, run the subsequent command as root so as to feature the new users to your new server.<\/p>\n<blockquote><p><em>newusers batch-users.txtb<\/em><\/p><\/blockquote>\n<p>That\u2019s it ! You&#8217;ve got with success migrated the existing users to your new dedicated server in easy steps by using the \u201cnewusers\u201d command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When positioning a brand new web server, it becomes necessary to move the existing users of the old server to the new server. If the amount of users are least, it is added simply to your new server manually, however if the users are massive in numbers like one 100, 200, 500, etc\u2026 then manually [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-3138","post","type-post","status-publish","format-standard","hentry","category-tech-support"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating New Users in a Batch File - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating New Users in a Batch File - OWS KB\" \/>\n<meta property=\"og:description\" content=\"When positioning a brand new web server, it becomes necessary to move the existing users of the old server to the new server. If the amount of users are least, it is added simply to your new server manually, however if the users are massive in numbers like one 100, 200, 500, etc\u2026 then manually [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-18T13:35:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\",\"name\":\"Creating New Users in a Batch File - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-10-18T13:35:01+00:00\",\"dateModified\":\"2021-10-18T13:35:01+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/creating-new-users-in-a-batch-file-2\/\",\"name\":\"Creating New Users in a Batch File\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=3138"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3138\/revisions"}],"predecessor-version":[{"id":3139,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/3138\/revisions\/3139"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=3138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=3138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=3138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}