{"id":3719,"date":"2014-11-16T06:57:56","date_gmt":"2014-11-15T22:57:56","guid":{"rendered":"http:\/\/rmohan.com\/?p=3719"},"modified":"2014-11-16T06:59:29","modified_gmt":"2014-11-15T22:59:29","slug":"centos-7-samba","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3719","title":{"rendered":"Centos 7 Samba"},"content":{"rendered":"<p><strong>Centos 7 Samba<\/strong><\/p>\n<p>FILEDOC\t\t\/samba\/docs<br \/>\nLEARDOCS\t\/samba\/tech<\/p>\n<p>rpm -qi samba<\/p>\n<p>mkdir -p \/samba\/docs<br \/>\nmkdir -p \/samba\/tech<\/p>\n<p>ulimit -n 16384<\/p>\n<p>vi \/etc\/security\/limits.conf<br \/>\n* &#8211; nofile 16384<\/p>\n<p>cd \/etc\/samba\/<\/p>\n<p>cp smb.conf smb.conf.origin<\/p>\n<p>[global]<br \/>\n  workgroup=FILESERVER<br \/>\n  netbios name=SERVER1<br \/>\n  server string=Samba Server<br \/>\n  #security=share<br \/>\n  security=user<br \/>\n  map to guest = Bad User<br \/>\n[SHAREDOCS]<br \/>\n  path=\/samba\/tech<br \/>\n  readonly=yes<br \/>\n  browseable=yes<br \/>\n  guest ok=yes<br \/>\n[TECHDOCS]<br \/>\n  path =\/samba\/tech<br \/>\n  public = no<br \/>\n  writable = yes<br \/>\n  write list = @GROUP1<br \/>\n  validusers = @GROUP1<\/p>\n<p>useradd  test1<br \/>\nuseradd  test2<br \/>\nuseradd  test3<br \/>\nuseradd  GROUP1 <\/p>\n<p>useramod -a -G GROUP1 test1<br \/>\nuseramod -a -G GROUP1 test2<br \/>\nuseramod -a -G GROUP1 test3<\/p>\n<p>smbpasswd -a test1<br \/>\nsmbpasswd -a test2<br \/>\nsmbpasswd -a test3<\/p>\n<p>chown GROUP1:GROUP1 \/samba\/tech<br \/>\nchmod 770 \/samba\/tech<\/p>\n<p>ll -d \/samba\/tech<\/p>\n<p>systemctl restart smb<br \/>\nsystemctl enable smb<br \/>\nsystemctl status smb<\/p>\n<p># smbclient-L localhost -U test1%P@ssw0rd<br \/>\nDomain=[FILESERVER] OS=[Unix] Server=[Samba 4.1.1]<\/p>\n<p>      Sharename      Type      Comment<br \/>\n      &#8212;&#8212;&#8212;      &#8212;-      &#8212;&#8212;-<br \/>\n      SHAREDOCS      Disk<br \/>\n      TECHDOCS       Disk<br \/>\n      IPC$           IPC      IPC Service (Samba Server)<\/p>\n<p>Domain=[TECHDOCS] OS=[Unix] Server=[Samba 4.1.1]<\/p>\n<p>      Server              Comment<br \/>\n      &#8212;&#8212;&#8212;            &#8212;&#8212;-<\/p>\n<p>      Workgroup            Master<br \/>\n      &#8212;&#8212;&#8212;            &#8212;&#8212;-<\/p>\n<p>C:\\>netuse * \/del<\/p>\n<p>                  \\\\192.168.1.18\\d$<\/p>\n<p>C:\\>netuse \\\\192.168.1.13 P@ssw0rd \/U:test1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Centos 7 Samba<\/p>\n<p>FILEDOC \/samba\/docs LEARDOCS \/samba\/tech<\/p>\n<p>rpm -qi samba<\/p>\n<p>mkdir -p \/samba\/docs mkdir -p \/samba\/tech<\/p>\n<p>ulimit -n 16384<\/p>\n<p>vi \/etc\/security\/limits.conf * &#8211; nofile 16384<\/p>\n<p>cd \/etc\/samba\/<\/p>\n<p>cp smb.conf smb.conf.origin<\/p>\n<p>[global] workgroup=FILESERVER netbios name=SERVER1 server string=Samba Server #security=share security=user map to guest = Bad User [SHAREDOCS] path=\/samba\/tech readonly=yes browseable=yes guest ok=yes [TECHDOCS] path =\/samba\/tech public [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3719"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3719"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3719\/revisions"}],"predecessor-version":[{"id":3721,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3719\/revisions\/3721"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}