Bend Source is the Best place in Oregon for weekly updates. : serverSetup

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Howto's for OpenBSD


Setting up package management

# uname -a
OpenBSD serv0.cmsws.com 4.3 GENERIC#698 i386
# PKG_PATH=ftp://ftp.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386/
# export PKG_PATH
# pkg_add rsync


Different CLI options

find ./ -type f -name "*.jpg" | sed -e "s/\(.*\)/\"\\1\"/" | xargs rm


Crontab layout


When issued as "crontab -e" this is the correct format

minute (0-59)
|   hour (0-23)
|   |   day of the month (1-31)
|   |   |   month of the year (1-12 or Jan-Dec)
|   |   |   |   day of the week (0-6 with 0=Sun or Sun-Sat)
|   |   |   |   |   commands
|   |   |   |   |   |
#### Sunday at midnight
0   0   *   *   0   /bin/sh somecommandhere


When modifying /etc/crontab this is the correct format

minute (0-59)
|   hour (0-23)
|   |   day of the month (1-31)
|   |   |   month of the year (1-12 or Jan-Dec)
|   |   |   |   day of the week (0-6 with 0=Sun or Sun-Sat)
|   |   |   |   |   user account to run command as
|   |   |   |   |   |    commands
|   |   |   |   |   |    |
#### Sunday at midnight
0   0   *   *   0   root /bin/sh somecommandhere


How to mount different things

First off make your mount points
# mkdir /mnt/cdrom
# mkdir /mnt/usb
# mkdir /mnt/hd2


1. mount CDROM at start up with /etc/fstab
# echo "/dev/cd0a /mnt/cdrom cd9660 ro,nodev,nosuid,noauto 0 0" >> /etc/fstab
# mount /mnt/cdrom

2. mount iso
# vnconfig svnd0 /usr/local/share/4.1.iso
# mount -t cd9660 /dev/svnd0c /mnt/cdrom

3. unmount iso
# umount /mnt/cdrom
# vnconfig -u svnd0

4. mount usb
# mkdir /mnt/usb
# mount_msdos /dev/sd0i /mnt/usb

5. unmount usb
# umount /mnt/usb


How to send email with telnet

  1. Open the cmd prompt. (Start -> Run or press win key + R, then type cmd and presss OK )
  2. Type telnet server.com 25 (where "server.com" is the remote mail server)
  3. Type HELO server.com. (Or "EHLO server.com")
  4. Type MAIL FROM:you@server.com.
  5. You may get a message saying "250 ok"
  6. Type RCPT TO:Friend1@anotherserver.com, friend_two@someotherserver.org, friend.3three@Someserver.com, etc.
  7. again, You may get a message saying "250 ok"
  8. To write the message, type DATA and press Enter.
    1. On the first line type SUBJECT:yoursubject and press Enter twice.
    2. Continue typing your message.
    3. Put a single period (.) on a line by itself and press Enter to send your message.
      The server should say 'Message accepted for delivery'. (Or it says 250 OK id=`a long id`)
  9. Type QUIT to exit Telnet.
#################################
# Don't actually type the ...'s #
#################################
# telnet mail.server.com 25
...
EHLO mail.cmsws.com
...
MAIL FROM:me@mydomain.com
...
RCPT TO:you@yourdomain.com[, you2@yourdomain.com]
...
DATA
SUBJECT:My subject...
Here is my message.
It looks so good to me.
This is the last line.
.  <- actually put a single period here, then press enter
...

How to check your email using telnet

  1. Select Start in the bottom left corner of the screen, then select Run.
  2. Once the Run window starts, type in cmd.
  3. At the command prompt, type in telnet emailprovider.com 110 (where "emailprovider" is the name of the service you use for email).
  4. Type USER yourusername (you may see what you type or not, and "yourusername" should be changed to whatever comes before the @ in your email address).
  5. Then type in PASS yourpassword (if you can see what you type, you will see your password).
  6. Type list.
  7. You will see a list of items with labels like "1 607" and "2 1323403."
  8. If you want to look at the message labeled 2 1323403, type retr 2. You can replace the 2 with any other number to view other messages.
  9. If you want to delete message 1 607, type dele 1.
  10. When you are done checking your email, type quit.
# telnet mail.cmsws.com 110
Trying 66.39.167.51...
Connected to mail.cmsws.com.
Escape character is '^]'.
+OK Dovecot ready.
USER jlucas@cmsws.com
+OK
PASS something
+OK Logged in.
list
... <snipped>
retr 1
... <returns message #1>
retr 2
... <returns message #2>
dele 2
... <deletes message #2>
quit <exits session>

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1532 seconds