{"id":2128,"date":"2026-05-18T12:11:38","date_gmt":"2026-05-18T12:11:38","guid":{"rendered":"https:\/\/alexisiumus.ru\/?p=2128"},"modified":"2026-05-18T12:12:10","modified_gmt":"2026-05-18T12:12:10","slug":"%d0%ba%d0%b0%d0%ba-%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%b8%d1%82%d1%8c-samba-%d0%bd%d0%b0-debian-12-%d0%b2-shell","status":"publish","type":"post","link":"https:\/\/alexisiumus.ru\/?p=2128","title":{"rendered":"\u041a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c samba \u043d\u0430 Debian 12 \u0432 shell"},"content":{"rendered":"\n<p>\u0412\u043e\u0442 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Samba \u043d\u0430 Debian 12 \u0432 shell:<\/p>\n\n\n\n<p><strong>1. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/strong><\/p>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043b\u044e\u0431\u044b\u0445 \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<p><strong>2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Samba \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong><\/p>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 <code>samba<\/code> \u0438 <code>samba-common<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>smbclient<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Samba \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install samba samba-common smbclient<\/code><\/pre>\n\n\n\n<p><strong>3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 Samba:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status smbd<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start smbd<\/code><\/pre>\n\n\n\n<p>\u0418 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable smbd<\/code><\/pre>\n\n\n\n<p><strong>4. (\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 GUI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (Samba Web Administration Tool):<\/strong><\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Samba, \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>samba-webadmin<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install samba-webadmin<\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u0442\u0435\u043c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Samba, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0435\u0431-\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/samba\/smb.conf<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 (\u0438\u043b\u0438 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435) \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 (\u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <code>[global]<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;global]\n        webadmin = yes<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Samba:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart smbd<\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u0442\u0435\u043c, \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0435\u0431-\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0430\u0434\u0440\u0435\u0441 <code>http:\/\/&lt;IP-\u0430\u0434\u0440\u0435\u0441_\u0441\u0435\u0440\u0432\u0435\u0440\u0430&gt;:8001<\/code>.<\/p>\n\n\n\n<p><strong>5. \u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f (\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0438):<\/strong><\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043a \u043d\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0449\u0435\u0439:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir \/samba\/shared<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Samba \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo smbpasswd -a &lt;username&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Samba (<code>\/etc\/samba\/smb.conf<\/code>):<\/li>\n<\/ul>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0435\u043a\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 (\u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <code>[global]<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;shared]\n        comment = Shared Folder\n        path = \/samba\/shared\n        browsable = yes\n        writable = yes\n        guest ok = no\n        valid users = &lt;username&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0430\u043f\u043a\u0443:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown &lt;username&gt;:&lt;username&gt; \/samba\/shared\nsudo chmod 770 \/samba\/shared<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Samba:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart smbd<\/code><\/pre>\n\n\n\n<p><strong>\u0412\u0430\u0436\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>&lt;username&gt;<\/code> \u043d\u0430 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0435.<\/li>\n\n\n\n<li><code>guest ok = no<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u043f\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <code>guest ok = yes<\/code>. \u041d\u043e \u0431\u0443\u0434\u044c\u0442\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b \u0441 \u044d\u0442\u0438\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c.<\/li>\n\n\n\n<li><code>valid users = &lt;username&gt;<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u043f\u043a\u0435. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e.<\/li>\n\n\n\n<li>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <em>\u0432\u0441\u0435\u0433\u0434\u0430<\/em> \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 Samba.<\/li>\n\n\n\n<li>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440 (firewall) \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a Samba (\u043f\u043e\u0440\u0442\u044b 137, 138, 139 \u0438 445). \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d <code>ufw<\/code>, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow Samba<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Samba \u043d\u0430 Debian 12.  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0448\u0430\u0433\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u0431\u0449\u0438\u0445 \u043f\u0430\u043f\u043e\u043a \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n","protected":false},"author":1,"featured_media":2131,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[25,33],"tags":[44,13,252,670,668,669,442,667,671,666],"class_list":["post-2128","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category---linux","category-33","tag-debian-12","tag-linux","tag-samba","tag-samba-webadmin","tag-smb-conf","tag-smbclient","tag-442","tag-667","tag-671","tag-666"],"_links":{"self":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2128"}],"version-history":[{"count":3,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/2128\/revisions"}],"predecessor-version":[{"id":2132,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/2128\/revisions\/2132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/media\/2131"}],"wp:attachment":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}