Pages

September 28, 2025

Enabling SMBv1 in Samba

 Even though it's bad for security, sometimes you just have to do it.

  1.  Make sure you have a /etc/samba/smb.conf file. You would have gotten this if you installed smbclient. If you didn't, then do that now. 
  2. Edit /etc/samba/smb.conf and put somewhere below "[global]" the following line:
    client min protocol = NT1
  3.  The change will likely be instantaneous (i.e., no restart required). When you are done, be sure to comment the line out:
    # client min protocol = NT1

 References here and here.

 

September 22, 2025

Copying files over a network with rsync

I thought I had found a good solution to copying files over a network with scp, but it turns out that utility doesn't copy symlinks as symlinks. Rather, it replaces the symlink with a copy of the content.

 Fortunately, rsync can be used for this. The magic invocation is:

rsync -r -t -p -v --progress -l -s -e ssh {username}@{address}:'//home/foo/Documents/myDir' /home/bar/Documents


The options are as follows:

-r: recurse into directories

-t: preserve modification times

-p: preserve permissions

-v: increase verbosity

--progress: show progress during transfer

-l: copy symlinks as symlinks

-s: no space-splitting; wildcard chars only

-e: specify the remote shell to use (ssh in the above)

You can also get this done with grsync. In fact, I got the above command line by examining grsync's output. The gotcha here is that you need to be able to access the source account without a password. rsync will prompt you for a password if necessary.