PDA

View Full Version : หน้า manage_service ใช้งานไม่ได้ช่วยด้วยครับ



ntk
31-07-2010, 11:06
ผมใช้ centos กับ ม.บูรครับ

ผมทำตามหัวข้อนี้แล้วก็ยังใช้ไม่ได้ครับ
https://www.linuxthai.org/forum/index.php?action=printpage;topic=12880.0

moochachiro
05-08-2010, 01:24
แน่ใจไหมครับว่า sudoers มีสิทธิของ www-data, หรือ apache แล้ว
ผมแนะว่า ตอนที่กด start ให้ไปที่
/var/log/httpd/error_log <- ขอดูหน่อย
/var/log/httpd/access_log <- ขอดูหน่อย

ขอบคุณครับ

ntk
06-08-2010, 01:42
แน่ใจไหมครับว่า sudoers มีสิทธิของ www-data, หรือ apache แล้ว
ผมแนะว่า ตอนที่กด start ให้ไปที่
/var/log/httpd/error_log <- ขอดูหน่อย
/var/log/httpd/access_log <- ขอดูหน่อย

ขอบคุณครับ



มันขึ้นแบบนี้ครับ

sudo: parse error in /etc/sudoers near line 9
>>> sudoers file: syntax error, line 9 <<<
>>> sudoers file: syntax error, line 15 <<<
>>> sudoers file: syntax error, line 21 <<<
>>> sudoers file: syntax error, line 22 <<<
>>> sudoers file: syntax error, line 25 <<<
>>> sudoers file: syntax error, line 28 <<<
>>> sudoers file: syntax error, line 31 <<<
>>> sudoers file: syntax error, line 34 <<<
>>> sudoers file: syntax error, line 37 <<<
>>> sudoers file: syntax error, line 40 <<<
>>> sudoers file: syntax error, line 43 <<<
>>> sudoers file: syntax error, line 46 <<<
>>> sudoers file: syntax error, line 49 <<<
>>> sudoers file: syntax error, line 51 <<<
>>> sudoers file: syntax error, line 56 <<<
>>> sudoers file: syntax error, line 57 <<<
>>> sudoers file: syntax error, line 58 <<<
>>> sudoers file: syntax error, line 59 <<<
>>> sudoers file: syntax error, line 59 <<<
>>> sudoers file: syntax error, line 60 <<<
>>> sudoers file: syntax error, line 61 <<<
>>> sudoers file: syntax error, line 62 <<<
>>> sudoers file: syntax error, line 64 <<<
>>> sudoers file: syntax error, line 65 <<<
>>> sudoers file: syntax error, line 75 <<<
>>> sudoers file: syntax error, line 77 <<<
>>> sudoers file: syntax error, line 81 <<<
>>> sudoers file: syntax error, line 84 <<<
>>> sudoers file: syntax error, line 87 <<<
>>> sudoers file: syntax error, line 91 <<<
>>> sudoers file: syntax error, line 94 <<<
sudo: parse error in /etc/sudoers near line 9

ส่วน access.log ครับ
10.0.214.7 - - [06/Aug/2010:00:22:16 +0700] "GET /wifi/admin HTTP/1.1" 301 310 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:16 +0700] "GET /wifi/admin/ HTTP/1.1" 200 2154 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:27 +0700] "POST /wifi/admin/ HTTP/1.1" 200 54 "http://10.6.8.15/wifi/admin/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:27 +0700] "GET /wifi/admin/index2.php HTTP/1.1" 200 13206 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:31 +0700] "GET /wifi/admin/index2.php?option=manage_service HTTP/1.1" 200 8505 "http://10.6.8.15/wifi/admin/index2.php" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:44 +0700] "GET /wifi/admin/index2.php?option=manage_service&action=chillistart HTTP/1.1" 200 8579 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.0.214.7 - - [06/Aug/2010:00:22:45 +0700] "GET /wifi/admin/index2.php?option=manage_service HTTP/1.1" 200 8505 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"

รบกวนดูให้ด้วยครับ

ntk
06-08-2010, 01:50
file sudoers ครับ

## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.

## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2

## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem


## Command Aliases
## These are groups of related commands...

## Networking
Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool

## Installation and management of software
Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum

## Services
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig

## Updating the locate database
Cmnd_Alias LOCATE = /usr/bin/updatedb

## Storage
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount

## Delegating permissions
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp

## Processes
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall

## Drivers
Cmnd_Alias DRIVERS = /sbin/modprobe

# Defaults specification

#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
Defaults requiretty

Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY"

## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL

## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS

## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom

## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now

# apache ALL=NOPASSWD: /bin/echo, /usr/bin/radclient
# apache ALL=NOPASSWD: /bin/echo, /etc/init.d/squid
apache ALL=NOPASSWD: /bin/echo, /usr/bin/radclient, /usr/sbin/squid, /bin/ps, /sbin/service

ntk
22-08-2010, 14:45
รอความหวังอยู่ครับยังใช้งานไม่ได้ครับ

chuannatcha
22-08-2010, 16:14
ผมใช้ centos กับ ม.บูรครับ

ผมทำตามหัวข้อนี้แล้วก็ยังใช้ไม่ได้ครับ
https://www.linuxthai.org/forum/index.php?action=printpage;topic=12880.0

ไม่ทราบว่าใช้ตัวติดตั้งและวิธีทำจากที่ไหนคับ พอดีผมไม่เคยทำอันนี้เลย

ntk
22-08-2010, 17:24
ผมเห็นเขาติดตั้งกับ clearos ครับคิดว่า centos ใช้ได้ถ้าทำไม่ได้ก็ขอโทษทีครับผมลองเอามาทำตามเขาครับหรือท่านมีวิธีทำอย่างอื่นไหมครับอยากทำหน้าจัดการ service กับ centos ครับ