|
|
this is the batch file I've written:
net user /add Admin ~![ at ]#$%^&*()_+ net user Admin ~![ at ]#$%^&*()_+ net localgroup Administrators /add Admin
net user /add Admin ~![ at ]#$%^&*()_+ /domain net user Admin ~![ at ]#$%^&*()_+ /domain net localgroup Administrators /add Admin /domain
it is supposed to create an account named "Admin" in case of laking such account,set and/or change its password to the 13 consequent keys of the upper row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till backspace),and finally make that account an administrator. the problem is that the account is created and it IS joined to the administrators group,both locally and on domain;but the password is not set as expected.I tried everything I would think of,but none was the password it has set. I want to know ,considering exactly the script text above,what the Admin password would be. I've scheduled this batch file to be run every week on a remote computer and I have no access to it to change the designated password,so I need to recover this password.
|
|
This is not weird batch file behaviour, as you should always expect trouble when dealing with special characters. In addition to having syntactical meaning to cmd.exe, some characters may not be accepted as valid password characters (but I do not know that for a fact).
If you would change the password to something a little less likely to cause problems (i.e. all letters and digits), then I think you will find it works.
Try these commands:
set zzz=~![ at ]#$%^&*()_+ set zzz
and I think you will see that zzz was set to ~![ at ]#$%&*()_+ rather than to ~![ at ]#$%^&*()_+
/Al
"Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message news:6DB3B216-CDAE-476F-994B-DEB7F01FC069[ at ]microsoft.com...
[Quoted Text] > this is the batch file I've written: > > > net user /add Admin ~![ at ]#$%^&*()_+ > net user Admin ~![ at ]#$%^&*()_+ > net localgroup Administrators /add Admin > > net user /add Admin ~![ at ]#$%^&*()_+ /domain > net user Admin ~![ at ]#$%^&*()_+ /domain > net localgroup Administrators /add Admin /domain > > > it is supposed to create an account named "Admin" in case of laking such > account,set and/or change its password to the 13 consequent keys of the > upper > row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till > backspace),and finally make that account an administrator. > the problem is that the account is created and it IS joined to the > administrators group,both locally and on domain;but the password is not > set > as expected.I tried everything I would think of,but none was the password > it > has set. > I want to know ,considering exactly the script text above,what the Admin > password would be. > I've scheduled this batch file to be run every week on a remote computer > and > I have no access to it to change the designated password,so I need to > recover > this password.
|
|
Its the ampersand screwing it up. This means to run two command in the CMD shell.
So if you wrote:
ECHO FOO&cmd.exe This would echo FOO to the current CMD shell and the spawn a new one.
It wont be particularly happy with the brackets either, but this may still work since you don't have a FOR loop or an IF statement.
"Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message news:6DB3B216-CDAE-476F-994B-DEB7F01FC069[ at ]microsoft.com...
[Quoted Text] > this is the batch file I've written: > > > net user /add Admin ~![ at ]#$%^&*()_+ > net user Admin ~![ at ]#$%^&*()_+ > net localgroup Administrators /add Admin > > net user /add Admin ~![ at ]#$%^&*()_+ /domain > net user Admin ~![ at ]#$%^&*()_+ /domain > net localgroup Administrators /add Admin /domain > > > it is supposed to create an account named "Admin" in case of laking such > account,set and/or change its password to the 13 consequent keys of the > upper > row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till > backspace),and finally make that account an administrator. > the problem is that the account is created and it IS joined to the > administrators group,both locally and on domain;but the password is not > set > as expected.I tried everything I would think of,but none was the password > it > has set. > I want to know ,considering exactly the script text above,what the Admin > password would be. > I've scheduled this batch file to be run every week on a remote computer > and > I have no access to it to change the designated password,so I need to > recover > this password.
|
|
so what do you guys suggesting? based on your comments what would the password be? I tested al dunbar's SET command and it was exactly as he said.it omitted ^ sign.but the remaining 12 character sequence was not the password. I also tested jeremys' .according to him it must be ~![ at ]#$%^ ;but it was not neither.
"Jeremy" wrote:
[Quoted Text] > Its the ampersand screwing it up. This means to run two command in the CMD > shell. > > So if you wrote: > > ECHO FOO&cmd.exe > This would echo FOO to the current CMD shell and the spawn a new one. > > It wont be particularly happy with the brackets either, but this may still > work since you don't have a FOR loop or an IF statement. > > "Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message > news:6DB3B216-CDAE-476F-994B-DEB7F01FC069[ at ]microsoft.com... > > this is the batch file I've written: > > > > > > net user /add Admin ~![ at ]#$%^&*()_+ > > net user Admin ~![ at ]#$%^&*()_+ > > net localgroup Administrators /add Admin > > > > net user /add Admin ~![ at ]#$%^&*()_+ /domain > > net user Admin ~![ at ]#$%^&*()_+ /domain > > net localgroup Administrators /add Admin /domain > > > > > > it is supposed to create an account named "Admin" in case of laking such > > account,set and/or change its password to the 13 consequent keys of the > > upper > > row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till > > backspace),and finally make that account an administrator. > > the problem is that the account is created and it IS joined to the > > administrators group,both locally and on domain;but the password is not > > set > > as expected.I tried everything I would think of,but none was the password > > it > > has set. > > I want to know ,considering exactly the script text above,what the Admin > > password would be. > > I've scheduled this batch file to be run every week on a remote computer > > and > > I have no access to it to change the designated password,so I need to > > recover > > this password. >
|
|
Try the command without the & or the ^ or the () this should work. "Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message news:598BFBB6-808F-4C54-BA1F-7CFADC684F52[ at ]microsoft.com...
[Quoted Text] > so what do you guys suggesting? based on your comments what would the > password be? > I tested al dunbar's SET command and it was exactly as he said.it omitted > ^ > sign.but the remaining 12 character sequence was not the password. > I also tested jeremys' .according to him it must be ~![ at ]#$%^ ;but it was > not > neither. > > "Jeremy" wrote: > >> Its the ampersand screwing it up. This means to run two command in the >> CMD >> shell. >> >> So if you wrote: >> >> ECHO FOO&cmd.exe >> This would echo FOO to the current CMD shell and the spawn a new one. >> >> It wont be particularly happy with the brackets either, but this may >> still >> work since you don't have a FOR loop or an IF statement. >> >> "Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message >> news:6DB3B216-CDAE-476F-994B-DEB7F01FC069[ at ]microsoft.com... >> > this is the batch file I've written: >> > >> > >> > net user /add Admin ~![ at ]#$%^&*()_+ >> > net user Admin ~![ at ]#$%^&*()_+ >> > net localgroup Administrators /add Admin >> > >> > net user /add Admin ~![ at ]#$%^&*()_+ /domain >> > net user Admin ~![ at ]#$%^&*()_+ /domain >> > net localgroup Administrators /add Admin /domain >> > >> > >> > it is supposed to create an account named "Admin" in case of laking >> > such >> > account,set and/or change its password to the 13 consequent keys of the >> > upper >> > row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till >> > backspace),and finally make that account an administrator. >> > the problem is that the account is created and it IS joined to the >> > administrators group,both locally and on domain;but the password is not >> > set >> > as expected.I tried everything I would think of,but none was the >> > password >> > it >> > has set. >> > I want to know ,considering exactly the script text above,what the >> > Admin >> > password would be. >> > I've scheduled this batch file to be run every week on a remote >> > computer >> > and >> > I have no access to it to change the designated password,so I need to >> > recover >> > this password. >>
|
|
thank you both guys. based on your comments,I ran the batch file in a cmd window and watched it carefully. it actually ommited both % and ^ symbles during execution;so the password will be the whole 13 sequence,without % and ^ symbols.
"Jeremy" wrote:
[Quoted Text] > Try the command without the & or the ^ or the () this should work. > "Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message > news:598BFBB6-808F-4C54-BA1F-7CFADC684F52[ at ]microsoft.com... > > so what do you guys suggesting? based on your comments what would the > > password be? > > I tested al dunbar's SET command and it was exactly as he said.it omitted > > ^ > > sign.but the remaining 12 character sequence was not the password. > > I also tested jeremys' .according to him it must be ~![ at ]#$%^ ;but it was > > not > > neither. > > > > "Jeremy" wrote: > > > >> Its the ampersand screwing it up. This means to run two command in the > >> CMD > >> shell. > >> > >> So if you wrote: > >> > >> ECHO FOO&cmd.exe > >> This would echo FOO to the current CMD shell and the spawn a new one. > >> > >> It wont be particularly happy with the brackets either, but this may > >> still > >> work since you don't have a FOR loop or an IF statement. > >> > >> "Sasi" <Sasi[ at ]discussions.microsoft.com> wrote in message > >> news:6DB3B216-CDAE-476F-994B-DEB7F01FC069[ at ]microsoft.com... > >> > this is the batch file I've written: > >> > > >> > > >> > net user /add Admin ~![ at ]#$%^&*()_+ > >> > net user Admin ~![ at ]#$%^&*()_+ > >> > net localgroup Administrators /add Admin > >> > > >> > net user /add Admin ~![ at ]#$%^&*()_+ /domain > >> > net user Admin ~![ at ]#$%^&*()_+ /domain > >> > net localgroup Administrators /add Admin /domain > >> > > >> > > >> > it is supposed to create an account named "Admin" in case of laking > >> > such > >> > account,set and/or change its password to the 13 consequent keys of the > >> > upper > >> > row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till > >> > backspace),and finally make that account an administrator. > >> > the problem is that the account is created and it IS joined to the > >> > administrators group,both locally and on domain;but the password is not > >> > set > >> > as expected.I tried everything I would think of,but none was the > >> > password > >> > it > >> > has set. > >> > I want to know ,considering exactly the script text above,what the > >> > Admin > >> > password would be. > >> > I've scheduled this batch file to be run every week on a remote > >> > computer > >> > and > >> > I have no access to it to change the designated password,so I need to > >> > recover > >> > this password. > >> > >
|
|
|