pass_alter.sim 2.0 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2
system sh/deploy.sh -n dnode1 -i 1
S
slguan 已提交
3 4
system sh/cfg.sh -n dnode1 -c clog -v 0
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

sql connect
sleep 3000

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 accounts
if $rows != 1 then 
  return -1
endi
sql show users
if $rows != 5 then 
  return -1
endi

print ============= step2
sql close
sql connect read
sleep 2000
sql alter user read pass 'taosdata'
sql alter user write pass 'taosdata1' -x step2
  return -1
step2:


print ============= step3
sql close
sql connect write
sleep 2000
sql alter user write pass 'taosdata'
sql alter user read pass 'taosdata' -x step3
  return -1
step3:

print ============= step4
sql close 
S
scripts  
slguan 已提交
46
sleep 1000
S
slguan 已提交
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
sql connect
sleep 2000
sql create account oroot pass 'taosdata'
sql show accounts
if $rows != 2 then 
  return -1
endi
sql show users
if $rows != 5 then 
  return -1
endi

print ============= step5
sql close
sql connect oroot
sleep 2000

sql create user oread pass 'taosdata1'
sql create user owrite pass 'taosdata1'
sql alter user oread pass 'taosdata'
sql alter user owrite pass 'taosdata'

sql create user read pass 'taosdata1' -x step51
  return -1
step51:
sql alter user read pass 'taosdata1' -x step52
  return -1
step52:

sql show accounts -x step53
  return -1
step53:
sql show users
print show users $rows
if $rows != 4 then 
  return -1
endi

print ============= step6
sql close
sql connect oread
sleep 2000
sql alter user oread pass 'taosdata'
sql alter user owrite pass 'taosdata1' -x step6
  return -1
step6:


print ============= step7
sql close
sql connect owrite
sleep 2000
sql alter user owrite pass 'taosdata'
sql alter user oread pass 'taosdata' -x step7
  return -1
step7:

print ============= step8
sql close
sql connect
sleep 2000
sql alter user oread pass 'taosdata'
sql alter user owrite pass 'taosdata'
sql alter user oroot pass 'taosdata'

sql drop account oroot
sql drop user read
sql drop user write