使用visudo命令進行sudo配置文件的編寫
## The COMMANDS section may have other options added to it. ## ## Allow root to run any commands anywhere root ALL=(ALL) ALL ansible ALL=(ALL) ALL ## Allows members of the 'sys' group to run networking, software, ## service management apps and more.
當(dāng)前需要做sudo的用戶為ansible,即將其添入root行下方
保存退出即可
免密碼sudo
## The COMMANDS section may have other options added to it. ## ## Allow root to run any commands anywhere root ALL=(ALL) ALL ansible ALL=(ALL) NOPASSWD:ALL ## Allows members of the 'sys' group to run networking, software, ## service management apps and more.
只需要將對應(yīng)用戶的行設(shè)置 NOPASSWD即可實現(xiàn)無密碼sudo
標(biāo)簽:甘孜 周口 忻州 邢臺 泉州 甘南 銅仁 來賓
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Centos配置sudo用戶》,本文關(guān)鍵詞 Centos,配置,sudo,用戶,Centos,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。