SUDO


[root@nisp ~]# rpm -aq | grep sudo
sudo-1.7.4p5-7.el6.x86_64

[root@IF031 ~]# yum install sudo

Misal: user support di set agar bisa stop, start, restart service mysql & apache

[root@IF031 ~]# useradd support

[root@IF031 ~]# passwd support
Changing password for user support.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.

[root@IF031 ~]# visudo

#Tambahkan baris ini

User_Alias USR_APACHE_MYSQL=support

Cmnd_Alias CMD_APACHE_MYSQL=/etc/init.d/mysqld start, /etc/init.d/mysqld stop, /etc/init.d/mysqld restart , /etc/init.d/httpd start, /etc/init.d/httpd stop, /etc/init.d/httpd restart

USR_APACHE_MYSQL ALL = CMD_APACHE_MYSQL

save -> wq!

[root@IF031 ~]# su – support

[support@IF031 ~]$ sudo /etc/init.d/mysqld start

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for support: -> masukkan password support
Starting mysqld: [ OK ]
[support@IF031 ~]$
[support@IF031 ~]$ sudo /etc/init.d/mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[support@IF031 ~]$
[support@IF031 ~]$ sudo /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for IF031
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: