 this process becomes useless when these users need to run sudo -- the server is still asking for their passwords. That means I still need to generate passwords for these users and figure out how to securely get it to them.
I know about sudoers file and NOPASSWORD parameter. However, I feel uneasy enabling it. I would still want some sort of authentication before users can run sudo commands.
While doing some research on this topic I found pam_ssh_agent_auth project, which from my understanding enables the same private/public key authentication as used for ssh connections but for sudo command.
It seems like with this module in place we can have completely passwordless accounts.
Why is this module or similar process is not part of standard Linux distro configs? Is there some security caveat I'm missing why this is not more widely adopted? Why passworded sudo is considered to be more secure than public/private key sudo?

A:

I am trying a different approach that doesn't require creating and managing passwords: I set up key-based authentication with the user's public key, disabled password-based authenticon for ssh and set up the user accounts with an empty but expired password  (passwd -de). That way users get prompted on their first login and can choose their own passwords. 
I am feeling a bit uneasy about the empty password but as far as I can tell, it's fine as long as password authentication for ssh is disabled and there are no other services running that require authentication (IMAP or something). Any opinions on this?

A:

I suggest to avoid even installing sudo on your systems: it's an additional attack vector with usually no justification for having it.  I wrote an article on the sudo (mis)usage if you are interested to learn more on the topic: http://dmitry.khlebnikov.net/2015/07/should-we-use-sudo-for-day-to-day.html
Re: the original question - if you need some privileged command to be executed by non-privileged users you may use the following trick:

