Menu

SMB and net command

2020-11-18
2021-02-10
  • Ward Galanis

    Ward Galanis - 2020-11-18

    Hello,
    I need to make the machine Clonezilla is running on look like it is a NETBIOS machine. Due to personal issues, I am not in a position to experiment with a Clonezilla set up. From what I gather in Debian Linux, I can run net -W WORKGROUP -n CLONEZILLA to make my machine look like a Windows machine with that NETBIOS information. This will meet some rules to allow our Intrusion Detection system to allow traffic over the port the machine is plugged into. If I can do this, where in the configuration can it go in? Just run a new ocs_prerun command prior to network connection?

     
  • Steven Shiau

    Steven Shiau - 2020-11-18

    "Just run a new ocs_prerun command prior to network connection?" -> I believe so.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2020-12-02

    Now that I am back, the net command is not available in the Clonezilla image I am using. Is it in the newest download or is there a way to "graft" it in?

     
  • Steven Shiau

    Steven Shiau - 2020-12-03

    I believe "net" command is on MS Windows, not on GNU/Linux.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2020-12-03

    True, the "net" command is a command in the Windows world, however Debian Linux supports the net command as part of the sambas suite. From what I have seen, I need this: https://manpages.debian.org/jessie/samba-common-bin/net.8.en.html or a piece of it.

     
  • Steven Shiau

    Steven Shiau - 2020-12-03

    Oh, yes, we do not include the package "samba" in Clonezilla live. If you need that, you can:

    1. sudo -i
    2. ocs-live-net-cfg
      configure your network
    3. apt-get update
    4. apt-get install samba

    Steve

     
  • Ward Galanis

    Ward Galanis - 2020-12-04

    Is that something I can insert into filesystem.squashfs? I've been playing with WSL (Debian) and Cygwin to push it in, but it is challenging for a Windows nerd like me. It is a learning experience though, so :)

     
  • Ward Galanis

    Ward Galanis - 2020-12-11

    I was able to get the samba files into filesystem.squash. That article was quite helpful. However, booting was odd. In the live folder, there are other files beginning with filesystem (packages, packages-remove and size). Could altering filesystem.squash interact with these files?

     
  • Steven Shiau

    Steven Shiau - 2020-12-14

    Only filesystem.squashfs is used when booting Clonezilla live, and the rest, i.e.,
    filesystem.packages
    filesystem.size
    filesystem.packages-remove
    are for reference only. Not used in Clonezilla live at all.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2020-12-23

    Hello,
    I put the samba files in the filesystem in what I thought were the proper places, but when it boots, I get this:

    run-init: cant't execute '/sbin/init': Not a directory
    Target filesystem doesn't have requested /sbin/init.
    run-init: can't execute '/sbin/init': Not a directory
    run-init: can't execute '/etc/init': No such file or directory
    run-init: can't execute '/bin/init': Not a directory
    run-init: can't execute '/bin/sh': Not a directory
    run-init: can't execute '': No such file or directory
    /init: line 48: 6: Bad file descriptor
    

    Then kernel panic and a bunch of stuff I won't put here unless it's relevant.

    I made no changes to any other files or directories.

     
  • Steven Shiau

    Steven Shiau - 2020-12-29

    How did you put that? Please show your steps in detail so that we can try to fix that for you.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-01-04

    Now that I'm back from the holidays, in WSL I had expanded filesystem.squash into its folder structure. I followed the instructions in drbl link posted above and installed samba in WSL. Then I took the net executable; placed it in /usr/local directory in the filesystem structure and then squashed it. Even if net needed supporting files, I would not expect just popping the net executable into filesystem would hose the boot. I would expect net to fail due to missing dependencies. Nothing changed outside of filesystem.squash.

     
  • Steven Shiau

    Steven Shiau - 2021-01-04

    So what's the status now? Your description is not very clear to me. Sorry.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-01-15

    OK, step by step:

    1. In WSL (Debian), I did apt-get samba and installed Samba into WSL.
    2. I had previously extracted filesystem.squashf to my file system
    3. Using the instructions (adapted for Samba) at [https://drbl.org/faq/fine-print.php?path=./2_System/81_add_prog_in_filesystem-squashfs.faq#81_add_prog_in_filesystem-squashfs.faq], I copied the Samba executables into the filesystem.
    4. Using makesquashfs, I created a new filesystem.squashfs file and copied to my USB stick.
    5. Booting results in what I posted on 23 December.

    I asked my question about those files on 11 December because I modified filesystem.squash,

     
  • Steven Shiau

    Steven Shiau - 2021-01-18

    Maybe it's easier you share the filesystem.squashfs so that I can give it a try here...

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-01-19

    OK, how do I get it to you? It's 254,104 kb.

     
  • Steven Shiau

    Steven Shiau - 2021-01-19

    You can put on google cloud, dropbox or any cloud service. Then email me at steven at stevenshiau org.
    Thanks.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-01-20

    Hello, you should have received or will receive a dropbox email.

     
  • Steven Shiau

    Steven Shiau - 2021-01-21

    No, I do not receive that. I can not find any mail about that in my spam folder. What's the subject you sent?

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-01-22

    See attached screen capture. I'll share it again.

     
  • Steven Shiau

    Steven Shiau - 2021-01-29

    OK, after I ran "unsquashfs filesystem.squashfs", I got a root file system, many files and dirs. However, apparently /lib, /lib32... do not link to correct dirs. I believe this is due to the file system does not support Unix file soft link. Hence it's recommended to do that on a GNU/Linux system. You can do that in virtual machine.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2021-02-10

    I built a Debian machine, installed smbclient and redid the filesystem.squash file. I can boot the stick now. I copied the net executable to FSSquash booted the stick and started getting the inevitable <supportfile> not found. I then went and copied over the files it asked for and then rinse and repeat. Once I get the SMB client running on this, I'll be good. </supportfile>

     

Log in to post a comment.

MongoDB Logo MongoDB