Wednesday, November 26, 2025

Add user to sudoers in Debian 13

1. Войти под root

$ su -

2. Install sudo

# apt install sudo

3. Добавить testuser в sudo

# usermod -aG sudo testuser

Проверить

# groups testuser

Должна быть группа sudo.

4. Перезайти под testuser

$ sudo whoami

Thursday, August 28, 2025

Connecting to a shared printer - error 0x000000cb

Why

Since Sept 2021, Windows requires:

  • Admin privileges to install any shared driver.  

  • And the driver package must be properly signed and match OS architecture.
    If the package doesn’t pass, Windows just errors with 0x000000cb.


Fixes to try:

1. Clear cached printer drivers

On the client:

  1. Run printui /s /t2 → opens Print Server Properties.

  2. Remove all drivers for that printer.

  3. Reboot.

Then try reconnecting.


2. Registry tweak (Point and Print relax)

This is probably what you used before.

On the client PC, set:

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint] "RestrictDriverInstallationToAdministrators"=dword:00000000 "NoWarningNoElevationOnInstall"=dword:00000001 "UpdatePromptSettings"=dword:00000001

Or if the PointAndPrint key doesn’t exist, create it.

3. Manually install the driver first

  • Download the exact printer driver from the manufacturer.

  • Install it locally on the client.

  • Then connect to the shared printer again — Windows will reuse the existing driver instead of pulling from the server.


4. Use Group Policy (if in domain)

Path:

Computer ConfigurationAdministrative TemplatesPrintersPoint and Print Restrictions
  • Set Enabled

  • Configure:

    • Users can point and print to: "All servers" (or specify your print server)

    • Security prompts: Do not show warning or elevation prompt


5. If nothing works: Connect via TCP/IP port

Instead of SMB share, add the printer as a local printer:

  • Add Printer → "Add a local printer" → "Create a new port" → Standard TCP/IP Port.

  • Enter the printer’s IP directly.

  • Install the driver manually.

This bypasses the SMB Point and Print mechanism entirely.

My case:

Why 0x000000cb appears only on one PC, other pc's were connecting to that same printer just fine.

That error means “The driver being installed is not valid” (basically, Windows can’t load the print driver package).

On the problematic PC, Windows sees a different version of the driver already present locally (newer or incompatible). When it tries to reconcile that with the one offered by the server, the mismatch causes the installation to fail → hence 0x000000cb.

The fix that worked for me after i tried all the listed fixes:

Pre-install the exact driver locally

Since the other PCs accept the server’s older driver, you can pre-stage it on the broken PC:

  1. Copy the working .inf driver package from another PC:

    • Run pnputil /enum-drivers | findstr /i citizen on a working PC → note the oemXX.inf.

    • Copy that driver folder from C:\Windows\System32\DriverStore\FileRepository\...

  2. On the broken PC:

    pnputil /add-driver <path-to-inf> /install
  3. Then connect to the printer again → it won’t need to pull the package from the server, it’ll just match it.

Sunday, February 16, 2025

Boot Linux installations from WDS PXE

  • Download syslinux from http://www.kernel.org/pub/linux/utils/boot/syslinux/
  • Extract bios\core\pxelinux.0 bios\com32\menu\vesamenu.c32 and bios\com32\chain\chain.c32 from the syslinux download and put it on your WDS server in $WDS-ROOT\Boot\x64\(substitute WDS-ROOT for where your WDS root folder is)
  • Extract additional modules such as bios\com32\lib\ldlinux.c32, bios\com32\lib\libcom32.c32 ,  bios\com32\cmenu\libmenu\libmenu.c32, bios\com32\libutil\libutil.c32, bios\com32\lua\src\liblua.c32, bios\com32\gpllib\libgpl.c32. See also ELF missing dependencies
  • Rename/copy pxelinux.0 to pxelinux.com, abortpxe.com to abortpxe.0 and pxeboot.n12 to pxeboot.0
  • Create a folder named pxelinux.cfg in the $WDS-ROOT\Boot\x64\ folder
  • Create a folder named Linux (in the $WDS-ROOT\Boot\x86\ and $WDS-ROOT\Boot\x64\ folder)
  • Run in cmd
