摘要: 服务器是ubuntu12.04用一个账户app,使用su - app得到的环境变量和直接ssh登录的环境变量不同。导致su - app,无法执行ifconfigsu - app的环境变量/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesssh直接登录的环境变量:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games不同地方已经标出。问题出现在su执行的过程中,应该使用了/etc/login.defs文件,经过验证。ENV_SUPATH PATH= 阅读全文
posted @ 2014-01-09 17:17 silence.li 阅读(854) 评论(0) 推荐(0)
摘要: http://note.drx.tw/2008/01/linuxsudo.htmlfoobar ALL=(ALL) ALL現在讓我們來看一下那三個 ALL 到底是什麼意思。第一個 ALL 是指網路中的主機,我們後面把它改成了主機名,它指明 foobar 可以在此主機上執行後面 的命令。第二個括弧裏的 ALL 是指目標用戶也就是以誰的身份去執行命令。最後一個 ALL 當然就是指命令名了。例如,我們想讓 foobar 用戶在 Linux 主機上以 jimmy 或 rene 的身份執行 kill 命令,這樣編寫配置文件:任务:添加一个用户,使其只能sudo到app用户下:1.useradd -m - 阅读全文
posted @ 2014-01-09 15:58 silence.li 阅读(290) 评论(0) 推荐(0)
摘要: 1. 16313:20140109:110809.577 resuming IPMI checks on host [10.1.3.41]: connection restored 16337:20140109:113655.574 IPMI item [Current_1] on host [10.1.3.41] failed: first network error, wait for 15 seconds 16313:20140109:113717.981 IPMI item [Current_1] on host [10.1.3.41] failed: another network 阅读全文
posted @ 2014-01-09 14:25 silence.li 阅读(3878) 评论(0) 推荐(0)