Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by magikman

  1. Yes, calling the menu again will work.
  2. Howdy, I am writing a shell script for users with no knowledge of UNIX. The script will be used as their shell and will give them options on things to do/execute. I need to allow them to telnet, ssh, etc. to devices. The following is what i have so far: #!/bin/sh #set -x user=`whoami`; CLEAR=`which clear`; TELNET=`which telnet`; MENU=/usr/local/query/menu; SSH=`which ssh`; _Menu () { $CLEAR; echo " " echo " ============================================================" echo " NS2 MENU " echo " ============================================================" echo " 1. Telnet to a Device 12. CMTS Intfc Modem Count" echo " 2. SSH to a Device 13. Ping/Traceroute Device" echo " 3. Clear SSH Known Hosts 14. " echo " 4. Access Core1 GSR 15. " echo " 5. Access Core2 GSR 16. " echo " 6. Access Core3 VXR 17. " echo " 7. 18. " echo " 8. 19. " echo " 9. 20. " echo " 10. 21. " echo " 11. Access Server 22. " echo " ============================================================" echo " Select a Menu Number Option "or" " echo " Type H# for Help on a Menu Option "or" " echo " --Q to Quit Menu-- " echo " ============================================================" echo -n "Enter Menu Option ======> " read option; case "$option" in 1) _telnet; ;; 2) _ssh; ;; 3) _clearssh; ;; 4) _core1; ;; 5) _core2; ;; 6) _core3; ;; 11) _aov; ;; 12) _mdmcnt; ;; 13) _pingtrace; ;; *) $CLEAR; echo -e "You chose an invalid response. Please try again.\n Press any key to continue."; read junk; $MENU ;; esac } _telnet () { $CLEAR; echo -n "Enter IP address of device and press Return: "; read host; $TELNET $host; } _ssh () { $CLEAR; echo -n "Enter IP address of deivce and press return: "; read host; $SSH $host } _clearssh () { $CLEAR; echo -e "Know hosts has been cleared.\n Press any key to continue."; read junk; $MENU; } _core1 () { $CLEAR $TELNET <someIP> } _core2 () { $CLEAR $TELNET <someIP> } _core3 () { $CLEAR $TELNET <someIP> } _aov () { $CLEAR $SSH } _Menu The problem i am having is that after remoting into another box, i lose the shell script as the shell when they come back. If anyone has any suggestions, i am all ears (znx).
  3. magikman

    Postfix bouncing

    mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost Postfix is also very good at fighting spam without the need for different programs/scripts. Use the following in your config to use RBLs: smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client bl.spamcop.net, permit You can also do header checks and a whole host of other things. It can do lots of cool stuff.
  4. mysql -u root -p create database ;
  5. Have you tried to write something to do that? If so, post it and i am sure there will be tons of help.
  6. I don't know if syslog-ng can do that or not. What i would do is write something in perl to parse the log file every 5-10 minutes and look for that keyword. If it is there, send the lines which contain it to an email account. If you need it i can write something for you to do just that.
  7. do this and return with the output: fdisk -l /dev/hdc
  8. Do you think you could be a little less vague ?
  9. If you see the # above, that means you are root. Type 'exit' at the prompt and retry that command. If it doesn't work then, we will try something different.
  10. Are you trying to open that as a user other than the one who owns the display? If you logged in as user1 and then su -'d to root, you wont be able to open a dispaly.
  11. magikman

    Samba Help

    I am more than willing to help. However, I am really quite unsure what it is you are asking. Do you think you could be a little more clear in your request ?
  12. Hola, During my first few weeks at my new job noticed that their backup solutions are really outdated or are simply non-existent. They currently have a large tape library that is connected to Backup Exec which is meant to do backups for the entire server farm. However, currently this system isn't connected to the network in such a way that will allow me to backup remote servers. So, I have two solutions for that problem. 1) Build an ATM circuit from the remote locations to the local tape library over a private 172 address space. The problem with this is that the ATM link will only be ~500M and there are ~5 servers to be backed up via this method. (~$23K) 2) Build a SAN at the remote location and have the backups for the remote servers created locally to that server location. This system would use iSCSI over an existing Ethernet infrastructure and thus would be considerably faster than the WAN link. This solution would provide storage expansion and facilitate much faster backups. (~$20K) I am leaning toward the second solution to this issue. The backups would be much faster and it would be way easier to recover files from a local server rather than a remote library. However, the only issue I am looking at is the variety of servers which need to be backed up. We have a combination of Linux and Sun 2.7,8 and 10 servers. Do any of you have a setup like this? How are you doing your backups? What types of systems are you using/running? If you are using a SAN, what are you using? I am looking at the PowerVault MD3000i. Anyweb, could you get me some information on the MD3000i or put me in contact with someone that can provide me some in depth technical information on it (maybe even you)? If so, please PM me and I will send you my work email.
  13. Yes, dd can do this and many, many others. I keep this page in my bookmarks as a reference: http://www.linuxquestions.org/questions/li...command-362506/
  14. I went against both of your suggestions and went with my own comfort. I ended up using dd to do the initial copy and rsync to do a nightly backup of the dynamic content on the server. All went really well. Thanks for your input, znx!
  15. http://www.linuxquestions.org/linux/answer...rams_on_Linux_0 That's a pretty good tutorial.
  16. Is that something you have actually used or is that something you pulled up from a google search? If you have actually used it, how did you use it?
  17. Hello, This past week I started a new job with a rather large ISP maintaining their servers. One of the servers I have been put in charge of runs a captive portal system for a rather large convention center. This convention center has vendors come in and rent bandwidth/service. At this site I have two servers, one old and one current. As of right now there isn't any backing up of the current server, this scares me. What i would like to do is somehow clone the current server to the old and then use rsync to do incremental backups very early in the morning of the dynamic content on the drive. I was thinking of cloning the data on the HD of the current server via the use of dd or just tar'n all the directories. If using dd, i would just place the old server's drive in with the new server and dd the content to the old drive. However, if using tar and a custom script, i would just place the old drive in with the new server and tar the directories and untar them on the old drive leaving the MBR intact. If any of you have ever done anything like this, please let me hear how you accomplished this. Thanks!!
  18. That line up above is your port. do this: grep 514 /etc/services
  19. magikman

    BASH Prompt

    His tutorial looks very, very familiar! I wonder where he got that idea!
  20. or this one by me. Using this one you might have to change font paths and driver/device names.
  21. Unless you have an eth1, you need to change that to eth0.
  22. You are going to have to give more information than that. What errors are you getting, etc. Give a detailed description of your problem(s).
  23. I am currently setting up a DNS server for several domains that i own and i would like some input from you all on my configuration options, etc. The domains have been replaced by example.com example1.com and example2.com. Okay, first my options file: options { directory "/etc/bind"; allow-query { localhost; }; allow-recursion {; }; listen-on { <IP of Server>; }; allow-transfer { none; }; auth-nxdomain yes; }; named.conf: // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; // zone "com" { type delegation-only; }; // zone "net" { type delegation-only; }; // From the release notes: // Because many of our users are uncomfortable receiving undelegated answers // from root or top level domains, other than a few for whom that behaviour // has been trusted and expected for quite some length of time, we have now // introduced the "root-delegations-only" feature which applies delegation-only // logic to all top level domains, and to the root domain. An exception list // should be specified, including "MUSEUM" and "DE", and any other top level // domains from whom undelegated responses are expected and trusted. // root-delegation-only exclude { "DE"; "MUSEUM"; }; include "/etc/bind/named.conf.local"; named.conf.local: zone "example.com" { type master; file "example.com"; notify no; }; zone "example1.com" { type master; file "example1.com"; notify no; }; zone "example2.com" { type master; file "example2.com"; notify no; }; example.com @ IN SOA example.com. root.example.com. ( 2007032401 28800 86400 2419200 604800 ) IN NS ns1.example.com. IN MX 10 mail.example.com. ns1.example.com IN A <IP of server> example1.com @ IN SOA www.example1.com. root.example1.com. ( 2007032001; Serial 604800 ; Refresh 86400 ; Retry 2419200; Expire 604800 ) ; Default TTL IN NS ns1.example.com. IN MX 10 mail.example.com. ns1.example.com IN A <IP of server> example2.com @ IN SOA www.example2.com. root.example2.com. ( 2007032001; Serial 604800 ; Refresh 86400 ; Retry 2419200; Expire 604800 ) ; Default TTL IN NS ns1.example.com. IN MX 10 mail.example.com. ns1.example.com IN A <IP of server> As you can see the dns server will be authoritative for all three domains. I am also going to be putting up a mail server in the near future and would like to serve mail for all three domains from the one server (mail.example.com). If there is anything wrong with these definitions, or if there is something that can be done better, please let me know.
  24. Which OS did you install last? If you installed XP last, the XP bootloader wrote over grub (linux boot loader). If this is the case, you will have to reinstall grub and configure it to boot linux and XP.
  25. I am not an expert with windows networking, but i would say child doamins for the remote locations would be a good choice. If this isn't an option due to budget constraints, I would say that you should upgrade your connection if you are going to host the PDC remotely. If this isn't an option, perhaps there is some sort of compression that you could use on the VPN link to help with the load. OpenVPN has good real-time compression support. Sorry for the shameless plug, but i would recommend using pfsense for your firewall rather than ipcop. pfsense has much, much more power than ipcop. www.pfsense.com check it out!
  • Create New...