wdsutil /set-server /bootprogram:boot\x64\pxelinux.com /architecture:x64
wdsutil /set-server /N12bootprogram:boot\x64\pxelinux.com /architecture:x64

 Will use NFS for serving the installation files

  • Install NFS, create and share folder $WDS-ROOT\Boot\x64\Linux
  • Copy your linux distro installation files  (in my case ubuntu 24.04) to this folder (create Linux\ubuntu24 folder). I tried before the same with Ubuntu 22.10 but i couldn't make it to boot successfully - an error "no media filesystem found" or something like that.
  • Create default file in the pxelinux.cfg folder:

DEFAULT      vesamenu.c32
PROMPT       0
MENU TITLE PXE Boot Menu
MENU INCLUDE pxelinux.cfg/graphics.conf
MENU AUTOBOOT Starting Local System in 8 seconds
# Option 1 - Exit PXE Linux & boot normally
LABEL bootlocal
      menu label ^Boot Normally
      menu default
      localboot 0
      timeout 80
      TOTALTIMEOUT 9000
# Option 2 - Run WDS
LABEL WDS (WORKING)
MENU LABEL ^Windows Deployment Services
KERNEL pxeboot.0
   #-- 
Label UBUNTU
menu label Ubuntu 24.04 Install NFS
kernel /Linux/ubuntu24/casper/vmlinuz
append nfsroot=10.0.0.240:/Linux/ubuntu24 netboot=nfs ip=dhcp boot=casper initrd=/Linux/ubuntu24/casper/initrd
# Option 3 - Exit PXE Linux
LABEL Abort
MENU LABEL E^xit
KERNEL abortpxe.0
Sources:

Finally, didn't make it to boot with UEFI, even though i found one source claiming that it is possible

 

Sunday, December 22, 2024

Add new fonts to windows via GPO

 

Step 1: Create New GPO

In this example, I created a new GPO called Fonts Installation.

Step 2: Copy files to Fonts folder

  1. Edit ‘Fonts Installation’ GPO and navigate to: User Configuration > Preferences > Windows Settings > Files

  2. Create New File: Right click > New > File

  3. In Source file(s), enter location of the file (\\network location)

  4. In Destination File: C:\Windows\Fonts\Orkney Bold Italic.tff

  5. Click OK

Step 3: Add Registry

  1. Navigate to User Configuration > Preferences > Windows Settings > Registry

  2. Create New Registry Item with the following attributes:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

Value Name: [name of the font] (TrueType)

e.g. Orkney Bold Italic (TrueType)

Value type: REG_SZ

Value data: Orkney Bold Italic.ttf

  1. Click OK

Step 4: Assign GPO to OU

Tuesday, July 2, 2024

Clore.ai ubuntu 20.04 installation

 After Ubuntu install:

 - Update and upgrade + reboot

$ sudo apt update
$ sudo apt -y upgrade && sudo reboot

- install needed packages and nvidia driver + reboot

$ sudo apt -y install mc ssh gcc curl nvidia-driver-535 && sudo reboot

- install clore.ai script

$ sudo -i
# bash <(curl -s https://gitlab.com/cloreai-public/hosting/-/raw/main/install.sh)
# /opt/clore-hosting/clore.sh --init-token <token>
# reboot

- Have fun :)




Thursday, January 4, 2024

Create secondary HDD partition

 parted /dev/sda mklabel gpt

parted -a opt /dev/sda mkpart "partitionname" ext4 0% 100%

lsblk --fs

mkfs -t ext4 -L "DATA" /dev/md124p1

mkdir -p /mnt/data

mount -o defaults /dev/md124p1 /mnt/data

nano /etc/fstab

