banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Messages posted by: vitcon01  XML
Profile for vitcon01 Messages posted by vitcon01 [ number of posts not being displayed on this page: 0 ]
 
Tình hình là thế này, em có 2 con server(suppermicro) cài centos 6.4, và thực hiện triển khai 1 số dịch vụ như zimbra.

Sau đó em sử dụng drbd8.04 và pacemaker để thực hiện high availability vac backup nhưng khi chuyển node từ server 1 sang server 2 thì bị lỗi sau, toàn bộ hệ thống bị treo:


Anh chị nào đã có kinh nghiệm trong vấn đề này, xin giúp em!
location ~ ^/([a-z]+)/(.*)$ {
root /home/project/public;
rewrite ^/([a-z]+)/(.*)$ /index.php?p1=$1&p2=$2;

-Vấn đề ở dòng màu đỏ, nên chỉ định rewrite ở những khu vực cụ thể.
Thực hiện lệnh sau rồi đưa kết quả lên giúp:
ping mirrorlist.centos.org 
Của bạn đây!
https://github.com/wandenberg/nginx-push-stream-module
Có thể thông qua thằng này mà tự dev 1 tools clear caced khi update source code.
Bạn enabled module rewrite nginx, còn phần cấu hình rewrite đâu?
-Tại thời điểm vô chậm đó gõ lệnh sau rồi đưa kết quả lên xem sao:
Code:
ps -ef |grep httpd|wc -l

-Thiết lập firewall(IPTABLES) connection limit để hạn chết một số kỹ thuật tấn công.


IT0405 wrote:
Chào các bạn,

2. Lượng RAM trung bình một php script được thực thi ? Làm thế nào để tính ra được ?

Cám ơn các bạn đã tham gia topic. 

--->sử dụng pmap command để biết chi tiết 1 process php sử dụng bao nhiêu RAM.
Hi mọi người, em có vấn đề trong quá trinh lập trình Python như sau, mong mọi người giup đỡ.
Ví dụ em có chuỗi sau:

s = "anh yêu em nhiều lém"

Giờ em muốn chuyển chuỗi s trên sang không có dâu như sau:

"anh yeu em nhieu lem"

Thì làm thế nào, mong anh chị em ai biết giúp đỡ.

THank you!
Code:
tar -jvxf name.tar.bz2
cd name*
./configure
make
make install

--->phương pháp trên là tổng quan dành cho biên dịch phần mềm, phương pháp tốt nhất vẫn là "dùng thèn nào thi đọc hướng dẫn thèn đó"(README, INSTALL)...

duongqua_9x wrote:
muốn cài file đó thì cần phải cài đặt phần mềm nào không .và phải làm thế nào nữa xin hướng dẫn chi tiết thank 

--->không biết có phải bạn gõ nhầm không, bzz hay bz2 vậy bạn?
FIx luôn này xem sao:

Code:
/usr/libexec/mysqld: File '/var/log/mysql/mysql-slow.log' not found (Errcode: 13)
121014 10:06:59 [ERROR] Could not use /var/log/mysql/mysql-slow.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
121014 10:06:59 [ERROR] Unknown/unsupported storage engine: InnoDB
121014 10:06:59 [ERROR] Aborting

xuanphongdocco wrote:

vitcon01 wrote:
Em có 1 images OS gốc dành cho mỗi người dùng. Tuy nhiên trong quá trình người dùng làm việc, mỗi người sẽ thiết lập những giá trị setting trên OS của riêng mình riêng. Vậy em xin hỏi những anh chị có kinh nghiệm, làm thế nào có thể hiển thị những gì dã thay đổi trên hệ thống, để em backup nó lại sau đó trộn với images gốc, lần sau khi boot lên sẽ không cần thiết lập giá trị setting nữa.

Ví du: Images gốc sử dụng hình nền a.jpg có độ phân giải 800x600 cho mọi người dùng. Bạn người dùng A thiết lập lại giá trị destop của mình sử dụng hình nền b.jpg và có độ phân giải màn hình là 1024x768. Vậy làm sao em có thể backup những thay đổi của người A này để em trộn với images gốc, sau này khởi động thì người A này không phải thiết lập,... 


[Màu đỏ] OS ở đây cụ thể là hệ điều hành gì?
[màu xanh] Mình không hiểu ý bạn "trộn" ở đây là gì? Có phải là thay đổi nội dung của ảnh không? 

-OS ở đây mình muốn nói là windows
-trộn ở đây có nghĩa mình muốn merge những gì mà người A thay đổi với images OS gốc của mình
Em có 1 images OS gốc dành cho mỗi người dùng. Tuy nhiên trong quá trình người dùng làm việc, mỗi người sẽ thiết lập những giá trị setting trên OS của riêng mình riêng. Vậy em xin hỏi những anh chị có kinh nghiệm, làm thế nào có thể hiển thị những gì dã thay đổi trên hệ thống, để em backup nó lại sau đó trộn với images gốc, lần sau khi boot lên sẽ không cần thiết lập giá trị setting nữa.

Ví du: Images gốc sử dụng hình nền a.jpg có độ phân giải 800x600 cho mọi người dùng. Bạn người dùng A thiết lập lại giá trị destop của mình sử dụng hình nền b.jpg và có độ phân giải màn hình là 1024x768. Vậy làm sao em có thể backup những thay đổi của người A này để em trộn với images gốc, sau này khởi động thì người A này không phải thiết lập,...
-KIểm tra xem openssh có sử dụng banner không, nếu có thì chỉnh trong này /etc/motd
-Nếu không config sử dụng banner thì kiểm tra những file sau
+/etc/profile
+/etc/issue

tuanbona wrote:
Chào các bạn hvaonline, hiện tại mình đang rất đau đầu vấn đề bảo mật diễn đàn, mong được các bạn giúp đỡ. Trong tháng này mình bị 2 đợt tấn công vào diễn đàn, rất nguy kịch. Đợt thứ nhất http://diendan.tinmoitruong.vn/thac-mac-gop-y/258-forum-bi-loi.html
hacker chiếm luôn quyền admin, vào quản trị luôn dc csdl... thật may rằng bạn này chỉ có góp ý, ko phá hoại và mình đã khắc phục dc 1 lỗi bảo mật nghiêm trọng.
Đợt thứ 2 xảy ra chiều hôm nay, hacker chui vào dc khu chatbox, đăng 1 tin đã hack dc diễn đàn và chèn luôn 1 ảnh sex vào. May mà mình kịp phát hiện gỡ bỏ xuống chứ không để tới giờ thì chắc ... nghỉ việc luôn.
http://diendan.tinmoitruong.vn/thac-mac-gop-y/271-forum-loi-i-tui-m-lum.html
P/S: lỗi cả 2 lần này đều do người lập trình diễn đàn
Lần 1: anh ta để 1 thư mục để tiện cho việc quản lí up dữ liệu, vào quản lí mà không cần dùng password, khi bàn giao không nói nên chú hacker chui vào dc, may mà không phá hoại
Lần 2: anh ta để 1 chatbox tool để dể dàng quản lí các biểu tượng icon, kô hiểu sao hacker lại biết việc này, có dc pass và chèn hình sex vào. Mình ko hiểu tại sao hacker có dc pass.

Rất mong được sự giúp đỡ của anh em diễn đàn hvaonline. 


1. Nâng cấp diễn đàn lên 4.1.7, phiên bản diễn đàn hiện tại đang có bug SQL Injection.
2. Thay toàn bộ source cũ bằng source mới 4.1.7 luôn vì có khả năng source đã bị up shell.
3. KIểm tra xem có flugin hay module nào lạ không.
4. Thay đổi những gì mặc định của VBB đi.

TSC.Style wrote:
Tiện đường cho em hỏi. Nếu deny một IP bất kỳ. Sau khi reset router sẽ được một thằng IP mới tinh, vậy là hết deny @@ làm thế nào để chặn chính xác một đối tượng nào đó? 

---> thiết lập một rule sẵn, IP nào trúng rule đó thì deny.
Kiểm tra thử mấy gói này đã install chưa
gcc gcc-c++ kernel-devel
đưa log lên để xem đi bạn, gửi lại và đưa log liên quan đến nguwoif dùng mà bạn gửi.

quanta wrote:

vitcon01 wrote:
Vâng vấn đề đó em cũng đã thêm cho nó thông qua phpldapadmin 

Vậy giờ đã add được nobody vào chưa? 

Vâng khi sử dụng lệnh pdbedit -Lv nobody thì đã có thông tin người dùng nhưng kết quả vẫn như tiêu đề anh à.
Vâng vấn đề đó em cũng đã thêm cho nó thông qua phpldapadmin
Vâng, nó báo như vậy có nghĩa là đã tồn tại, tuy nhiên khi em pdbedit -Lv nobody thì lại không có, để chắn ăn em dùng lệnh pdbedit -x nobody tuy nhiên nó báo cũng ko tìm thấy user này.
Vâng, em đã đọc qua tdbsam dành chon những hệ thống nhỏ(dưới 250 người dùng) còn ldapsam danh cho nhữn hệ thống lớn và phức tạp.

Em dùng pdbedit -a nobody để thêm người dùng tuy nhiên nó báo :
Code:
smbldap_search_ext: base => [dc=langla,dc=net], filter => [(uid=nobody)], scope => [2]
ldapsam_add_sam_account: User exists without samba attributes: adding them
smbldap_make_mod: attribute |uid| not changed.
init_ldap_from_sam: Setting entry for user: nobody
smbldap_get_single_attribute: [displayName] = [<does not exist>]
smbldap_make_mod: adding attribute |displayName| value |Nobody|
Returning valid cache entry: key = ACCT_POL/maximum password age, value = 4294967295
, timeout = Thu May 10 20:13:32 2012
smbldap_get_single_attribute: [sambaLMPassword] = [<does not exist>]
smbldap_make_mod: adding attribute |sambaLMPassword| value |AAD3B435B51404EEAAD3B435B51404EE|
smbldap_get_single_attribute: [sambaNTPassword] = [<does not exist>]
smbldap_make_mod: adding attribute |sambaNTPassword| value |31D6CFE0D16AE931B73C59D7E0C089C0|
Returning valid cache entry: key = ACCT_POL/password history, value = 0
, timeout = Thu May 10 20:14:12 2012
smbldap_get_single_attribute: [sambaPasswordHistory] = [<does not exist>]
smbldap_make_mod: adding attribute |sambaPasswordHistory| value |0000000000000000000000000000000000000000000000000000000000000000|
smbldap_get_single_attribute: [sambaPwdLastSet] = [<does not exist>]
smbldap_make_mod: adding attribute |sambaPwdLastSet| value |1336655596|
smbldap_get_single_attribute: [sambaAcctFlags] = [<does not exist>]
smbldap_make_mod: adding attribute |sambaAcctFlags| value |[U ]|
smbldap_modify: dn => [uid=nobody,ou=People,dc=langla,dc=net]
Failed to modify dn: uid=nobody,ou=People,dc=langla,dc=net, error: 65 (Object class violation) (object class 'sambaSamAccount' requires attribute 'sambaSID')
ldapsam_add_sam_account: failed to modify/add user with uid = nobody (dn = uid=nobody,ou=People,dc=langla,dc=net)
Unable to add user! (does it already exist?)


Khi đó em dùng phpldapadmin để thêm thuộc tính sambaaccount cho nó, sau đó thực hiện lệnh pdbedit -Lv nobody thì nó thông báo như sau:
Code:
Unix username: nobody
NT username: nobody
Account Flags: [U ]
User SID: S-1-5-21-2826943894-2740492331-631777304-501
Finding user nobody
Trying _Get_Pwnam(), username as lowercase is nobody
Get_Pwnam_internals did find user [nobody]!
smbldap_search_ext: base => [ou=Groups,dc=langla,dc=net], filter => [(&(objectClass=sambaGroupMapping)(gidNumber=99))], scope => [2]
Failed search for base: ou=Groups,dc=langla,dc=net, error: 32 (No such object) ()
Primary Group SID: S-1-5-21-2826943894-2740492331-631777304-513
Full Name: Nobody
Home Directory: \\myserver\nobody
HomeDir Drive:
Logon Script: %u.bat
Profile Path: \\myserver\Profiles\%u
Domain: LANGLA.NET
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time: never
Kickoff time: never
Password last set: 0
Password can change: 0
Password must change: 0
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF


Sau đó em restart smb thì tình trạng như cũ, vẫn không thấy mở port 139 hay 445(chưua start).
-Default nó sử dụng người dùng nobody
-Vân chính xác là nó chưa start được
-EM đã comment dòng guest account để nó default
-Nó không lắng nghe port nào hết anh

- EM cũng đã thử lệnh này pdbedit -x nobody và thông điệp phía dưới:
Code:
Attempting to find an passdb backend to match ldapsam:ldap://localhost (ldapsam)
Found pdb backend ldapsam
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=LANGLA.NET))]
smbldap_search_ext: base => [dc=langla,dc=net], filter => [(&(objectClass=sambaDomain)(sambaDomainName=LANGLA.NET))], scope => [2]
The connection to the LDAP server was closed
smbldap_open_connection: connection opened
ldap_connect_system: successful connection to the LDAP server
The LDAP server is successfully connected
pdb backend ldapsam:ldap://localhost has a valid init
Netbios name list:-
my_netbios_names[0]="MYSERVER"
Attempting to find an passdb backend to match ldapsam:ldap://localhost (ldapsam)
Found pdb backend ldapsam
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=LANGLA.NET))]
smbldap_search_ext: base => [dc=langla,dc=net], filter => [(&(objectClass=sambaDomain)(sambaDomainName=LANGLA.NET))], scope => [2]
The connection to the LDAP server was closed
smbldap_open_connection: connection opened
ldap_connect_system: successful connection to the LDAP server
The LDAP server is successfully connected
pdb backend ldapsam:ldap://localhost has a valid init
smbldap_search_ext: base => [dc=langla,dc=net], filter => [(&(uid=nobody)(objectclass=sambaSamAccount))], scope => [2]
ldapsam_getsampwnam: Unable to locate user [nobody] count=0
user nobody does not exist in the passdb

