|
|
 |
 |
 |
Turn off IMAP:
(thanks to shimi on the cobalt-security list)
#vi or pico /etc/inetd.conf
(do a search for imap and comment out this line:)
#imap stream tcp nowait root /usr/sbin/tcpd imapd
Restart the inet server:
# killall -HUP inetd
# vi or pico /usr/admserv/cgi-bin/.cobalt/services/services.cgi
Change this line:
$ret=Cobalt::swatch::swatch_set_service_on("imap");
To this: $ret=Cobalt::swatch::swatch_set_service_off("imap");
Now go into the GUI's Control Panel and just hit the 'Save Changes' button.
This keeps Active Monitor from grumbling about IMAP being turned off.
TOP
Fix corrupted mailbox:
[ ** try this at your own risk, it is what I would do on my server **]
su - to root
cd /home/spool/mail/
/etc/rc.d/init.d/inet stop "stop mail services"
/etc/rc.d/init.d/sendmail stop
cp corrupted save_corrupted. "corrupted is the username"
rm corrupted [a new one will be made if he gets mail]
/etc/rc.d/init.d/sendmail start "start mail services"
/etc/rc.d/init.d/inet start
Take a look in save_corrupted file for a screwed-up header
Maybe you can guess what it should be by looking at the others, fix it.
If you can't fix it delete the corrupted email (maybe save it and send to user)
/etc/rc.d/init.d/inet stop "stop mail servides"
/etc/rc.d/init.d/sendmail stop
if there is no corrupted cp save_corrupted corrupted [check permissions]
else cat corrupted >> save_corrupted
cp save_corrupted corrupted
/etc/rc.d/init.d/sendmail start "start mail services"
/etc/rc.d/init.d/inet start
rm save_corrupted
TOP
Show New Sites: (from cobalt-users-list)
- Insert this line in /etc/conf/httpd/httpd.conf (main site)
AliasMatch ^/newsite/([^/]+)(/(.*))? /home/sites/$1/web/$3
- Then reload apache - [/etc/rc.d/init.d/httpd reload]
- Now, you can access the site with:
www.originaldomain.com/newsite/www.newdomain.com
- OR add the site to your /etc/hosts file (Linux) /windows/hosts file (Windows).
TOP
Boot Problem - fsck Fix:
Connect to the Raq via a PC with a null-modem cable,
make sure the settings are 115200,8,N,1 Hardware flow control.
The RaQ you will prompt you for the admin password,
entering the password will place you at the root prompt.
The following commands will perform an fsck on the file system,
fsck may come back with many inode errors and ask you if you want to fix them,
generally answer yes to all questions during the procedure.
umount /dev/hda1
When unmounted type fsck /dev/hda1.
umount /dev/hda3
When unmounted type fsck /dev/hda3.
umount /dev/hda4
When unmounted type fsck /dev/hda4
When complete issue the shutdown -r now
command to reboot your machine.
The machine will then reboot normally.
TOP
Rebuild Postgre:
su to root
cd /home/pgsql
OR (RaQ4+) cd /var/lib/pgsql/data/
su postgres
vi pg_hba.conf
change crypt to trust
pg_dump cobalt > cobalt.dump
cp cobalt.dump cobalt.dump.bak
vi cobalt.dump
find create_table for quota. hash it out (comment it out# )
Or delete it
destroydb cobalt
OR (RaQ4+) dropdb cobalt
createdb cobalt
psql cobalt< cobalt.dump
If you get unrecoverable errors here
go back to destroydb, then import your .bak file
vi pg_hba.conf
change trust back to crypt
/usr/local/sbin/swatch
TOP
Create Sub Domains:
These instructions create a REAL sub domain,
if the virtual site is a front page site, front page will see the subdomains when the site is edited.
[1] Create a user subdomain in domain.
subdomain is the name for the sub domain in domain virtual site.
[2] Create 'A' records in DNS for domain.com
www.subdomain.domain.com
subdomain.domain.com
For a RaQ2/3/4 follow instructions in [3],[4] and [6]
For a RaQ550 follow instructions in [5] and [6]
[3] Create a file in /etc/httpd/
- File name can be anything, I use domain.conf.
- Put the following text in the file domain.conf.
- <VirtualHost 111.222.333.444>
- ServerName www.subdomain.domain.com
- ServerAdmin thedomain-admin
- ServerAlias subdomain.domain.com
- DocumentRoot /home/sites/www.domain.tld/users/subdomain/web
- RewriteEngine on
- RewriteCond %{HTTP_HOST} !^111.222.333.444(:80)?$
- RewriteCond %{HTTP_HOST} !^www.subdomain.domain.com(:80)?$
- RewriteRule ^/(.*) http://www.subdomain.domain.com/$1 [L,R]
- RewriteOptions inherit
- AddHandler cgi-wrapper .cgi
- AddHandler cgi-wrapper .pl
- </VirtualHost>
- NOTE: In the above container replace subdomain, domain-admin,
domain, and 111.222.333.444 with the actual names (values)
Add any other AddHandler types you might need.
[4] edit /etc/httpd/conf/httpd.conf
- add a line that states:
"include domain.conf" (without quotation marks)
- Place this line after the server <VirtualHost> container.
This allows errors to resolve to the server domain
instead of one of the sub/domains
- Now skip to step 6
[5]RaQ550 Process
- You need to add the virtual host container in the
sites /etc/httpd/conf/vhosts/siteNN
- Here is an example;
- Find the line with "END WebScripting SECTION"
Enter the subdomains one after the other below the folowing line
which contains
- #
- # Subdomain 1
- #
- ServerName www.sub.domain.tld
- ServerAdmin some-site-admin
- ServerAlias sub.domain.tld
- DocumentRoot /home/.sites/39/site17/users/sub-domain-name/web/
- AddHandler cgi-wrapper .cgi
- AddHandler cgi-wrapper .pl
- #
- # Next Subdomain follows
- #
[6] reload httpd
- RaQ3 - RaQ4 -RaQ550 /etc/rc.d/init.d/httpd reload
- RaQ2 /etc/rc.d/init.d/httpd.init reload
DONE
TOP
Master/Slave DNS:
Make site ns1.yourdomain.com with ip 1.2.3.4
Make site ns2.yourdomain.com sith ip 1.2.3.5
Make DNS entires for yourdomain.com
include 'A' records for ns1 and ns2.
Telnet (SSH) into the server and modify /etc/named.conf
In the options section, add entries like so:
options {
directory "/etc/named";
listen-on { 1.2.3.4; 1.2.3.5; };
version "Name Server";
};
Issue the command < ndc reload >.
To see version use "dig @serverip version.bind. CHAOS TXT"
You now have ns1 and ns2 as nameservers.
TOP
Boot Single Mode:
If you boot with the serial console attached, you can hit space to enter the ROM setup.
You can then use the following commands:
boot set_params single bfd and you will get single user mode
TOP
RaQ4-SiteList-500Error-Fix.sh:
#!/bin/sh
# 8/27/2001 Sun Microsystems, Inc.
#
# All RaQ 4 systems are subject to a pair of race conditions at
# build. One may leave /home/tmp with incorrect permissions.
# The other may misconfigure PostgreSQL. Both will block
# PostgreSQL from starting properly when the RaQ is powered on.
#
# The first symptom of this condition is an Internal Server
# Error when trying to view the Site List in the Server
# Administration interface.
#
# To correct either error condition, please run this
# script as root on the affected system.
#
#*** WARNING ***
#
# ONLY RUN THIS SCRIPT ON A NEW OR FRESHLY REBUILT RAQ4
# THAT IS GIVING "INTERNAL SERVER ERROR" WHEN TRYING TO
# VIEW THE VIRTUAL SITE LIST IN THE RAQ ADMIN INTERFACE
echo "Forcing permission 01777 on /home/tmp"
chmod 01777 /home/tmp
echo
echo "Rebuilding PostgreSQL configuration"
mv /var/lib/pgsql /var/lib/headache.pgsql
echo
echo "(Re)Starting PostgreSQL"
/etc/rc.d/init.d/postgresql restart
echo
echo "Reconstructing the home site"
/usr/local/sbin/meta-verify -f -u -s -v -i
echo
echo "Done"
TOP
Jerry Jackson says:
Make your additions as root to "access" at the bottom of the file. In this
case, you may want to make entries like this...
wanadoo.fr 550 Mail Rejected Due To SPAM
217.109.166.8 550 Mail Rejected Due To SPAM
You can put any message you want after the "550". Then set back and monitor
your "/var/log/maillog" and see your special message every time some vermin
was rejected.
Note that you can also block out huge IP blocks by using partial IPs. I use
arin.net to refine how deep I want to cut...
217.1 550 We Don't Accept Spam From Your Chunk of Europe!
217. 550 Oops, we're blocking a lot of Americans now too.
After you edit "access" and save your changes, you need to makemap access...
makemap hash /etc/mail/access < /etc/mail/access
TOP
FYI... something I found while reviewing/purging my archived emails that
I thought should be handed out/sent to the list archives...
this should work on RaQ3,RaQ4, and RaQ XTR.
To change *all* sites' FrontPage "webmaster" account passwords to the same thing
do this commandwork on RaQ3, RaQ4, and RaQ XTR. as root (should all be on one line):
find /home/sites -name service.pwd -exec htpasswd -b {} webmaster newpassword \;
If you need to set them all to something different, you would do
(again,should all be on one line):
htpasswd -b /home/sites/www.domain.com/web/_vti_pvt/service.pwd webmaster newpassword
for each www.domain.com you need to change.
Bruce Timberlake
TOP
=============================================
Creating a user for mail ONLY
=============================================
adduser -M -s /bin/badsh newuser
passwd newuser
password newpassword
password newpassword
edit /etc/mail/virtusertable, look for, add a new line after
# Put custom additions below (Do not change/remove this line).
newuser@domain.com newuser
then run
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
Insure that the domain name is in /etc/mail/local-host-names
If you edit local-host-names, restart sendmail.
=============================================
TOP
formail to move a mailbox:
As an example, I had to use formail to send a user's spool mail file to
another address. To do this, I executed:
formail -s /path/to/sendmail user@domain.tld < spoolfile
TOP
HR color="blue">
Cobalt Users List - David Lucas
Read file error: ./resolv.conf.5 No such file or directory
Telnet or ssh to the server as admin and su - to root.
Change directory to /usr/man/man5
Type this:
cp resolver.5.gz resolver.5.gz.bak
gunzip resolver.5.gz
mv resolver.5.gz.bak resolver.5.gz
That will get rid of the errors and still maintain both symlinks.
TOP
Install of Bind 8.3.3
- ssh into server
- su -
- cd /home/install/ (or directory of your choice)
- mkdir bind-8.3.3
- cd bind-8.3.3
- wget ftp://ftp.isc.org/isc/bind/src/8.3.3/bind-src.tar.gz
- tar -zxvf bind-src.tar.gz
- Note: if RaQ2 it may need a patch (8.3.2 did)
You can try to continue without patch, and return here if errors
wget ftp://ftp.raqware.com/pub/patches/bind832-redhat52.patch
patch src/port/linux/Makefile.set < bind832-redhat52.patch
- If Qube2 you need to install flex, there is an rpm for it.
wget ftp://ftp-eng.cobalt.com/pub/contrib/mips/flex-2.5.4a-3.mipsel.rpm
rpm -ivh flex-2.5.4a-3.mipsel.rpm
rm flex-2.5.4a-3.mipsel.rpm
- cd src
- Note: if bind-8.3.x previously installed skip next step
- make stdlinks ### always skip this step on a RaQ2
- make clean
- make depend
- make all
- ndc stop
- make install
- ndc start
- ndc status ### the first line should say "named 8.3.3-REL"
- cd /home/install/
- rm -rf bind-8.3.3
TOP
Add a hard drive to a Qube or a RaQ
The first command won't work if the drive is not hdc
So you may have to use hdd or strap the drive as master
"fdisk /dev/hdc"
"mke2fs -cv /dev/hdc1"
"cd /"
"mkdir driveC"
"chmod 777 driveC"
"mount -t ext2 /dev/hdc1 /driveC"
"cd /driveC"
Now write a file
"touch test" then run "ls" (you should see test)
"vi [or pico -w] /etc/fstab"
Add this line
/dev/hdc1 /driveC 3 3
Reboot and see it it mounts...
"ls /driveC"
you should see the test file
You can also moumt the drive someplace else,
it does not have to be /driveC
just change the directions referencing /driveC
TOP
Fix TUPLES ISSUE from sun knowledge base
- Telnet to the box as admin
- Type:
- su -
- cd /home/pgsql
- su postgres
- edit pg_hba.conf
- change "local cobalt crypt" to "local all trust"
- Type:
- pg_dump cobalt > cobalt.dump
- edit cobalt.dump
- find "create_table for quota" and hash out that section, (comment it out) save and close
- Type:
- destroydb cobalt
- createdb cobalt
- psql cobalt < cobalt.dump
- edit pg_hba.conf
- change "local all trust" back to "local cobalt crypt"
- exit back to root by typing exit
- Type:
- swatch
TOP
Fix your Big Drive
- edit /etc/crontab, comment out the 15 minute cron
- Shutdown any process using /home
includes, sendmail, mysql, syslogd
- cd /
- tar -cspf home.tar /home
- umount /dev/hda4 (the /home part)
- fdisk /dev/hda
- d
- 4
- n
- create primary part
- accept default start
- accept default end
- w
- mke2fs /dev/hda4 (/home part)
- mount /dev/hda4 /home
- tar -xvf home.tar
- rm home.tar
- edit /etc/crontab remove comment, added earlier
- shutdown -r now
TOP
Change MySQL Password
- ssh admin@host.server.tld
- su -
- password: your-root-password
- #issue the following command to change the MySQL root password.
- mysqladmin -uroot -pOLD-PASSWORD password NEW-PASSWORD
- #If it works, you won't get an error message
- exit
- exit
- -------------------------
- dump mysqp database
- mysqldump --all-databases > all_databases.sql
- -------------------------
- mysql -uUsername -p dbname < dbname.sql
- 1. Dump your database with the command
mysqldump -u "User" -p "Pass" "Databasename" > "Outfile".
- 2. Import the dumpfile in another database with the command
mysql -u "User" -p "Pass" "Databasename" < "Outfile from above".
mysql -uuser -ppass < all_databases.sql
TOP
Flashtool
NOTE: Only use this procedure with 2.3.x ROMs
-
Credits to Tim Hockin of Sun
-
1) Open a shell session on the server.
ssh admin@server.tld
-
2) Use the following to su to root
su -
password:
-
3) Get the flashtool
wget http://raqware.com/pub/rom-tools/flashtool
-
4) Make flashtool executable
chmod +x flashtool
-
4) Get the ROM image (using 2.3.38, change to 2.9.34 for RaQ550)
wget http://raqware.com/pub/rom-tools/2.3.38.rom
-
5) Use the following command to back up your ROM:
./flashtool -v -r > backup.rom
-
6) Use the following command to reflash your ROM:
./flashtool -v -w 2.3.38.rom
-
7) If it succeeds (it should), you can reboot with the newly flashed ROM.
If it fails AT ALL - DO NOT REBOOT.
Being a user-land tool, sometimes flashtool fails
(we're working on it - hence the 'experimental' warnings).
If you get error messages from flashtool, try it again. If it fails
repeatedly, try burning back the saved backup.rom
(you did save it, right?). Whatever you do - DO NOT REBOOT.
The ROM is only read at power-up time, so you do not want to
reboot until you are sure the burn succeeded.
TOP
>> Stop MySQL
/etc/rc.d/init.d/mysql stop
>> Switch user to MySQL
su - mysql
>> Start MySQL without needing passwords
/usr/sbin/mysqld --skip-grant-tables &
>> This should let you into MySQL with out a password
mysql
>> With-in MySQL Client
use mysql;
update user set Password="" where User="root" and Host="localhost";
exit;
>> Kill the MySQLD process
killall mysqld
>> Exit of "mysql" user, and back to "root" user.
exit
>> Now the user "root" for MySQL has NO password!!
>> Start MySQL
/etc/rc.d/init.d/mysql start
>> Change your password
mysqladmin -uroot password 'newpassword'
|
|
 |
|
 |
|