/dev/md125p1    /diskdata       ext4    defaults        0       0


Wednesday, August 30, 2023

Install Cuda Toolkit 11.8 & Realtek wifi 8852ce on Ubuntu 20.04

Nvidia driver & Cuda

- ubuntu clean install, with "download additional drivers" option marked

(otherwise we get a black screen right after installation, even though we use onboard vga in case of a Supermicro MB);

- update ubuntu, reboot;

$ sudo apt update
$ sudo reboot

- install needed packages;

$ sudo apt install mc, ssh, make, gcc, g++, build-essential

- strongly recommended - switch from console to ssh via another pc, to avoid any black screen issues and loss of display;

- exit graphical interface, otherwise installer will fail;

$ sudo init 3

- remove any nvidia drivers and/or cuda version that were/if were installed;

$ sudo apt purge nvidia*
$ sudo apt remove nvidia-*
$ sudo apt autoremove && sudo apt clean
$ sudo rm /etc/apt/sources.list.d/cuda*
$ sudo rm -rf /usr/local/cuda*

source:

https://gist.github.com/MihailCosmin/affa6b1b71b43787e9228c25fe15aeba


- (in some cases) remove the nouveau driver

$ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$ sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf" 
$ cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
$ sudo update-initramfs -u
$ sudo reboot

- download and install Nvidia driver (run file)

$ wget https://us.download.nvidia.com/XFree86/Linux-x86_64/535.104.05/NVIDIA-Linux-x86_64-535.104.05.run
$ sudo sh NVIDIA-Linux-x86_64-535.104.05.run

- download and install Cuda toolkit 11.8 (run file)

$ wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
 $ sudo sh cuda_11.8.0_520.61.05_linux.run

- options to install - unmark the nvidia driver, in case you have another version installed;

- You may get a warning at the end about the nvidia driver version, but the installation should succeed;

- quoted from Cuda postinstall instructions;

Please make sure that

 -   PATH includes /usr/local/cuda-11.8/bin

 -   LD_LIBRARY_PATH includes /usr/local/cuda-11.8/lib64, or, add /usr/local/cuda-11.8/lib64 to /etc/ld.so.conf and run ldconfig as root

- follow the postinstall instructions above and add the path lines to "/home/user/.bashrc"; (replace user with your username);

 $ nano /home/user/.bashrc

- add the lines at the end of the file and save the changes;

export PATH="/usr/local/cuda-11.8/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH"

- reboot;

- check Cuda version;

 $ nvcc --version
###################################################################################
##################### Latest experience with Supermicro+Nvidia ##########################
##################################################################################
After Ubuntu install (20.04, 22.04, even 24.04) with the monitor connected to Aspeed VGA onboard, might encounter black display at the login screen or stuck in Supermicro logo even though  the OS is fully booted and working.
The solution: 
 - blacklist the nouveau driver, 
 - enable nomodeset in the grub configuration 
 -> during post with editing the grub parameters
 ---> add "nomodeset" near "quiet splash"
 --->Save and boot F10 or Ctrl+X
 -> after boot through ssh or console, edit the /etc/default/grub file
 ---> add "nomodeset" near "quiet splash" 
 ---> run update-grub and reboot
 - enable nvidia proprietary driver from the "Additional drivers"
 - reboot
-----------------------------------------------------------------------------------------------------------------------------

Realtek 8852ce Wifi driver
source 


- remove the ineffective driver:

sudo dkms remove rtl88x2ce/35403 --all

- install the correct driver:

sudo apt install --reinstall git bc
git clone https://github.com/lwfinger/rtw89.git
cd rtw89
make
sudo make install

- You will probably need to disable Secure Boot. Reboot. (didn't check, it worked without it)

When your kernel version changes, then you need to do the following:

cd ~/rtw89
git pull
make clean
make
sudo make install

EDIT: Let’s load the required firmware:

cd /usr/lib/firmware/
sudo mkdir rtw89
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtw89/rtw8852c_fw.bin