--->tuy nhiên em sử dụng phpldapadmin để kiểm tra thì nó tồn tại group nobody và user nobody, đây là nội dung file ldif của em:
Code:
dn: cn=nobody,ou=Group,dc=langla,dc=net
objectClass: posixGroup
objectClass: top
cn: nobody
userPassword: {crypt}x
gidNumber: 99
dn: uid=nobody,ou=People,dc=langla,dc=net
uid: nobody
cn: Nobody
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}*
shadowLastChange: 15469
shadowMax: 99999
shadowWarning: 7
loginShell: /sbin/nologin
uidNumber: 99
gidNumber: 99
homeDirectory: /
gecos: Nobody

-EM đã cóa, nhưng vấn đề ở chỗ dù nó ok nhưng nó cũng không open port 139, 445.
Em đang muốn config Samba+LDAP như một PDC.
-OS:Centos 5.5
-Openldap:
Code:
+openldap-2.3.43-12.el5
+openldap-devel-2.3.43-12.el5
+openldap-servers-2.3.43-12.el5
+openldap-clients-2.3.43-12.el5

-Sampa
Code:
+samba-3.0.33-3.28.el5
+samba-common-3.0.33-3.28.el5
+samba-client-3.0.33-3.28.el5

-File slapd.conf

Code:
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
logfile /var/log/openldap
loglevel -1
database bdb
suffix "dc=langla,dc=net"
rootdn "cn=admin,dc=langla,dc=net"
rootpw {SSHA}87Bdd4ic1Rjr5543Tll16wYUXN/YXdlY
directory /var/lib/ldap
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
index default sub
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
access to attrs=userPassword,sambaLMPassword,sambaNTPassword
by self write
by anonymous auth
by * none
access to *
by * read


