File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 11#! /mnt/secure/su /bin/sh
2- export TZ=
3- nopw=" password=(keep unchanged)"
4- if [ ! -e /mnt/secure/etc/passwd ] || [ -n " $( find -L /mnt/ext1/rootpassword.txt -prune -newer /mnt/secure/etc/passwd) " ]; then
5- if [ ! -e /mnt/ext1/rootpassword.txt ] || [ " $( cat /mnt/ext1/rootpassword.txt) " == " $nopw " ]; then
6- echo " password=$RANDOM " > /mnt/ext1/rootpassword.txt
7- fi
8- . /mnt/ext1/rootpassword.txt
9- echo -n $password > /mnt/secure/etc/passwd
2+ if [ -e /mnt/ext1/rootpassword.txt ]; then
3+ password=" $( cut -c 10- < /mnt/ext1/rootpassword.txt) "
4+ if [ " $password " == " (keep unchanged)" ]; then
5+ if [ -e /mnt/secure/etc/passwd ]; then
6+ exit 0
7+ fi
8+ password=$RANDOM
9+ echo " password=$password " > /mnt/ext1/rootpassword.txt
10+ fi
11+ echo -n " $password " > /mnt/secure/etc/passwd
1012fi
13+
1114suff=" :[U ]:LCT-00000001:"
1215pw=" $( cat /mnt/secure/etc/passwd) "
1316(echo " root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:" $( ntlmhash " $pw " ) " $suff " ; echo " reader:100:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:" $( ntlmhash " " ) " $suff " ) > /mnt/secure/etc/samba/smbpasswd
You can’t perform that action at this time.
0 commit comments