{"id":321,"date":"2021-10-11T16:38:39","date_gmt":"2021-10-11T07:38:39","guid":{"rendered":"https:\/\/www.worldagency.jp\/wordpress\/?p=321"},"modified":"2021-10-11T16:54:01","modified_gmt":"2021-10-11T07:54:01","slug":"centos-samba-bash-%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%80%81%e3%82%b0%e3%83%ab%e3%83%bc%e3%83%97%e3%80%81%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e3%80%81samba%e3%83%a6%e3%83%bc","status":"publish","type":"post","link":"https:\/\/www.worldagency.jp\/wordpress\/?p=321","title":{"rendered":"[CentOS\/Samba\/Bash] \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3001\u30b0\u30eb\u30fc\u30d7\u3001\u30e6\u30fc\u30b6\u30fc\u3001Samba\u30e6\u30fc\u30b6\u30fc\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u4e00\u62ec\u767b\u9332"},"content":{"rendered":"\nCentOS7\u30b5\u30fc\u30d0\u30fc\u306eSamba4\u306b\u3001\u968e\u5c64\u69cb\u9020\u7d44\u7e54\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3001\u30b0\u30eb\u30fc\u30d7\u3001\u30e6\u30fc\u30b6\u30fc\u3001Samba\u30e6\u30fc\u30b6\u30fc\u3092\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u4e00\u62ec\u767b\u9332\u3059\u308b\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u524d\u63d0\u6761\u4ef6<\/strong><\/h2>\n\n\n\n\n\n<ul class=\"wp-block-list\"><li>CentOS 7.8 &nbsp;\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f<\/li><li>Samba 4.0 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f &nbsp;<\/li><\/ul>\n\n\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4e00\u62ec\u4f5c\u6210<\/strong><\/h2>\n\n\n\n\n\u8907\u6570\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4e00\u62ec\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001directorylist.dat \u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30d0\u30c3\u30c1\u51e6\u7406\u3059\u308b\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>makedirectory.sh<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>#makedirectory.sh  \n#!\/usr\/bin\/bash\n\necho -e \"Make Directory is Started\\n\"\n\nwhile read row; do\n  column1=`echo ${row}`\n\n  echo -e \"\u30d1\u30b9 ${column1} \u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\"\n  mkdir ${column1}\n  echo -e \"\u4f5c\u6210\u5b8c\u4e86\u3057\u307e\u3057\u305f\\n\"\n\ndone &lt; directorylist.dat\n\n# \u6240\u6709\u8005\u306e\u5909\u66f4\u3068\u7d50\u679c\u78ba\u8a8d\nchown -R username01:groupname01 \/home\/group-share\/\nls -la \/home\/group-share\/<\/code><\/pre>\n\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>directorylist.dat<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/group-share\n\/home\/group-share\/\u682a\u4e3b\u7dcf\u4f1a\n\/home\/group-share\/\u53d6\u7de0\u5f79\u4f1a\n\/home\/group-share\/\u5185\u90e8\u76e3\u67fb\n\/home\/group-share\/\u793e\u9577\u5ba4\n\/home\/group-share\/\u793e\u9577\u5ba4\/\u7d4c\u55b6\u4f01\u753b\u8ab2\n\/home\/group-share\/\u55b6\u696d\u90e8\n\/home\/group-share\/\u55b6\u696d\u90e8\/\u55b6\u696d\u8ab2\n\/home\/group-share\/\u55b6\u696d\u90e8\/\u652f\u63f4\u8ab2\n\/home\/group-share\/\u7ba1\u7406\u90e8\n\/home\/group-share\/\u7ba1\u7406\u90e8\/\u7dcf\u52d9\u8ab2\n\/home\/group-share\/\u7ba1\u7406\u90e8\/\u7d4c\u7406\u8ab2\n\/home\/group-share\/\u7ba1\u7406\u90e8\/\u4eba\u4e8b\u8ab2\n\/home\/group-share\/\u60c5\u5831\u30b7\u30b9\u30c6\u30e0\u90e8\n\/home\/group-share\/\u60c5\u5831\u30b7\u30b9\u30c6\u30e0\u90e8\/\u8a2d\u8a08\u958b\u767a\u8ab2\n\/home\/group-share\/\u60c5\u5831\u30b7\u30b9\u30c6\u30e0\u90e8\/\u4fdd\u5b88\u7ba1\u7406\u8ab2<\/code><\/pre>\n\n\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u30b0\u30eb\u30fc\u30d7\u306e\u4e00\u62ec\u4f5c\u6210<\/strong><\/h2>\n\n\n\n\n\u8907\u6570\u306e\u30b0\u30eb\u30fc\u30d7\u3092\u4e00\u62ec\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001linuxgrouplist.dat \u306b\u30b0\u30eb\u30fc\u30d7ID\u3068\u30b0\u30eb\u30fc\u30d7\u540d\u79f0\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30d0\u30c3\u30c1\u51e6\u7406\u3059\u308b\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>grjoupadd.sh<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>#groupadd.sh  \n#!\/usr\/bin\/bash\n\necho -e \"Group Add is Started\\n\"\n\nwhile read row; do\n  column1=`echo ${row} | cut -d , -f 1`\n  column2=`echo ${row} | cut -d , -f 2`\n\n  echo -e \"group id : ${column1} , groupe name : ${column2}\"\n  groupadd -g ${column1} -o ${column2}\n  echo -e \"Registration completed\\n\"\n\ndone &lt; linuxgrouplist.dat\n\n# \u30b0\u30eb\u30fc\u30d7\u306e\u767b\u9332\u7d50\u679c\u78ba\u8a8d\ncat \/etc\/group<\/code><\/pre>\n\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>linuxgrouplist.dat<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>100001,groupnmame01\n100111,stockholders-div\n100112,directors-div\n101001,manage-dep\n118013,accounting-sec\n119032,infomation-sec\n118024,business-sec<\/code><\/pre>\n\n\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u30e6\u30fc\u30b6\u30fc\u306e\u4e00\u62ec\u4f5c\u6210<\/strong><\/h2>\n\n\n\n\n\u8907\u6570\u306e\u30b0\u30eb\u30fc\u30d7\u3092\u4e00\u62ec\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001linuxuserlist.dat \u306b\u30b0\u30eb\u30fc\u30d7ID\u3068\u30b0\u30eb\u30fc\u30d7\u540d\u79f0\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30d0\u30c3\u30c1\u51e6\u7406\u3059\u308b\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>newusers \u30b3\u30de\u30f3\u30c9<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code># newusers linuxuserlist.dat\n# cat \/etc\/passwd<\/code><\/pre>\n\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>linuxuserlist.dat<\/strong><\/h3>\n\n\n\n\n\n<ul class=\"wp-block-list\"><li>\u30e6\u30fc\u30b6\u30fc\u540d\u306fLinux\u30e6\u30fc\u30b6\u30fc\u3068Samba\u30e6\u30fc\u30b6\u30fc\u3067\u5408\u308f\u305b\u308b<\/li><li>Linux\u30b0\u30eb\u30fc\u30d7\u3092\u5148\u306b\u4f5c\u6210\u3057\u3066\u304a\u304f<\/li><li>\u30e6\u30fc\u30b6\u30fc\u540d:\u30d1\u30b9\u30ef\u30fc\u30c9:\u30e6\u30fc\u30b6\u30fcID:\u30b0\u30eb\u30fc\u30d7ID:GCOS\uff08\u30b3\u30e1\u30f3\u30c8\uff09:\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea:\u30b7\u30a7\u30eb<\/li><\/ul>\n\n\n\n\n\n<h3 class=\"wp-block-heading\">linuxuserlist.dat<\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code># linuxuserlist.dat \n\nABEKAWA:9Hwle39j:117007:117007::\/home\/ABEKAWA:\/usr\/bin\/bash\n\nusername01:password01:18001:30301::\/home\/username01:\/usr\/bin\/bash\nusername02:password02:18002:30301::\/home\/username02:\/usr\/bin\/bash\nusername03:password03:19003:30311::\/home\/username03:\/usr\/bin\/bash\nusername04:password04:20011:20201::\/home\/username04:\/usr\/bin\/bash\nusername05:password05:21035:40401::\/home\/username05:\/usr\/bin\/bash<\/code><\/pre>\n\n\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>samba\u30e6\u30fc\u30b6\u30fc\u306e\u4e00\u62ec\u767b\u9332<\/strong><\/h2>\n\n\n\n\n\u305f\u304f\u3055\u3093\u306esamba\u30e6\u30fc\u30b6\u30fc\u3092\u4e00\u62ec\u767b\u9332\u3059\u308b\u5834\u5408\u3001\u4e88\u3081\u30e6\u30fc\u30b6\u30fc\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\uff08sambauseerlist.dat\uff09\u306b\u4f5c\u6210\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092\u8aad\u8fbc\u3093\u30671\u884c\u305a\u3064\u30eb\u30fc\u30d7\u51e6\u7406\u3055\u305b\u3066\u3044\u304f\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sambauseradd.sh<\/strong><\/h3>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>#sambauseradd.sh  \n#!\/usr\/bin\/bash\n\necho -e \"Samba User Add is Started\"\n\nwhile read row; do\n  column1=`echo ${row} | cut -d , -f 1`\n  column2=`echo ${row} | cut -d , -f 2`\n\n  echo -e \"username : ${column1} , password ${column2}\"\n  echo -e \"${column2}\\n${column2}\" | pdbedit -a -t -u ${column1}\n  echo -e \"${column1} has been registered to Samba\\n\"\n\ndone &lt; sambauserlist.dat\n\n# samba\u30e6\u30fc\u30b6\u30fc\u306e\u767b\u9332\u7d50\u679c\u78ba\u8a8d\npdbedit -L<\/code><\/pre>\n\n\n\n\n\n<h3 class=\"wp-block-heading\"><strong>sambauserlist.dat<\/strong><\/h3>\n\n\n\n\n\n<ul class=\"wp-block-list\"><li>\u30e6\u30fc\u30b6\u30fc\u540d\u306fLinux\u30e6\u30fc\u30b6\u30fc\u3068Samba\u30e6\u30fc\u30b6\u30fc\u3067\u5408\u308f\u305b\u308b<\/li><li>\u30e6\u30fc\u30b6\u30fc\u540d,\u30d1\u30b9\u30ef\u30fc\u30c9<\/li><\/ul>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code># sambauserlist.dat\n\nABEKAWA,9Hwle39j\n\nusername01,password01\nusername02,password02\nusername03,password03\nusername04,password04\nusername05,password05\nusername06,password06<\/code><\/pre>\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>CentOS7\u30b5\u30fc\u30d0\u30fc\u306eSamba4\u306b\u3001\u968e\u5c64\u69cb\u9020\u7d44\u7e54\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3001\u30b0\u30eb\u30fc\u30d7\u3001\u30e6\u30fc\u30b6\u30fc\u3001Samba\u30e6\u30fc\u30b6\u30fc\u3092\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u4e00\u62ec\u767b\u9332\u3059\u308b \u524d\u63d0\u6761\u4ef6 CentOS 7.8 &nbsp;\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f Samba 4.0 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.worldagency.jp\/wordpress\/?p=321\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;[CentOS\/Samba\/Bash] \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3001\u30b0\u30eb\u30fc\u30d7\u3001\u30e6\u30fc\u30b6\u30fc\u3001Samba\u30e6\u30fc\u30b6\u30fc\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u4e00\u62ec\u767b\u9332&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":323,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[51,49,33,50],"class_list":["post-321","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-bash","tag-centos","tag-linux","tag-samba"],"_links":{"self":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=321"}],"version-history":[{"count":2,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/321\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/321\/revisions\/324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/323"}],"wp:attachment":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}