-File smb.conf
Code:
[global]
workgroup = langla.net
server string = Samba Server Version %v
netbios name = MYSERVER
enable privileges = yes
encrypt passwords = Yes
log level= 9
guest account = root
# logs split per machine
# max 50KB per log file, then rotate
security = user
local master = yes
preferred master = yes
passdb backend = ldapsam:ldap://localhost
ldap suffix = dc=langla,dc=net
ldap user suffix = ou=People
ldap group suffix = ou=Groups
ldap machine suffix = ou=Hosts
ldap idmap suffix = ou=Idmap
ldap admin dn = cn=admin,dc=langla,dc=net
domain master = yes
domain logons = yes
# the login script name depends on the machine name
logon script = %m.bat
# the login script name depends on the unix user used
logon script = %u.bat
logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
wins support = yes
[homes]
comment = Home Directories
browseable = no
writable = yes
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes
writable = no
share modes = no
[Profiles]
path = /var/lib/samba/profiles
browseable = no
guest ok = yes


-Vấn đề là khi em tiến hành restart smbd thì stop nó bị fail và kiểm tra PID thì nó báo
Code:
smbd dead but pid file exists

-Xem log samba thì nó báo
Code:
ERROR: failed to setup guest info.


ANh chị nào từng gặp trường hợp này xin hướng dẫn giúp.
$1 là địa diện cho một nhóm (.*)

