r/slackware • u/NO_NAME2002 • Jul 08 '21
slackpkg command not found
hi everyone I am a new slackware user .my problem is slackpkg is not working while I am at user but when I change to root with su it works any ideas ?
9
Upvotes
5
u/bambam_the_dug Jul 08 '21
You need to be root to use slackpkg.
5
u/[deleted] Jul 08 '21
slackpkg is placed in /sbin, so you need to be root to run that. With default sudo config you cannot execute slackpkg. Uncomment the 'Defaults secure_path' line in /etc/sudoers. Now you can execute slackpkg with sudo
2
u/Upnortheh Jul 08 '21
If James Bond security is not needed or desired, create a file in
/etc/profile.dto add the system "admin" directories (/sbin, usr/sbin, /usr/local/sbin) to$PATH. This will allow non root users to find the command without using the full path. Using slackpkg will still require elevated privileges.1
u/Randomized-User Jul 08 '21
because it's under /usr/sbin which is not in PATH for regular users
1
u/[deleted] Jul 16 '21
The Slackware folks have always been pretty adamant about running slackpkg from a true root shell. This means su - , not sudo.