LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-13-2021, 07:05 AM   #1
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 451

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
sudo appears to be using shadow authentication (Slackware64 -current)


EDIT: Fixed in the rebuilt version. Thanks, Pat!

Hey, folks. I posted about this in the requests thread, but it got buried. In the interest of saving space, the details are in the original post. The short version is that sudo on -current appears to be using shadow authentication instead of PAM authentication for 64-bit systems because LIBDIRSUFFIX is not set in the SlackBuild.

I did a little poking around by compiling sudo with PAM and with shadow and testing both versions against the stock package. A script ran "time sudo id" 1000 times and found the average; the test was run five times for each version of the package. These were the results:

Quote:
stock average: 0.007203
PAM average: 0.025647
PAM average: 0.023268
shadow average: 0.007461
stock average: 0.007343
shadow average: 0.00431
shadow average: 0.004293
shadow average: 0.004641
PAM average: 0.02575
PAM average: 0.015216
PAM average: 0.0212
stock average: 0.004787
stock average: 0.004099
stock average: 0.004298
shadow average: 0.00448
So, at least on my system, it looks as though sudo behaves like it uses shadow instead of PAM. Can anyone confirm the results? The script used and a patch to add LIBDIRSUFFIX to the sudo SlackBuild are attached.
Attached Files
File Type: txt sudo-test.sh.txt (580 Bytes, 3 views)
File Type: txt sudo.patch.txt (488 Bytes, 7 views)

Last edited by pghvlaans; 03-13-2021 at 11:54 PM. Reason: Fixed
 
Old 03-13-2021, 07:29 AM   #2
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Is this a bad thing?
 
Old 03-13-2021, 07:35 AM   #3
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 451

Original Poster
Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Not necessarily, just if you care about PAM.

I wouldn't have brought it up, but the SlackBuild contains code for detecting a PAM installation, so it's probably meant to run that way. Also, it would use PAM authentication if compiled on a 32-bit system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why root now has a password set in /etc/shadow in slackware64-current/isolinux/initrd.img? Didier Spaier Slackware 4 02-24-2016 09:36 AM
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
ubuntu karmic nis client 'ypcat shadow.byname' works, but 'getent shadow' fails casterln Linux - Networking 1 03-06-2010 01:47 AM
Updating from Slackware64-current to Slackware64 13. glore2002 Slackware 4 08-28-2009 06:50 PM
/etc/shadow- (notice the dash after the word shadow) shellcode Linux - Security 1 09-03-2004 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration