SHELL commands
Authentication log
tail -f /radius/logins.log
tail -f /radius/failures.logbelow is an entry you can add to your .login file...
- alias logins 'tail -f /radius/logins.log'
- alias failure 'tail -f /radius/failures.log'
the command line to run these if not in your .login file would be the statement inside the 's (i.e. tail -f /radius/logins.log)
You might be able to grep them too. use the following:
- grep -i username /radius/logins.log
- grep -i username /radius/failures.log
Bouncing mail
To enable bounce in the pine do the following from main menu:
- click s for setup
- click c for config
- enable bouce by putting an x in the bounce line,
- click e for exit and
- q for quit.
Checking MX records: nslookup -type=mx domainname.com
Create a directory on home using shell:
[jayne@ishell ~]$ ftp home.eznet.net<--- you type this
Connected to home.eznet.net.
220- Welcome to home.eznet.net, upon entering your username and password,
220-you will be placed into your html directory. The default file which
will
220-load is index.html.
220 WFTPD 2.30 service (by Texas Imperial Software) ready for new user
Name (home.eznet.net:jayne): support<--- you type this
331 Give me your password, please
Password: <--- you type this
230 Logged in successfully
Remote system type is WIN32.
ftp> mkdir ~username <--- you type this
257 "~smassaro" directory created
ftp> exit <--- you type this
221- Thanks for visiting home.eznet.net.
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye
[jayne@ishell ~]$
Directories on shell: df will display all the drives and directories
Disk Usage:
du or du -s
Use the command du to get disk usage
Domain Hosting info
A. When trying to locate who hosts a domain since the customer thought it was us and it was not:
- domain name was nymat.com and we host the mail, so internic sees us as
the hosting. in shell typed whois nymat.com- when doing a ping on www.nymat.com the ip address is revealed.
[jayne@ishell ~]$ ping www.nymat.com
PING www.nymat.com (208.239.116.223): 56 data bytes- do a whois on that ip gives no match for the host.
- do a whois for the host:
whois 208.239.116.0@rs.arin.net
The host will be shown.
Forwarding mail
A mail forward can be setup can be made using the new mail interface.
Finger
New accounts are no longer able to be fingered on shell. The existing users will shortly be removed from finger. 9-23-99
Home directory switch to lower case
As you all know we have moved home from a NT box to a Linux box...NT was not case sensitive, LInux is, therefore customers may have problems displaying images...especially on ebay....if you run into a problem like this check the source code from the webpage that is not displaying the image and cross reference that with the filename in the customers public_html dir. to rename the files in the Public_html dir from uppercase to lowercase do the following...
* sudo into the customer's acct
* cd into public_html
* type /usr/eznet/bin/lcase9-22-99 by jeff
IP addresses
Our User wanted legal ip address for mgminsure.com. There are 2 ways to
do this:
[jayne@ishell ~]$ nslookup mail.mgminsure.com <--- you type this
Server: dns1.eznet.net
Address: 207.50.128.2
Name: mail.mgminsure.com
Address: 207.50.129.133 <---answer[jayne@ishell ~]$ nslookup -type=mx mgminsure.com <--- you type this
Server: dns1.eznet.net
Address: 207.50.128.2
mgminsure.com preference = 100, mail exchanger = mx.eznet.net
mgminsure.com preference = 10, mail exchanger = mail.mgminsure.com
mgminsure.com nameserver = dns2.eznet.net
mgminsure.com nameserver = dns1.eznet.net
mx.eznet.net internet address = 207.50.128.40
mail.mgminsure.com internet address = 207.50.129.133<---answer
dns2.eznet.net internet address = 207.50.128.3
dns1.eznet.net internet address = 207.50.128.2- NT- on the run line type command ipconfig
- 95/98- from the dos prompt type winipcfg
- in solaris: ifconfig
List files
- ls -al
- ls -af
Memory usage: du
It will give you a list of your different services and how much space you are using in each. The number at the bottom is the total. This is in
kilobytes, there are 1024 to a megabyte.
MX records: nslookup -type=mx domainname.com
The nslookup for the MX (mail exchanger) records told me who was recieving
the mail for the domain.
Nslookup: nslookup userIP will test an ip and return the eznet info if they are with us.
Paging the tech on duty:
If and when it becomes necessary to page an engineer, you will be required to give a brief description of the problem and include your initials (see example below...)
command: page alynch "authentication problems reported when accessing mail -jld"
Pine will not open
If user can not use pine in that it is missing or from an ansi terminal, you need to create a .login file with this line: set term =vt100 after you make the change and save it type source .login at the shell prompt
Ping
used to detect navigation ability, response, packetloss.
ping ip
ping domainname.com
Quota
Deleted the contents of his public_html directory to bring him below his quota. His home pages were backed up on home and on his computer so he gave permission for these to be deleted.
Here is how I did it in shell:
sudo su - username
cd directoryname/ (the tab key completes the directory name)
ls -al (to list the directories and files)
rm -rf (to remove all directories and filies within this dir
ls -al (to make sure they are gone)
exit (to get out of super users access.)
This allowed the user to go back and use his mailbox.
Remove file: rm filename
Redirect verivication for domains
The following shell tool is available for us to use to determine if a redirect is set up for a particular account on a particular domain. You CAN NOT however add or change anything in this file.
______________________________________________________________
[jayne@ishell ~]$ cd /var/conf/mail/redirects
[jayne@ishell redirects]$ ls -al | grep andolinainsurance.com
-rw-r--r-- 1 www root 221 Jul 21 14:28
andolinainsurance.com
[jayne@ishell redirects]$ vi andolinainsurance.com
*->andolina@eznet.net
vbeutel->vbeutel@eznet.net
kdisalvo->kdisalvo@eznet.net
jbrown->jbrown1@eznet.net
rbachman->rbachman@eznet.net
andolina->kdisalvo@eznet.net
pandolina->pandolin@eznet.net
lschneid->lschneid@eznet.net
~
~
~
~
~
~
~
:q
[jayne@ishell redirects]$ cd
[jayne@ishell ~]$
Renaming files
user was using pine on shell. could pop mail but not see it through pine I
renamed the mbox so his pine would be directed to maildir. Below is how
you can do it.
[jayne@ishell ~] sudo su - username<-- you type this
[jayne@ishell ~] password:<-- type here
Connected to ftp1.eznet.net.
220 ftp1 FTP server (Version wu-2.4.2-academ[BETA-18](1) Mon Jan 18
19:19:31 EST 1999)
ready.
Name (ftp.eznet.net:jayne): username<-- you type this
Password: <-- type here
230 User username logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> rename mbox<-- you type this
(to-name) mboxold<-- you type this
350 File exists, ready for destination name
250 RNTO command successful.
ftp> exit<-- you type this
221 Goodbye.
[username@ishell ~] exit<-- you type this
[jayne@ishell ~]
sudo: super users access:
Our good friend 'sudo' is back, but in a limited way...we can see the contents of a customer's home dir (including children). This will be useful if a customer is having mail problems -- cannot scan $home/maildir...although we cannot change anything we can use this to gather info for the techs. Some of the key things to look for would be the owner and group of the dir -- make sure that root is not the owner, the other thing to check in the case of children is that they actuall exist.
Example: UID nagel2 (parent)
command: cd /u0/n/a
command: sudo ls -al nagel2
Password:
total 19
drwx--x--x 5 users users 1024 Oct 13 11:26 .
drwxr-xr-x 8 root root 1024 Sep 28 17:16 ..
-rw------- 1 users users 3768 Jul 8 1998 .Xdefaults
-rw------- 1 users users 24 Jul 8 1998 .bash_logout
-rw------- 1 users users 220 Jul 8 1998 .bash_profile
-rw------- 1 users users 124 Jul 8 1998 .bashrc
drwx-----x 5 users users 1024 Oct 14 10:31 .children
-rw------- 1 users users 76 Jul 8 1998 .ezmenurc
-rw-r--r-- 1 users users 8 Oct 13 11:26 .fullname
-rw-r--r-- 1 users nobody 11 Oct 13 11:26 .qmail
-rw------- 1 users users 3336 Jul 8 1998 .screenrc
drwx--x--x 8 users users 1024 Oct 13 14:32 Maildir
drwxr-xr-x 2 users users 1024 Sep 21 14:51 public_html
Example: UID sum (child of nagel2)
command: cd /u0/n/a
command: sudo ls -al nagel2/.children/sum/Maildir
total 5
drwx--x--x 5 users users 1024 Apr 8 1999 .
drwx-----x 3 users users 1024 Oct 5 15:28 ..
drwx--x--x 2 users users 1024 Apr 8 1999 cur
drwx--x--x 2 users users 1024 Oct 5 13:04 new
drwx--x--x 2 users users 1024 Sep 30 17:14 tmp
sudo su - username
type your password
type exit to get out of their shell
Sudo-ing into an Email only box 1/25/99
Had a mail only account with a broken box. bruce showed me how to sudo into account to fix
1. at the ishell prompt type sudo chsh username
2. at the shell prompt type /bin/tcsh
3. sudo into the suers directory as you usually do and examine mail,
delete with permission, if need be.
4. exit user account by typing exit
5. sudo chsh username
6. type users mail only directory which you had copied down earlier:
/usr/local/bin/emailonly
7. pray it lets you change them back to mail only.
Thanks bruce:)
Telnet-ing to email box to view mail without actually changing anything.
[jayne@ishell ~]$ telnet mail.eznet.net pop-3 <--- You type this
Trying 207.50.128.20...
Connected to mail1.eznet.net.
Escape character is '^]'.
+OK <25487.936810268@mail1.eznet.net>
user username<--- You type this with username being the UID
+OK
pass currentpasswordhere <--- You type this
+OK
list
+OK
1 12836 (this is a message list: size is in bytes, the number in front indicated the # of message in box.)
2 4272
.
retr 1 <--- You type this to retrieve message #1
.
.
./
.
quit <--- You type this to get out of the mail
TraceRoute: traceroute usersip
to see the route which a connection takes. Type traceroute usersip. The same can be done in a dos window as tracert usersip. This will show you any bottleneck holding up the connection
Ureports 5/17/98
ureport 19980517 (yearmonthday)
papa's tip of the day, at the shell prompt type ureport 19980517 (yearmonthday) then enter you will be given the creation, deacts, and purges for the day.
Users updatiung?
ps auxw | grep actionman
This should give you two lines, one running on root. If it does not you should contact an engineer asap. Shell is not updating.
version of redhat linux on shell
cat /etc/redhat-release
Who is on shell? w will give you all the users logged onto shell
Whois records:
whois domain.com will tell you who hosts the www domain.
through 11/7/99