Category Archives: SUDO

getacl, setacl


[root@server211 ~]# vim /etc/fstab

Sebelum
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

Sesudah

/dev/VolGroup00/LogVol00 / ext3 defaults,acl 1 1

[root@server211 ~]# mount -o remount /

[root@server211 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,acl)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

[root@server211 pelpel]# passwd pelpel
Changing password for user pelpel.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

[root@server211 pelpel]# setfacl -m u:pelpel:rwx /var/www/html/crmpp/oci_connect.php
[root@server211 crmpp]# getfacl /var/www/html/crmpp/oci_connect.php
getfacl: Removing leading ‘/’ from absolute path names
# file: var/www/html/crmpp/oci_connect.php
# owner: root
# group: root
user::rw-
user:crmpp:rwx
group::r–
mask::rwx
other::r–

Advertisements

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 ]

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: