( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0008413856{main}( ).../index.php:0
20.09574264304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.489415903440Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.489615903496Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.489615903872Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.489615903872Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.489815903968Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.490215942208require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.495316234152GKTemplate->__construct( ).../component.php:31
100.503416388032GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.504216432000require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0008413856{main}( ).../index.php:0
20.09574264304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.489415903440Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.489615903496Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.489615903872Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.489615903872Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.489815903968Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.490215942208require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.495316234152GKTemplate->__construct( ).../component.php:31
100.506416555248GKTemplateMenu->getMenuType( ).../gk.framework.php:85
add a user to the sudoers linux为用户添加sudo权限
Logo
Print this page

add a user to the sudoers linux为用户添加sudo权限

 

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。下面是修改方 法:

1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用) 
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。 
3)编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",输入"i"进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存(就是先按一 下Esc键,然后输入":wq")退出。 
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。


( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0008413856{main}( ).../index.php:0
20.09574264304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09574264304Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.332011455360Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.333011479640Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.334111534968Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.334511562368require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.346311962000K2ControllerItem->execute( ).../k2.php:64
90.346311962000K2ControllerItem->display( ).../BaseController.php:710
100.360512612704K2ControllerItem->display( ).../item.php:78
110.360512612704K2ControllerItem->display( ).../controller.php:19
120.366812983744Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.369513004112K2ViewItem->display( ).../ViewController.php:102
140.479715831480K2ViewItem->display( ).../view.html.php:742
150.479715831480K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.483916004416include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0008413856{main}( ).../index.php:0
20.09574264304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09574264304Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.332011455360Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.333011479640Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.334111534968Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.334511562368require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.346311962000K2ControllerItem->execute( ).../k2.php:64
90.346311962000K2ControllerItem->display( ).../BaseController.php:710
100.360512612704K2ControllerItem->display( ).../item.php:78
110.360512612704K2ControllerItem->display( ).../controller.php:19
120.366812983744Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.369513004112K2ViewItem->display( ).../ViewController.php:102
140.479715831480K2ViewItem->display( ).../view.html.php:742
150.479715831480K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.483916004416include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.