wget  issue - Systems Maintenance(Archived)

Is there any way you can download the Solaris10_recommended using wget from a terminal. I am trying to update a remote host using ssh to pull off the last solaris10_recommended file. I can download the 1Gb+ file locally if I visisted the host,and then FTP on the local network, but I would prefer to do this remotely. Obviously I need to update via single user, but would be interested if I can initially update using wget (or any other tool) from the shell/temrinal, thanks in advance 

Hi,
You can use wget to automate the download of the recommended patch cluster in much the same way as you can use it to automate the download of a patch.
The syntax to use is:
wget no-check-certificate http-user="<SOA_USERNAME>" --http-passwd="<SOA_PASSWD>" "http://sunsolve.sun.com/pdownload.do?target=10_Recommended&method=h" -O /tmp/10_Recommended.zip
Where
SOA_USERNAME/SOA_PASSWD are your Sun Online Account username & password.
/tmp/10_Recommended.zip is the location you wish to download the patch cluster to.
Notes:
1) The above example is for wget version 1.10.2. If you are using wget version 1.11.x (or later) the "--auth-no-challenge" option must be used. Further info on using wget to download from SunSolve is available at http://sunsolve.sun.com/search/document.do?assetkey=1-9-240066-1.
2) You must have a valid support contract in order to download the Solaris 10 Recommended Patch Cluster. 

Many thanks for this, regards
carrera26 

