Can't get login script to not prompt for password.
The script is run on startup and the effects can be seen before first login, yet after I login I am prompted for a password.
I have a script:
-rwxrwxr-x 1 nick nick 43 Jun 17 20:57 /home/nick/Documents/Scripts/run_on_login.sh
I want it to run on login to enable mouse customization. So I add it to autostart and it creates the file:
-rw------- 1 nick nick 162 Jun 17 20:41 home/nick/.config/autostart/run_on_login.sh.desktop
I then created the file:
-rw-r----- 1 root root 239 Jun 17 20:54 /etc/sudoers.d/my_custom_rules
and have tried all these entries at once
yet I am still prompted for a password after login.
What am I doing wrong?
How do I run a script without being prompted for password?
Do I have to change the script owner to root, I was hoping to avoid that.
The script is run on startup and the effects can be seen before first login, yet after I login I am prompted for a password.
I have a script:
-rwxrwxr-x 1 nick nick 43 Jun 17 20:57 /home/nick/Documents/Scripts/run_on_login.sh
Code:
#!/bin/bash systemctl enable --now ratbagd
-rw------- 1 nick nick 162 Jun 17 20:41 home/nick/.config/autostart/run_on_login.sh.desktop
I then created the file:
-rw-r----- 1 root root 239 Jun 17 20:54 /etc/sudoers.d/my_custom_rules
and have tried all these entries at once
Code:
root ALL=(ALL) NOPASSWD: /home/nick/Documents/Scripts/run_on_login.sh root ALL=(ALL) NOPASSWD: /home/nick/.config/autostart/run_on_login.sh.desktop nick ALL=(ALL) NOPASSWD: /home/nick/Documents/Scripts/run_on_login.sh nick ALL=(ALL) NOPASSWD: /home/nick/.config/autostart/run_on_login.sh.desktop
What am I doing wrong?
How do I run a script without being prompted for password?
Do I have to change the script owner to root, I was hoping to avoid that.








Comment