[{"data":1,"prerenderedAt":396},["ShallowReactive",2],{"project-14557909":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":44,"post_text":45,"what":46,"said":79,"maker_in_thread":184,"shape":186,"grid":190,"attempts":357,"same_week":358,"maker_shows":248,"maker_hidden":388,"reader_version":389,"card":390},"14557909","Sudo","Sudo for Windows","title","Show HN: Sudo for Windows","https:\u002F\u002Fgithub.com\u002Fmattn\u002Fsudo","github.com","barlog",1497500138,2017,58,70,721,2242,33,"notable","dev_tools","command line utility","cli",[24,25,26,27,28],"sudo","windows","elevate","uac","command line","mixed",-0.227,{"positive":32,"neutral":33,"mixed":34,"critical":35},3,9,0,7,19,{"idea":38,"docs":40,"privacy":41,"execution":43},{"positive":32,"critical":39},5,{"positive":34,"critical":34},{"positive":34,"critical":42},1,{"positive":34,"critical":42},[42,34,34,34,34,34,34,34,34,34,34,34,42,39,34,34,34,34,34,32,32,32,34,42,34,42,32,34,34,39,34,34,34,32,42,32,34,34,34,42],null,{"problem":47,"audience":63,"pricing":45,"motivation":69,"time_to_build":45,"stack":76,"openness":77,"stage":78,"team_size":78},{"value":48,"source":49,"evidence":50},"Running commands with admin rights on Windows from the command line without reopening a terminal as admin.","commenter",[51,55,59],{"id":52,"by":53,"text":54},"14558193","flukus","Chocolatey is one of my biggest reasons to use this. Every single time I install something I forget to run as admin.",{"id":56,"by":57,"text":58},"14558479","larschdk","But it's extremely cumbersome from the CLI. RunAs always asks for password for the Administrator account (not the account for the delegated account like sudo). I have admin…",{"id":60,"by":61,"text":62},"14558148","kyriakos","This is actually very useful, will save me time reopening terminal sessions",{"value":64,"source":65,"evidence":66},"Windows command line users who need admin rights.","inferred",[67,68],{"id":52,"by":53,"text":54},{"id":56,"by":57,"text":58},{"value":70,"source":49,"evidence":71},"Wanted to write the hosts file with gvim using a sudo-style tee command, which other implementations failed to support.",[72],{"id":73,"by":74,"text":75},"14558480","mattn_jp","Hi, all. I'm author. I added this because I want to write hosts file with \":w !sudo tee %\" from gvim.exe on Windows. But most of implementations doesn't work for this.",[],"open_source","unknown",{"praise":80,"objections":93,"requests":125,"questions":143,"alternatives":149},[81,86],{"value":82,"source":49,"evidence":83},"Useful for avoiding reopening terminals as admin.",[84,85],{"id":60,"by":61,"text":62},{"id":52,"by":53,"text":54},{"value":87,"source":49,"evidence":88},"Remembers credentials so the password is not re-entered.",[89],{"id":90,"by":91,"text":92},"14558496","eps","The main point of sudo is that it eliminates the need to enter the password for a while. Does your \"something identical in 10 lines\" do that?",[94,108,115],{"value":95,"source":49,"evidence":96},"Built-in RunAs and Start-Process -Verb RunAs already cover this.",[97,101,105],{"id":98,"by":99,"text":100},"14558297","TokenDiversity","I don't understand Windows permissions well but if anybody looking to do this without a dpendencey.. I think `Start-Process \u003Cstuff> -verb RunAs` does the same",{"id":102,"by":103,"text":104},"14558381","pjmlp","Nice as a learning project, but RunAs is already supported at CLI and GUI level, since several versions. For those without much Windows GUI-fu, shift-right click.",{"id":106,"by":99,"text":107},"14558300","`Start-Process \u003Cstuff> -verb RunAs` in PS",{"value":109,"source":49,"evidence":110},"Security concerns about caching elevation across the system.",[111],{"id":112,"by":113,"text":114},"14558378","ComodoHacker","Is it really sudo? Does it remember credentials somewhere for a limited time and across the whole system? If so, I cant see a way to implement it securely if you're not MS.",{"value":116,"source":49,"evidence":117},"UAC can be bypassed by user-space code, so it is not a full security boundary.",[118,122],{"id":119,"by":120,"text":121},"14558551","Andoryuuta","I mean, you can easily bypass the UAC dialog by duplicating the token of a already elevated process. Here is an example of this I saw before in powershell:…",{"id":123,"by":120,"text":124},"14566111","Yes, If any malicious program is running in user land in windows, it can easily bypass UAC. But, as was mentioned when this was being discussed on reddit[0], UAC was never meant…",[126,137],{"value":127,"source":49,"evidence":128},"Microsoft should let applications request elevation automatically.",[129,133],{"id":130,"by":131,"text":132},"14558446","NTripleOne","Yeah, I'd really like to see MS implement some method for applications to automatically request elevation when they try to do something that they otherwise wouldn't be allowed…",{"id":134,"by":135,"text":136},"14558162","ocdtrekkie","I've always been annoyed by the lack of ability for certain things to elevate as needed. Why doesn't Notepad offer to let you elevate when you try and save the hosts file? I…",{"value":138,"source":49,"evidence":139},"Document that credentials are remembered in the readme.",[140],{"id":141,"by":91,"text":142},"14558504","You should probably clarify in the Readme that your sudo remembers the credentials or this thread will overflow with runas alternative suggestions.",[144],{"value":145,"source":49,"evidence":146},"Does it remember credentials and for how long?",[147,148],{"id":112,"by":113,"text":114},{"id":90,"by":91,"text":92},[150,157,165,170,177],{"value":151,"source":49,"evidence":152},"Chocolatey sudo package",[153],{"id":154,"by":155,"text":156},"14558131","phs2501","There's also a \"sudo\" for windows distributed as a chocolatey package that I've used for at least a year. Appears to do pretty much the same thing as this one.…",{"value":158,"source":49,"evidence":159},"elevate.exe",[160,164],{"id":161,"by":162,"text":163},"14558492","Grom_PE","I just use this 6 kb no-dependencies command line program: http:\u002F\u002Fcode.kliu.org\u002Fmisc\u002Felevate\u002F",{"id":56,"by":57,"text":58},{"value":166,"source":49,"evidence":167},"PowerShell Start-Process -Verb RunAs",[168,169],{"id":98,"by":99,"text":100},{"id":106,"by":99,"text":107},{"value":171,"source":49,"evidence":172},"cygstart --action=runas",[173],{"id":174,"by":175,"text":176},"14558044","elsamuko","I'm using ``` cygstart --action=runas ``` This works well, too.",{"value":178,"source":49,"evidence":179},"Scoop sudo",[180],{"id":181,"by":182,"text":183},"14558370","locusm","There is also a sudo for scoop http:\u002F\u002Fscoop.sh\u002F",{"comments":34,"answered":34,"key":185},[],{"commenters":187,"max_depth":33,"maker_replies":34,"first_comment_mins":188,"lifespan_hours":189},36,53,22,[191,195,199,202,205,208,210,212,215,217,219,221,223,225,227,229,232,235,238,240,242,244,245,247,250,251,253,256,258,261,263,265,267,269,270,272,274,278,279,281,284,286,289,291,292,294,296,298,300,302,305,306,308,310,312,314,316,319,320,322,325,326,330,334,336,340,345,347,350,353],[192,34,42,193,194,34],"14558556","project\u002Fcritical\u002Fidea","stinos",[196,34,34,197,198,34],"14558680","commenter\u002Fneutral\u002Fnone","jhasse",[200,34,34,197,201,34],"14558756","nailer",[203,34,34,197,204,34],"14558892","posguy",[206,34,34,197,207,34],"14558908","holydude",[209,34,34,197,204,34],"14558954",[211,34,34,197,207,34],"14559033",[213,34,34,214,204,34],"14559109","other\u002Fneutral\u002Fnone",[216,34,34,197,201,34],"14559738",[218,34,34,197,207,34],"14560796",[220,34,34,197,194,34],"14559091",[222,34,34,197,201,34],"14559724",[224,34,34,197,194,34],"14559035",[226,34,34,197,204,34],"14559093",[228,34,34,197,194,34],"14559143",[230,34,34,197,231,34],"14558899","kelnos",[233,34,34,197,234,34],"14559864","duke360",[236,34,34,197,237,34],"14559989","cptn_brittish",[239,34,34,197,201,34],"14560016",[241,34,34,197,194,34],"14559014",[243,34,34,197,198,34],"14559178",[154,42,42,193,155,34],[52,42,39,246,53,34],"project\u002Fpositive\u002Fidea",[134,248,32,249,135,34],2,"project\u002Fneutral\u002Fidea",[106,248,34,197,99,34],[252,248,34,197,103,34],"14558373",[254,248,34,197,255,34],"14558665","oblio",[257,248,34,197,201,34],"14558770",[259,248,34,197,260,34],"14558902","dagw",[262,248,34,197,255,34],"14559089",[264,248,34,197,103,34],"14559183",[266,248,34,197,255,34],"14559320",[268,248,34,197,103,34],"14561585",[130,248,34,214,131,34],[73,32,32,271,74,34],"maker\u002Fneutral\u002Fidea",[141,32,32,273,91,34],"maker\u002Fneutral\u002Fdocs",[275,276,32,249,277,34],"14558484",4,"Jaruzel",[90,276,32,249,91,34],[280,276,34,197,277,34],"14558596",[282,276,34,197,283,34],"14558681","blauditore",[119,276,42,285,120,34],"project\u002Fcritical\u002Fprivacy",[287,276,32,288,99,34],"14558667","project\u002Fneutral\u002Fprivacy",[123,276,34,290,120,34],"commenter\u002Fneutral\u002Fprivacy",[98,39,34,197,99,34],[102,293,42,193,103,34],6,[295,293,32,249,74,34],"14558471",[297,293,34,197,277,34],"14558491",[299,293,34,197,74,34],"14558505",[301,293,34,197,277,34],"14558584",[303,293,34,197,304,34],"14558743","pawadu",[56,293,39,246,57,34],[307,293,34,197,304,34],"14558735",[309,293,34,197,260,34],"14558822",[311,293,34,197,304,34],"14559458",[313,293,34,197,57,34],"14559499",[315,293,34,290,304,34],"14559704",[317,293,34,197,318,34],"14566159","Const-me",[60,35,39,246,61,34],[161,321,42,193,162,34],8,[323,321,42,324,74,34],"14558538","project\u002Fcritical\u002Fexecution",[112,33,32,288,113,34],[327,33,34,328,329,34],"14558439","commenter\u002Fpositive\u002Fnone","skrebbel",[331,33,32,332,333,34],"14558521","project\u002Fneutral\u002Fexecution","huhtenberg",[181,335,34,214,182,34],10,[337,338,34,214,339,34],"14558751",11,"yread",[341,342,34,343,344,34],"14558161",12,"commenter\u002Fcritical\u002Fnone","dewiz",[174,346,34,214,175,34],13,[348,346,34,197,349,34],"14558159","robbyt",[351,346,34,197,352,34],"14558272","sapphire_tomb",[354,355,42,193,356,34],"14558227",14,"sllabres",[],[359,364,369,374,379,384],{"id":360,"name":361,"points":362,"category":363},"14558582","Snips",372,"ai",{"id":365,"name":366,"points":367,"category":368},"14583882","Decaffeinate",361,"languages",{"id":370,"name":371,"points":372,"category":373},"14587669","rust-algorithms",320,"learning_science",{"id":375,"name":376,"points":377,"category":378},"14593906","Copyfish",292,"productivity",{"id":380,"name":381,"points":382,"category":383},"14597485","NBox",286,"security_privacy",{"id":385,"name":386,"points":387,"category":368},"14588333","html5-parser",169,false,"v2",{"id":391,"name":5,"line":6,"ai":388,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":392,"top":18,"kw":393,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":394,"url":9,"mix":395,"praise":82,"objection":95,"sub":21},14557909,-0.23,[24,25,26,27,28],"1000000000001500000333010130050003130001",[32,33,34,35],1794036556318]