{"@attributes":{"version":"2.0"},"channel":{"title":"Rithas K","description":"my small place in internet where i share my thoughts","link":{},"item":[{"title":"samba share setup on Linux","description":"<p>imagine opening your Linux server\u2019s files on your phone or laptop as easily as opening a local folder. that\u2019s exactly what Samba lets you do, and this guide will show you how to set it up.<\/p>\n\n<ol>\n  <li>install samba first\n    <div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"nb\">sudo <\/span>apt <span class=\"nb\">install <\/span>samba\n<\/code><\/pre><\/div>    <\/div>\n  <\/li>\n  <li>configure samba conf file located at <code class=\"language-plaintext highlighter-rouge\">\/etc\/samba\/smb.conf<\/code><\/li>\n  <li>add the entry of the directory that you want to share at the end of the file\n    <ol>\n      <li>start with [&lt;name of the share&gt;]<\/li>\n      <li>path - path of the directory you want to share (required)<\/li>\n      <li>comment - a little description of what you are sharing (optional)<\/li>\n      <li>guest ok - default is no - can be accessed by guest or not(optional)<\/li>\n      <li>browsable - allows share to be visible in network discovery (optional)<\/li>\n      <li>read only - set it to no - to ensure writeable share (required)<\/li>\n      <li>volume - defines a volume name to the share. otherwise defaults to the name of the share. (optional)<\/li>\n    <\/ol>\n  <\/li>\n<\/ol>\n\n<p>example:<\/p>\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"o\">[<\/span>myshare]\n  path <span class=\"o\">=<\/span> \/mnt\/ship\/media\n  comment <span class=\"o\">=<\/span> Media files\n  guest ok <span class=\"o\">=<\/span> no\n  browsable <span class=\"o\">=<\/span> <span class=\"nb\">yes\n  read <\/span>only <span class=\"o\">=<\/span> no\n<\/code><\/pre><\/div><\/div>\n\n<p>note: samba users are different from linux users. to create a samba user, run <code class=\"language-plaintext highlighter-rouge\">smbpasswd -a &lt;username&gt;<\/code> as root and input a password. use this username and password to login when asked.<\/p>\n\n<p>that\u2019s it. now you can access your shared folder from other machines.<\/p>\n\n<p>on macOS,<\/p>\n<ol>\n  <li>open finder<\/li>\n  <li>click on \u2018Go\u2019 &gt; \u2018Connect to Server\u2019 from menubar. or you can press Cmd + K.<\/li>\n  <li>type in your machine\u2019s IP address (smb:\/\/<ip_address>) and click on 'Connect'<\/ip_address><\/li>\n  <li>type in the samba username and password when asked if you are a registered user. or click on \u2018Guest\u2019 if you have enable guest share in the <code class=\"language-plaintext highlighter-rouge\">smb.conf<\/code><\/li>\n  <li>select the shares that you want to mount<\/li>\n  <li>you can see the mounted directories in the finder<\/li>\n<\/ol>\n\n<p>on iOS,<\/p>\n<ol>\n  <li>open Files<\/li>\n  <li>click on the three dots seen on the top right of the screen<\/li>\n  <li>click on \u2018Connect to Server\u2019<\/li>\n  <li>type in your machine\u2019s IP address (smb:\/\/<ip_address>) and proceed<\/ip_address><\/li>\n  <li>type in the samba username and password when asked if you are a registered user. or click on \u2018Guest\u2019 if you have enable guest share in the <code class=\"language-plaintext highlighter-rouge\">smb.conf<\/code><\/li>\n  <li>you can see the mounted shares under \u2018Shared\u2019 in the \u2018Browse\u2019 tab<\/li>\n<\/ol>\n\n<p>on Windows,<\/p>\n<ol>\n  <li>open Explorer<\/li>\n  <li>type in your machine\u2019s IP address (\\\\<ip_address>) and press Enter<\/ip_address><\/li>\n  <li>type in the samba username and password when asked<\/li>\n  <li>you can see the shares now<\/li>\n<\/ol>\n","pubDate":"Wed, 01 Jul 2026 00:00:00 +0000","link":"\/samba-share-on-linux\/","guid":"\/samba-share-on-linux\/"},{"title":"Ubuntu Boot Failure","description":"<p>I had an external HDD plugged in with my Optiplex machine which runs Ubuntu 22.04.4 LTS where I host several self hosted stuff. The external HDD is used to backup the config files of docker containers, some important files and all the photos I\u2019ve backed up using Immich using Restic.<\/p>\n\n<p>Recently my machine started failing to boot. No matter what password I typed in, it failed to go past this stage. All i got was<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Give root password for maintenance (or type Control-D to continue):\n<\/code><\/pre><\/div><\/div>\n\n<p>After some google-fu, I came to the conclusion that the boot failure was due to the wrong entry in <code class=\"language-plaintext highlighter-rouge\">fstab<\/code>. To automatically mount the external HDD, I had an <code class=\"language-plaintext highlighter-rouge\">fstab<\/code> entry that mounts the HDD to a mount point. Due to some reason, the device label changed from <code class=\"language-plaintext highlighter-rouge\">sdc<\/code> to <code class=\"language-plaintext highlighter-rouge\">sdb<\/code> which failed Ubuntu to find the drive and mount it at boot.<\/p>\n\n<p>This could\u2019ve been avoided easily by adding <code class=\"language-plaintext highlighter-rouge\">nofail<\/code> to the <code class=\"language-plaintext highlighter-rouge\">fstab<\/code> entry so that Ubuntu will continue to boot even in the absence of the drive. The steps I followed was:<\/p>\n\n<ol>\n  <li>Root access\n    <ol>\n      <li>Press <code class=\"language-plaintext highlighter-rouge\">esc<\/code> at the boot to enter <code class=\"language-plaintext highlighter-rouge\">GRUB<\/code> menu<\/li>\n      <li>Press <code class=\"language-plaintext highlighter-rouge\">e<\/code> to change boot parameters<\/li>\n      <li>Append <code class=\"language-plaintext highlighter-rouge\">rw init=\/bin\/bash<\/code> at the end of the line starting with <code class=\"language-plaintext highlighter-rouge\">linux...<\/code><\/li>\n      <li>Press <code class=\"language-plaintext highlighter-rouge\">ctrl + x<\/code> to exit<\/li>\n      <li>This will take you to shell with root access<\/li>\n    <\/ol>\n  <\/li>\n  <li>Modify <code class=\"language-plaintext highlighter-rouge\">fstab<\/code>\n    <ol>\n      <li>Change the wrong device name<\/li>\n      <li>Add <code class=\"language-plaintext highlighter-rouge\">nofail<\/code> to the entry<\/li>\n      <li>Final fstab entry would look like\n<code class=\"language-plaintext highlighter-rouge\">\/dev\/sdb1 \/mnt\/external ext4 defaults,nofail 0 2<\/code><\/li>\n    <\/ol>\n  <\/li>\n  <li>That\u2019s it<\/li>\n<\/ol>\n\n<p>Now my machine boots up normally<\/p>\n","pubDate":"Wed, 19 Jun 2024 00:00:00 +0000","link":"\/ubuntu-boot-failure\/","guid":"\/ubuntu-boot-failure\/"},{"title":"First blog post","description":"<p>This is my first blog post. Just testing things out.<\/p>\n\n<p>It\u2019s 2024, a new year. I hope my wish to write more blog posts will come true this year.<\/p>\n\n<p>This blog\u2019s source code was copied from <a href=\"https:\/\/paulmillr.com\">Paul Miller<\/a> who copied it from <a href=\"https:\/\/stephango.com\">Steph Ango<\/a>. I\u2019m using this design with Steph Ango\u2019s permission. I have been following Steph Ango for a long time and I am happy to see that he is still blogging in 2024. I hope I will be too. Stephango\u2019s blog is a great source of inspiration for me. I hope I can be as good as him one day.<\/p>\n","pubDate":"Mon, 01 Jan 2024 00:00:00 +0000","link":"\/first\/","guid":"\/first\/"}]}}