# Sudo don't work in shell by default

**URL:** <https://forum.systemcrafters.net/t/sudo-dont-work-in-shell-by-default/2040>\
**Category:** Guix\
**Tags:** guix\
**Created:** [June 3, 2026, 4:59pm UTC](https://forum.systemcrafters.net/t/sudo-dont-work-in-shell-by-default/2040 "2026-06-03T16:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlxdy](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/mlxdy/32/1198_2.png) [@mlxdy](https://forum.systemcrafters.net/u/mlxdy)\
**Post date:** [June 3, 2026, 4:59pm UTC](https://forum.systemcrafters.net/t/sudo-dont-work-in-shell-by-default/2040/1 "2026-06-03T16:59:03Z")

</div>

`sudo: /home/mlxdy/.guix-home/profile/bin/sudo must be owned by uid 0 and have the setuid bit set`

Before it was working, but after changing someday my config stopped working and I can’t make it working again. I don’t remember which change broke that. I wanted to fix it without asking on forum, but I’m new guix user and I don’t have idea what’s wrong here.

In Bash and Zsh I can fix problem by doing source /etc/profile but I have to do this everytime after opening new shell, that’s only useful info which I found on internet I don’t know if I should to set it in shell profile, I don’t have permissions to it so I think that I shouldn’t. In fish I tried `set GUIX_PROFILE /run/current-system/profile` but it changed nothing (error after typing source /etc/profile in fish say to do this instead)

My configurations (I wasn’t modifying any shell configuration)  
.profile:  
`HOME_ENVIRONMENT=$HOME/.guix-home`  
`. $HOME_ENVIRONMENT/setup-environment`  
`$HOME_ENVIRONMENT/on-first-login`  
`unset HOME_ENVIRONMENT`

.zprofile:

```shell
# Set up the system, user profile, and related variables.

emulate sh -c ‘. /etc/profile’

# Set up the home environment profile.

emulate sh -c ‘. ~/.profile’

```

config.fish:

```auto
status --is-login; and not set -q __fish_login_config_sourced
and begin

set --prepend fish_function_path /gnu/store/m8l3nhvjmcbavx2abnghr96x09wbvk52-fish-foreign-env-0.20230823/share/fish/functions
fenv source $HOME/.profile
set -e fish_function_path[1]

set -g __fish_login_config_sourced 1

end

```

My home services:

```auto
   (services
    (append
     (list
      (service home-files-service-type
					`((".guile" ,%default-dotguile)
					  (".Xdefaults" ,%default-xdefaults)))

		(service home-fish-service-type)

		(service home-gpg-agent-service-type)

      (service home-xdg-configuration-files-service-type
					`(("gdb/gdbinit" ,%default-gdbinit)
					  ("nano/nanorc" ,%default-nanorc))))
     %base-home-services))))

```

System services (%my-services are desktop-services with gdm removed):  
`(services (append (list`  
`(service screen-locker-service-type`  
`(screen-locker-configuration`  
`(name “swaylock”)`  
`(program (file-append swaylock “/bin/swaylock”))`  
`(using-pam? #t)`  
`(using-setuid? #f))))`  
`%my-services))`

User in system config:

`;; The list of user accounts (‘root’ is implicit).`  
`(users (cons* (user-account`  
`(name “mlxdy”)`  
`(comment “Mlxdy”)`  
`(group “users”)`  
`(home-directory “/home/mlxdy”)`  
`(shell (file-append fish “/bin/fish”))`  
`(uid 1000)`  
`(supplementary-groups '(“wheel” “netdev” “audio” “video” “kvm”)))`  
`%base-user-accounts))`

I thank you in advance for any answers!

---

<div class="post-metadata">

**Author:** ![mlxdy](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/mlxdy/32/1198_2.png) [@mlxdy](https://forum.systemcrafters.net/u/mlxdy)\
**Post date:** [June 4, 2026, 11:43am UTC](https://forum.systemcrafters.net/t/sudo-dont-work-in-shell-by-default/2040/2 "2026-06-04T11:43:50Z")

</div>

I installed sudo in my home profile, I don’t know how this happened. After home reconfiguration everything works as expected.