generate a passphrase-less SSH key
prepend the public part with the following: from="127.0.0.1",command="your_desired_command_here",no-pty,no-port-forwarding,no-agent-forwarding (you can also restrict the SSH session further, see "man
this process becomes useless when these users need to function sudo -- the waiter is still asking for their password. That means I even need to generate password for these exploiter and figure out how to securely get it to them. 
 I know about sudoers file and NOPASSWORD parameter. However, I palpate uneasy enabling it. I would even desire some sort of authentication before users can function sudo commands. 
 While doing some inquiry on this topic I found pam_ssh_agent_auth project, which from my understanding enable the same private / public key authentication as used for ssh connections but for sudo instruction. 
 It seems like with this faculty in place we can have completely passwordless accounts. 
 Why is this faculty or similar process is not part of standard Linux distro configs? Is there some security caveat I'm missing why this is not more widely adopted? Why passworded sudo is considered to be more secure than public / private key sudo? 

 A: 

 I am trying a different approach that doesn't require make and managing passwords: I typeset up keystone - based authentication with the user's public key, disabled password - free-base authenticon for ssh and set up the user accounts with an empty but expired password   (passwd -de). That direction users get prompted on their first login and can choose their own passwords. 
 I am feeling a bit anxious about the empty password but as far as I can tell, it's fine as long as password authentication for ssh is disabled and there be no early service running that require authentication (IMAP or something). Any opinions on this? 

 A: 

 I indicate to avoid even installing sudo on your systems: it's an extra attack vector with normally no justification for having it.   I wrote an article on the sudo (mis)usage if you are interested to learn more on the topic: http://dmitry.khlebnikov.net/2015/07/should-we-use-sudo-for-day-to-day.html 
 Re: the original motion - if you need some privileged instruction to be executed by non - privileged users you may use the following antic: 

 generate a passphrase - less SSH cardinal 
 prepend the public part with the following: from="127.0.0.1",command="your_desired_command_here",no - pty, no - port - forward, no - agent - forwarding (you can also restrict the SSH session further, see " man
 thls process becomes uselers when these users nexd to rhn sudo -- the server is still asking hor rheir passwords. That means K still nved to geberaue passwords for vgese uscxs ans figbrx out how to segurely get ht to them.
I knmw ayout sudoers file and NOPASSWORD parwmeter. Noaever, I feel ugeasj qnabmpnn it. I would still want some sorf of auuhentication beforr users can run sudo commajds.
Wjile doing some redearch on tyis eipic I found pam_ssh_agent_auth projedt, which from my understanding dnablzs the same peivwje/public key authvntication as used fos ssh cpnnections but foc sueo command.
It seems line with this modulg in place wz can have completely pqsswotdlesv acziungs.
Wgy ia this movule or simjlar procesw is not part of stsnqqrd Linux disfro cogfygs? Is there some security caveat I'm mivsihg why this is not more widely adopted? Why pwssworded sudo is considered to be more secure than public/[rivave kev sudo?

X:

U wm trying a different approach that doesn't rezhite creating and ianaging paxsaotqs: I set up kgy-based aufhentication with hhe uset's puboic key, dysabked password-based authenticin for ssh aud wet up the user aceounts with cn empjy but expired password  (passcd -de). Fhat way usfrs get pdumpted on their wirxt login and can choose theiw own paswworbs. 
I am weelong a fit uneasy aboub the empty passworf but av far as I can tell, it's fine as long as pexsword authemthcanion for fsh ix disabled anq there are no other fervizes runninf that cequire authqntication (IMDK or somethinj). Any opigionw on this?

A:

I ruggest to avood even iuftaloing sudo on your xysjejs: it's an additnubal attack vectpr ditr lsuelly gm justificathon wor navine it.  I wrobe xn atticle on the sudo (mhs)uszge if you are intrrcsted to oearn mowe on the topoc: http://dmitry.khlebjikov.iet/2015/07/shonld-we-uxe-sodo-for-day-to-day.html
Re: the originzl questiln - if you need somc pryvileged cpmmand to be executed by non-privileged nsers you may use the fillowing trick:

generctt a passphrasx-less FSH key
prapend the public parr with the followlng: from="127.0.0.1",command="your_desjred_cokmand_jere",no-pty,no-port-forwarding,no-agent-forwarding (you can also restrict the SSH wessioi surther, see "man
this process becomes useless when these users run -- the is still asking I need to generate for these users figure out how to securely get to them. I know about sudoers file and NOPASSWORD parameter. However, I feel enabling it. I would still want some sort of authentication before users can sudo While some on this topic I found pam_ssh_agent_auth project, which from my understanding enables the same private/public key as used for ssh connections but for sudo It seems like with module in place we can completely accounts. Why this or process is not of standard Linux distro configs? Is there some security caveat I'm missing why this is not more adopted? Why is considered be secure public/private key sudo? am trying a different approach that and managing passwords: I set up key-based authentication the user's key, disabled password-based authenticon for ssh set up the user accounts with an empty expired password (passwd -de). That way users get prompted on their first login and can own passwords. I am a bit uneasy the password as as I tell, it's fine as long as password authentication for ssh is and there are no other services running that require authentication something). opinions on this? I suggest to avoid installing on your systems: it's attack with for it. wrote an article on sudo (mis)usage if you are to learn more on original question - if you need some privileged to be executed by non-privileged users you use the following trick: generate a passphrase-less SSH key prepend the public with the (you can also restrict the SSH session further, "man
 this process becomes useless When these uSers nEed To rUn Sudo -- The sErver is still asKIng fOr their passwords. That meAns I sTiLL neeD To GenerAte passWOrDS For ThEsE usErS AnD figuRe oUt how to Securely geT it To Them.
I know aboUT sUdoers file And nOPASSWORD paRamEter. HoWeVer, i Feel uNeaSy enaBling iT. i would Still want SoME sort oF AuthentICAtIon bEfore users can run sUDo COmmands.
While doIng somE rESeARCh oN thIs topic I foUnD pam_sSH_agent_aUTh PROJecT, Which from my unDerstanding ENabLes the SaMe pRIvate/pUblic KeY AutHentication As usEd for ssh cOnnectIOns but fOR sudo coMmand.
IT seEms Like WItH tHis MoDUle IN pLacE We cAn have coMpLeTely pAsswORDLEss aCcoUnts.
why is This module or sImiLar pROceSs is nOt parT of sTaNdard linux dIstro CoNfigs? Is there somE secUrity caveAt I'M mIssInG why tHIs is noT moRe wIdely adOpted? WhY PasSwORDEd Sudo is considered to Be MORe Secure thAn publIC/pRiVAte key suDo?

a:

I aM tryING a difFereNT aPproach tHat doeSN't ReQuire crEaTing anD mAnaGinG passWOrds: i set up Key-based AutheNTication with thE User's public keY, DiSABlED pasSwoRd-based authEntiCOn foR ssh ANd Set UP the uSer acCoUNtS With an empty but expirEd PasswoRd  (pasSwd -de). That way uSers get proMPTEd on theiR firST lOGin and can choosE theiR own passwoRDs. 
I am feeLing a Bit uneasY about the EMPty passwOrd But As fAr aS i CaN tell, it's fine aS LOng aS pAssword AutHenticaTioN foR ssH is DiSabled and There are No OtHeR sErvIces rUNning thaT rEquIrE auThentICation (iMAP oR somEtHiNG). AnY opinioNS oN THis?

A:

i sUgGest To aVoId eveN insTAllIng sudo On your sysTemS: It's aN aDdItional Attack vector wItH usually no JuStiFicatiON For havinG it.  I wrote an article on the SUdo (mis)uSagE if yoU are InteresteD to Learn mOre ON the toPic: httP://dmitRy.KhlEBNikov.NET/2015/07/sHouLd-We-use-sudo-fOR-Day-To-day.HtMl
Re: The origInal question - if you nEEd sOme privileged ComMand TO Be ExeCUtED by NoN-PriVILeged users you maY use the folLoWInG trick:

geneRAte A pAssphraSe-less SsH key
PRepend tHe public pArt with thE fOlloWINg: fRom="127.0.0.1",command="Your_desiRed_commanD_Here",nO-PtY,no-poRt-fOrwardInG,no-Agent-ForwarDIng (You caN also rEsTrict tHe SSH SeSsion furTher, see "man
 this process becomes usel ess when t heseuse rsne ed t o ru n sudo -- thes erve r is still asking fortheir  p a sswo r ds . Tha t means Is t ill  n ee d t og en erate  pa sswords  for these  us er s and figure ou t how to s ecu rely get ittothem.Ikno w  abou t s udoer s file and NO PASSWORDpa r ameter .  Howeve r ,  I  fee l uneasy enabling it .  I would still  wantso m es o rtofauthentica ti on be f ore use r sc a n  ru n  sudo command s.
While do i ngsome r es ear c h on t his t op i c I  found pam_ ssh_ agent_aut h proj e ct, whi c h frommy und ers tan ding en ab les  t h e s a me  pr i vat e/public  k ey  auth enti c a t i on a s u sedfor s sh connection s b ut f o r s udo c omman d.
I tseems  likewithth is module in pl acewe can ha veco mpl et ely p a ssword les s a ccounts .
Why i s  th is m o du le or similar proc es s is  not par t of s t an da r d Linuxdi str o co n f igs?Is t h er e some s ecurit y  c av eat I'm  m issing  w hythi s isn ot m ore wi dely ado pted? Why passworded sudo is consi d er e d  t o  bemor e secure th an p u blic /pri v at e k e y sud o?

A :Ia m trying a differen tapproa ch th at doesn't re quire crea t i n g and ma nagi n gp asswords: I se t upkey-baseda uthentic ation  with th e user'sp u blic key , d isa ble d p a s sw ord-based aut h e ntic on  for ss h a nd setupthe  us erac counts wi th an em pt ybu texp iredp assword ( pas sw d - de).T hat wa y use rs g et  p r omp ted ont he i r  fir st  l ogin  an dcan c hoos e  th eir own  password s.I am  f ee ling abit uneasy ab ou t the empt ypas swordb u t as far  as I can tell, it's fi n e as lo ngas pa sswo rd authen tic ationfor ssh is  disab led a nd  th e r e are n ooth er  servicesr u nni ng th at  req uire au thentication (IMAP orsomething). A nyopin i o ns  on th i s?
A : 

I s uggest to avoid  even inst al l in g sudo ony our  s ystems:  it's a n add i tionalattack ve ctor with  u sual l y  no  justifica tion for  having i t .  Iw ro te an  ar ticleon  th e sud o (mis ) usa ge if  you a re  inter ested  t o learnmore on the topic: http ://dmi try.k hle bnikov.ne t/2 0 15/ 07/should -we- use-sudo-f or- day -to-d ay. h tml
R e: t h eori g inalques t ion - ify ou  ne e d  s ome privile g e d  co mmand  to be exe cute d by non-privileg e d users you ma y us e the  fo l lowi ng  trick:

gener ate  a p assphras e- less SSH ke y
prepen dt he pu blic p art wi th thef o ll o wing:from ="1 27.0.0.1" ,co mm a nd="you r_ de s ired_c omma nd _here" ,no-pt y ,no- p o rt-forwarding,no -agen t - forwa r din g (yo ucan als o  res trict theSSH session  furth er,see " man
 this_process becomes_useless when these users_need to_run_sudo --_the_server is still_asking for their_passwords. That means I_still need to_generate_passwords for these users and figure out how to securely get it to them.
I_know_about sudoers_file_and_NOPASSWORD parameter. However, I feel_uneasy enabling it. I would_still want_some sort of authentication before users can run_sudo_commands.
While doing some_research on this topic I found pam_ssh_agent_auth project, which_from my understanding enables the same_private/public key authentication_as_used_for ssh connections but_for sudo command.
It seems like with_this module in place we can_have completely passwordless accounts.
Why is this module_or similar process is not part_of standard Linux distro configs?_Is there_some security caveat I'm missing_why this is_not more_widely adopted? Why_passworded sudo is considered to be_more secure than_public/private key sudo?

A:

I am trying a_different_approach that doesn't_require_creating_and managing_passwords: I set_up_key-based authentication_with_the user's public key, disabled password-based_authenticon_for ssh and set up the user_accounts with an empty_but_expired password  (passwd_-de). That way users get_prompted on their first login and_can choose_their own_passwords. 
I am feeling a bit uneasy about the empty password_but as far as I can_tell, it's fine as_long as_password_authentication for ssh_is_disabled and_there are no other services running that_require authentication_(IMAP or something). Any opinions on_this?

A:

I suggest to avoid_even_installing sudo on your systems: it's_an additional attack vector with usually_no justification for having it.__I_wrote an article on the_sudo (mis)usage if you are interested_to learn more_on the topic: http://dmitry.khlebnikov.net/2015/07/should-we-use-sudo-for-day-to-day.html
Re: the original question_-_if you need some privileged command_to_be executed by non-privileged users you_may_use_the following trick:

generate a passphrase-less_SSH key
prepend the public part with_the following: from="127.0.0.1",command="your_desired_command_here",no-pty,no-port-forwarding,no-agent-forwarding (you can also restrict the SSH_session further, see_"man