用sudo時提示 "xxx is not in the sudoers file. This incident will be reported."
其中 XXX 是用戶名,
也就是你的用戶名沒有權限使用sudo
所以必須要修改 /etc/sudoers 文件
修改方法:
1.進入超級用戶模式
su
2.添加文件修改權限
chmod u+w /etc/sudoers
3.編輯 /etc/sudoers
vi /etc/sudoers
4.找到 root ALL = (ALL) ALL 後 ,按下 " i " 進入修改模式
在底下加入
xxx ALL = (ALL) ALL
( 備註 xxx 是用戶名稱 )
5.儲存修改並離開
按下 Esc 後,輸入 " :wq "
6.恢復文件修改權限
chmod u-w /etc/sudoers
SSH Config
SSh Config
path : ~/.ssh/config
Host ( 代號 )
Hostname ( IP or 網址 )
Port 22
User ( 帳號 )
identityfile ( key path )
example
Host svn
Hostname 192.168.0.180
Port 22
User willien
identityfile ~/.ssh/key
----------------------------------------------
要記得將 config , key 的權限修改為 600
之後用搭配 svn 使用
$ svn co svn+ssh://svn/svnserverpath
path : ~/.ssh/config
Host ( 代號 )
Hostname ( IP or 網址 )
Port 22
User ( 帳號 )
identityfile ( key path )
example
Host svn
Hostname 192.168.0.180
Port 22
User willien
identityfile ~/.ssh/key
----------------------------------------------
要記得將 config , key 的權限修改為 600
之後用搭配 svn 使用
$ svn co svn+ssh://svn/svnserverpath
訂閱:
文章 (Atom)