pass_alter.sim 1.3 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2
system sh/deploy.sh -n dnode1 -i 1
S
scripts  
slguan 已提交
3
system sh/cfg.sh -n dnode1 -c wallevel -v 0
S
slguan 已提交
4
system sh/exec.sh -n dnode1 -s start
H
Haojun Liao 已提交
5
sleep 2000
S
slguan 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
sql connect

print ============= step1
sql create user read pass 'taosdata1'
sql create user write pass 'taosdata1'

sql alter user read pass 'taosdata'
sql alter user write pass 'taosdata'

sql show users
if $rows != 5 then 
  return -1
endi

print ============= step2
sql close
22 23
sleep 2500
print user read login
S
slguan 已提交
24 25 26 27 28 29
sql connect read
sql alter user read pass 'taosdata'
sql alter user write pass 'taosdata1' -x step2
  return -1
step2:

30 31 32 33 34 35 36
sql_error create user read pass 'taosdata1'
sql_error create user write pass 'taosdata1'

sql show users
if $rows != 5 then 
  return -1
endi
S
slguan 已提交
37 38 39

print ============= step3
sql close
40 41
sleep 2500
print user write login
S
slguan 已提交
42
sql connect write
43 44 45

sql_error create user read pass 'taosdata1'
sql_error create user write pass 'taosdata1'
S
slguan 已提交
46 47 48 49 50
sql alter user write pass 'taosdata'
sql alter user read pass 'taosdata' -x step3
  return -1
step3:

51 52 53 54 55
sql show users
if $rows != 5 then 
  return -1
endi

S
slguan 已提交
56 57
print ============= step4
sql close 
58 59
sleep 2500
print root write login
S
slguan 已提交
60 61
sql connect
sql create user oroot pass 'taosdata'
62

S
slguan 已提交
63 64 65 66
sql show users
if $rows != 6 then 
  return -1
endi
S
scripts  
slguan 已提交
67 68

system sh/exec.sh -n dnode1 -s stop -x SIGINT