Oracle MOS wget.sh fails with”Missing token”
August 29, 2026 Leave a comment
While downloading Oracle patches from the new My Oracle Support interface, I generated the wget.sh download script and copied it to the server.
When I tried to run it:
./wget.sh
the download failed immediately with:
INFO: Output dir not specified, defaulting to current directory.
ERROR: Missing token. Provide -t <token> OR -T <token_file>.
The Problem
The generated wget.sh script now expects an Oracle Support download token.
The confusing part is that the patch download page itself may not show an obvious option to generate this token.
The script supports two ways of providing it:
-t <token>
or:
-T <token_file>
Using a token file is preferable because the token does not get stored directly in the shell command history.
Generate the Oracle Support Download Token
First, log in to My Oracle Support in your browser. While the authenticated MOS session is still active, open the Oracle token-generation endpoint: https://updates.oracle.com/Orion/GenToken/get_token
Save the token on the server:
vi /u01/install/patches/mos_token.txt
Paste the generated token into the file as a single line.
Set restrictive permissions:
chmod 600 mos_token.txt
Run wget.sh With the Token
Tun wget with token:
./wget.sh -T /u01/install/patches/mos_token.txt
The download should now start normally.
Alternative: Pass the Token Directly
The script also allows passing the token directly:
./wget2.sh -t '<token>'
However, I prefer using:
-T <token_file>
because putting the token directly on the command line can expose it through shell history or process information.
Remove the Token After the Download
Once the required patches are downloaded, remove the temporary token file:
rm -f /u01/install/patches/mos_token.txt