thanks for the wget line! it seems this is the right one.
Unfortunately, it first links to an "agreement" page : do you know how i could automate the "accept" on that one?
(ie, a first wget, "some way to accept the agreement", and then a second wget to retrieve the actual file...)
Thanks a lot in advance (I try to do it myself, but as to now i couldn't figure out how to "accept") 

I am also experiencing problems with accepting the license agreement. I tired going to the patch description in a browser so that I had the "accept" in my cookies file for the browser, and then referring to the cookies file when running wget (--load-cookies file), but still nothing. The wget stops at the license agreement. How does one get past that?
Thanks,
-Mark 

I use the following bash function:
getpatch ()
{
    /usr/sfw/bin/wget -c --user=${1} --password=${2} --no-check-certificate http://sunsolve.sun.com/pdownload.do?target=${3}\&method=h
}Which allows me to do things like:
# getpatch [username] [password] [what I want from sunsolve]
# getpatch [username] [password] 10_Recommended.zip
# getpatch [username] [password] 8_SunAlert_Patch_Cluster.zip
# getpatch [username] [password] 123456
# getpatch [username] [password] 123456-13So that function allows you to easily grab R&S clusters, Sun Alert clusters, the latest rev of a patch or any specific rev of a patch.
If you need a proxy:
getpatch ()
{
    http_proxy=proxy.foo.com:8080 /usr/sfw/bin/wget -c --user=${1} --password=${2} --no-check-certificate http://sunsolve.sun.com/pdownload.do?target=${3}\&method=h
}Cheers,
Mark 

I have tried just manually running wget from the command line with the same options you outline below, but I get the same results: a file with the HTML code for the license accept screen in it. I can't seem to get past that step. I am using wget version 1.11, which is very recent, so I don't believe that is the issue. So I am at a loss. Why does it work for you, but the exact same expression fails for me? There is something going on underneath the covers that we are missing here and that something is causing my session to be intercepted and redirected to the license screen.
Thanks,
-Mark 

You need a Sun Online account, and you need to manually accept the license via a browser. Then you'll be able to use wget. 

I have a Sun Online account, and have had it for more than a decade. I have accepted the license many, many times. In fact, I am forced to accept it every time I access the page. But if I accept the page with my browser, how does wget "know" that without reading the browser's cookies, unless the "accept" is stored at the servers side, not in the cookie file? I have tried pointing wget at my browser's cookie file with the "--load-cookies" argument, but that didn't help. Is there something wrong with my account? Should I need to accept only once and the Sun Online system remembers that forever after that?
Thanks,
-Mark 

Hello,
I have a problem while trying to download the patches using wget. I don't have any zip after download, I only have a file with 0 lenght. Can anyone help me?
I have a paid account, for being able to download patches, I can download them with Firefox, from a Windows machine. I want to download them from a linux server, with wget.
The error I get is:
--07:58:37-- http://sunsolve.sun.com/pdownload.pl?target=10_x86_Recommended&method=h
Resolving sunsolve.sun.com... 192.18.108.40
Connecting to sunsolve.sun.com|192.18.108.40|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://sunsolve.sun.com/pdownload.do?target=10_x86_Recommended&method=h [following]
--07:58:37-- http://sunsolve.sun.com/pdownload.do?target=10_x86_Recommended&method=h
Reusing existing connection to sunsolve.sun.com:80.
HTTP request sent, awaiting response... 404 Not Found
07:58:43 ERROR 404: Not Found.
Edited by: stofarius on Nov 11, 2009 5:49 AM 

I tried like this:
wget no-check-certificate http-user="<SOA_USERNAME>" --http-passwd="<SOA_PASSWD>" "http://sunsolve.sun.com/pdownload.do?target=10_Recommended&method=h" -O /tmp/10_Recommended.zip
and I replaced with my user and password but it didn't worked. Can someone help me please?
Thank you in advance! 

If you are willing to download patches by themselves (as opposite to the recommended package) I would suggest to use pca and let it figure out which patches are needed for your machine.

Related

Installed Latest Solaris_9_Recommended list prevents login

Hi everyone-
I just downloaded the latest Solaris 9 recommended patch set from patch.sun.com and installed it on my system. When I try to login to the system now I get the following:
telnet sunbox
Trying...
Connected to sunbox
Escape character is '^]'
Local flow control off
Sun OS 5.9
login: mylogin
Password:
Connection cloed by foreign host.
Okay so we checked /etc/shadow and found that every password is set to LK which is very strange.
We also use nisplus - and for whatever reason any user can't login. /etc/nsswitch.conf is set correctly.
/etc/default/login was replaced with the standard file and that did not help.
Does anyone have any other ideas?
We also have the BSM turned on for security reasons. 
Sounds like a NIS+ error of some sort or something like that, perhaps you solved this problem already, if not else i'ld recommend that you scan through your messages files, there should a hint in there. If not else try and apply a truss to the login process.. 
Hi everyone-
As it turned out it was an error with the /etc/pam.conf file - actually it wasn't an error per say with the entry but with the library pam_login_limit. Inside the file I found a non-standard entry looking like this:
telnet auth required pam_login_limit.so.1 debug lock_account count_limit=2
Some patch that is in the current Recommended_9.zip does something to a library that pam uses which causes this to fail. The security policy required that you successfully go through this login plugin.
Turns out that we needed to download the latest and greatest set of libraries from:
http://www.comsmiths.com.au/pam/v1.05/
Once the new package was loaded everything worked just fine.
Have fun,
Kevin

Oracle startup automatically problem

I was able to install Oracle (the kit from Sun) on the intel Solaris intel platform.
My problem is that I cannot automatically start the database after a reboot.
After following instructions it still does not start.
Here are the problems:
When Oracle user is set to bourne (login shell)
the command
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
creates an error
-sh: cannot open /etc/oratab
This is run from /etc/rc2.d
If the login shell is changed to Korn,
cat: not found
is the error message.
What is the problem? THANKS 
Not sure about the rest of your startup/shutdown script, but in Solaris, oratab is located in /var/opt/oracle. And if you want to use dbstart and dbshut to control the database you must edit /var/opt/oracle/oratab and change the tailing 'N' to 'Y'.
Additionally both the default dbstart and dbshut command scripts must be edited with the Sun supplied version of Oracle-8.1.6. See the white paper at www.dbspecialists.com.
hi
you are lucky to install oracle 8i on solaris, but me could not tell me patches if i need i have 06/00 solaris8
i wanna know what were environment variable you used especially the path. You can send me email at
neaman_ahmed#hotmail.com 
Set up your dtmail utility so that you can send and receive mail from your ISP. Then under your user account, not as root, run /usr/dt/bin/solregis. Complete the form and send it.
You should receive a return email message from Sun telling you how to register a user name and password which you will need to gain access to upgrades.
Once your user account is established, go to http://access1.sun.com/solarissolve/ and look under "Products" for maintenance upgrades. Download and install MU5. Be sure to read and understand the instructions.
Then you go the URL which I posted earlier, print it, study it, follow its instructions and Oracle will install with no problems whatever. 
Hi
thanks for advice. i have setup netscape messenger to recieve email from isp. i was not able to setup mailer in CDE for it. when i run solregis utility i did every thing but couldnt send my info. please help me out in this.

Problems with sudo on Solaris 8

Greetings all,
I am trying to set up user accounts with scripts that will restart services, should they fail. I am setting up the default shell as the script that I want to have run when they log in and at the completion it will kick them off. A nice secure way to get things going again without our network operations people getting their hands dirty.
I am attempting to use sudo for this and it keeps asking for a password even though I have put in the ALL=NOPASSWD tag in the sudoers file for this users entry. When I enter the users password it is not correct and when I enter root it is not correct and in the end it will not run the script. I need to somehow bypass this asking of a password and get sudo to run the command. This is to restart our SunOne messaging server and will likely be applied to various other processes.
Any suggestions are appreciated. I have checked the sudo site and checked the config.h from the compile and had no luck so it is not the shadow passwords issue that they list on their support site. I also tried to download and use the precompiled package that they had on SunFreeware, but that will not install on to any of these servers... can't get pkgadd to acknowledge it as a solaris package.
Thank you in advance!
Lee Stevens

How do I fix my updatemanager client on my Spark workstation?

Help
Updatemanager has been running well for a long time now on my public patches only Sparc Solaris10. I hit an I/O error while updatemanager was writing to my disk, and I now only get a small pop-up window that has an exclamation point in a triangle, and is titled "Warning". When I click O.K. the small window goes away, leaving me with Update Manager window which says "Available Updates:0" and "as of " (as of blanks).
I have reset my connection from https://getupdates.sun.com to https://getupdates1.sun.com because my browser complained about an expired security certificate. With my browser I can get to https://getupdates1.sun.com and download the current.zip file with no problem (i.e. Sun.com recognizes my userid and passwd).
I have also tried running both the gnome and CDE updatemanager client with the same results. I also tried stuffing a current version of current.zip file in the /var/sadm/spool/patchsv directory with the same results.
I have run suc.sh and noted the following issue:
"smpatch analyze:
Failure: Cannot connect to retrieve detectors.jar: This system is currently unregistered and is unable to retrieve patches from the Sun Update Connection. Please register your system using the Update Manager, /usr/bin/updatemanager or provide valid Sun Online Account(SOA) credentials."
I also get the following message in /var/adm/messages when I start up the updatemanager:
"Oct 19 14:13:34 baiba7 Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://getupdates1.sun.com/detector/detectors.jar"
Could someone give me a clue as to what could be broken on my machine, and how to fix it? I have also tried using sconadm to reset some of the basic parameters with no positive results.
TIA
Mike 
Whoops! Spark => Sparc 
If you have already run the suc.sh then the file generated by it would be quite useful - please upload it to http://supportuploads.sun.com/ and let us know the full name and path of the file. 
Thank you for taking a look.
I ftp'ed the suc.sh generated file "baiba7-191008-suc-out.Z" to supportuploads.sun.com/iplanetcores.
Mike 
There appears to be an issue with the registration data stored on the system. Ensure that the following patches are applied:
123630-03
138064-03
Clear out the old registration data:
# cacaoadm stop
# cacaoadm status
# /usr/lib/cc-ccr/bin/eraseCCRRepository
# rm /var/scn/persistence/SCN*
# cacaoadm start
Then re-register the system using either sconadm or updatemanager. 
Thank you. The Update Manager is now doing its thing correctly!

Using password.conf

Hello,
I'm running App Server 7 on a V240 with a Crypto Accelerator 500 installed. I've created two security domains on my CA500, thus when I start my AS admin server (which has encryption enabled), I am prompted for three passwords:
139# asadmin start-appserv
password:admin-server:internal>
password:admin-server:Sun Crypto Accelerator:admin#qisc.com:admin#qisc.com>
password:admin-server:Sun Crypto Accelerator:nobody#qisc.com:nobody#qisc.com>
Instance domain1:admin-server startedIf I manually enter these three passwords, the server starts up and everything works as expected.
Following the instructions in the manuals, I have created a "password.conf" file in the admin server's config directory (/var/opt/SUNWappserver7/domains/domain1/admin-server/config) so that I won't be prompted for passwords and the server can be restarted in unattended mode.
The contents of my password.conf file looks something like this:
internal:myPassword
admin#qisc.com:myPassword
nobody#qisc.com:myPasswordHowever, when I start my admin server, I am still prompted for passwords.
What am I missing?
Thanks,
Bill 
On the face of it, you don't seem to be missing anything. It should have worked.
Can you please try starting the server using the startserv script in /var/opt/SUNWappserver7/domains/domain1/admin-server/bin directory?
Does it also prompt for passwords? If yes, what are the tokens that it prompts for? 
Hmmm...I tried that, it started without prompting me, and it is working as it should. So what do I have to do to get asadmin to use the password.conf?
Thanks,
Bill 
Try using something like this...
create a file autostart with excecute permission
#!/bin/sh
<path to asadmin>/asadmin startserv<<END
password1
password2
password3
END
I have not tried this one on my server. But used start the secured servers in a similar fashion. Let me know how this goes.
Srivatsan. 
Srivatsan,
Unfortunately, it appears as though the passwords are being read from the tty directly, not stdin, so this doesn't work.
However, the fact that my password.conf file appears to be correct (by virtue of the fact that invoking the admin-server/bin/startserv script directly starts the admin server w/o prompting for a password) begs the question is this a bug?
Ah, in fact it is a bug (I searched sunsolve, and found bug 4926581). The bug readme says it is fixed, but I find no reference to this bugid in any of the AS7 patches found on SunSolve (118031-118036 which were just released on Thursday, 10/7). Does this mean I need to wait until the next Orion release to get this fix?
Thanks,
Bill 
I think it is fixed in Sun Java� System Application Server 7 2004Q2 Update 1
Cheers,
VM 
Yes, I can confirm that it is working with Update1.
But the file must be in the config directory of the instance, not of the admin-server!
Which makes sense because you could have multiple instances, with multiple truststore databases and therefore multiple passwords.
Best regards

Categories

Resources