slowman
V2EX  ›  问与答

OS X 下,如何指定让某个程序执行特权操作时,无需再输入密码?

  •  
  •   slowman · Apr 15, 2015 · 3250 views
    This topic created in 4233 days ago, the information mentioned may be changed or developed.

    其实是电信的客户端,每次都输2遍密码才能连上网,挺麻烦的

    6 replies  •  2015-04-15 15:50:00 +08:00
    tmqhliu
    tmqhliu
    Apr 15, 2015
    1
    owner改成root,再用chmod u+s 设置sticky bit
    tmqhliu
    tmqhliu
    Apr 15, 2015
    2
    说错了是用chmod u+s设置 setuid
    yxjxx
    yxjxx
    Apr 15, 2015❤️1
    3
    我的启动锐捷的方式,其实做成了Alfred workflow,供参考。
    https://gist.github.com/bc206d68a0396585a666.git
    slowman
    slowman
    OP
    Apr 15, 2015
    4
    @tmqhliu 设置了,然后无法运行。
    ➜ ~ /Applications/E信.app/Contents/MacOS/E信
    dyld: Library not loaded: @executable_path/../Frameworks/xlpppoectl.framework/Versions/A/xlpppoectl
    Referenced from: /Applications/E信.app/Contents/MacOS/E信
    Reason: unsafe use of @executable_path in /Applications/E信.app/Contents/MacOS/E信 with restricted binary
    [1] 4724 trace trap /Applications/E信.app/Contents/MacOS/E信

    我觉得苹果系统本身可能有什么办法能允许程序修改系统设置且不需输入密码,没想过设置 setuid 的方法。
    yxjxx
    yxjxx
    Apr 15, 2015❤️1
    5
    slowman
    slowman
    OP
    Apr 15, 2015
    6
    @yxjxx It works,谢谢。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   990 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 19:14 · PVG 03:14 · LAX 11:14 · JFK 14:14
    ♥ Do have faith in what you're doing.