顯示具有 linux 標籤的文章。 顯示所有文章
顯示具有 linux 標籤的文章。 顯示所有文章

xxx is not in the sudoers file 解决方法

用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

svn+ssh 遇到問題 先記錄 之後再整理

先記錄 之後再整理
$ export SVN_SSH="ssh -v "
chmod 600 ~/.ssh/config
chown $USER ~/.ssh/config