-1

I have disabled sudo by adding

security.sudo.enable = false

But is their any way to remove/disable bash and would this effect any progrs that depend on bash? Also does the line I have in my config uninstall sudo or just disable it?

whatever
  • 133
  • 1
  • 10
  • 1
    I think you shouldn't be asking two totally separate questions in one question post. It makes it harder for people who want to help you because they have to come up with two different answers. – David Grayson Jul 05 '22 at 16:54

1 Answers1

2

does the line I have in my config uninstall sudo or just disable it?

The module nixos/modules/security/sudo.nix has its entire config section wrapped in mkIf cfg.enable, so all its definitions only apply when security.sudo.enable == true.

The store can not contain setuid binaries. These are in /run/wrappers/bin, where you'll be able to confirm that sudo is completely gone.

is there any way to remove/disable bash and would this effect any progrs that depend on bash?

In practice, many scripts you may want to use will rely on either sh or bash to be present. I wouldn't recommend removing it for a desktop system.

E_net4
  • 27,810
  • 13
  • 101
  • 139
Robert Hensing
  • 6,708
  • 18
  • 23