Em cảm ơn anh.
Vâng đúng là không có biến nào của nginx $1 nên em đã dùng $request_uri để thay thế cho nó. Tuy nhiên kết quả nhận được vẫn là 404 not found.
if ($request_filename !~ "index.php") {
rewrite /(.*).php$ /index.php/$1;
}

if ($request_uri !~ "^(index\.php|nhototamsu|assets|cache|xd_receiver\.html|photo|ipanel|automap|xajax_js|files|robots\.txt|favicon\.ico|ione\.ico|(.*)\.xml|ror\.xml|tool|google6afb981101589049\.html|googlec0d38cf2adbc25bc\.html|widget|iradio_admin|services|wsdl)") {
rewrite ^/(.*)$ /index.php/$1 last;
OK em đã convert như sau:
if ($request_filename !~ "index.php"){
rewrite /(.*).php$ /index.php/$1;
}
if ($1 !~ "^(index.php|nhototamsu|assets|cache|xd_receiver.html|photo|ipanel|automap|xajax_js|files|robots.txt|favicon.ico|ione.ico|(.*).xml|ror.xml|tool|google6afb981101589049.html|googlec0d38cf2adbc25bc.html|widget|iradio_admin|services|wsdl)"){
rewrite ^/(.*)$ /index.php/$1 last;


Nhưng khi restart nginx nó báo lỗi:
nginx: [emerg] unknown "1" variable 

quanta wrote:
Dòng 3: $1 nghĩa là gì vậy?
Dòng 4: em thấy khó ở chỗ nào? 


Vâng dòng 4 em có thể chuyển được. Còn $1 em nghĩ nó cũng giống như trong lập trình bash shell là giá trị mà mình truyển vào.
 
Go to Page:  2 3 4 Page 5 Last Page

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|