January 17th, 2008
Using Samba Robert Eckstein, David Collier-Brown, Peter Kelly 1st Edition November 1999 1-56592-449-5, Order Number: 4495 416 pages, $34.95 Buy the hardcopy Table of Contents Appendix E Appendix E. Downloading Samba with CVS This appendix contains information on how to download the latest source version of Samba using the Concurrent Versions System (CVS). CVS is a freely available configuration management tool available from Cyclic Software and is distributed under the GNU General Public License. You can download the latest copy from http://www.cyclic.com/. CVS works on top of the GNU Revision Control System (RCS). Many Unix systems come preinstalled with RCS. However, if you want to download the latest version of RCS, you can find it at http://ftp.gnu.org/gnu/rcs/. One of the nicest things about CVS is its ability to handle remote logins. This means that people across the globe on the Internet can download and update various source files for any project that uses a CVS repository. Such is the case with Samba. Once you have RCS and CVS installed on your system, you must first log in to the Samba source server with the following command: cvs -d :pserver:cvs@cvs.samba.org:/cvsroot login This tells CVS to connect to the CVS server at cvs.samba.org. Once you are connected, you can download the latest source tree with the following command: cvs -d :pserver:cvs@cvs.samba.org:/cvsroot co samba This will download the entire Samba distribution (file by file) into a directory entitled /samba, which it will create on your hard drive. This directory will have the same structure as the Samba source distribution described in Chapter 2, Installing Samba on a Unix System. It includes source and header files, documentation, and sample configuration files to help get you started. After that is completed, you can follow the instructions in Chapter 2 to configure and compile Samba on your server.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.
Posted in PHP5 | No Comments »
January 16th, 2008
The most common options are src (source), dst (destination), and port. For example, in the book we used the command: tcpdump port not telnet This dumps all the packets except telnet; we were logged-in via telnet and wanted to see only the SMB packets. Another tcpdump example is selecting traffic between server and either sue or joe: tcpdump host server and \(sue or joe \) We recommend using the -s 1500 option so that you capture all of the SMB messages sent, instead of just the header information. Options There are many options, and many other kinds of expressions that can be used with tcpdump. See the manual page for details on the advanced options. The most common options are as follows: -c count Forces the program to exit after receiving the specified number of packets. -F file Reads the expression from the specified file and ignores expressions on the command line. -i interface Forces the program to listen on the specified interface. -r file Reads packets from the specified file (captured with -w). -s length Saves the specified number of bytes of data from each packet (rather than 68 bytes). -w file Writes the packets to the specified file. C. Samba Configuration Option Quick Reference E. Downloading Samba with CVS O Reilly Home | O Reilly Bookstores | How to Order | O Reilly Contacts International | About O Reilly | Affiliated Companies 1999, O Reilly & Associates, Inc. 436
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
Posted in PHP5 | No Comments »
January 16th, 2008
rpcclient commands Command Description regenum keyname Registry Enumeration (keys, values) regdeletekey keyname Registry Key Delete regcreatekey keyname [keyvalue] Registry Key Create regquerykey keyname Registry Key Query regdeleteval valname Registry Value Delete regcreateval valname valtype value Registry Key Create reggetsec keyname Registry Key Security regtestsec keyname Test Registry Key Security ntlogin [username] [password] NT Domain Login Test wksinfo Workstation Query Info srvinfo Server Query Info srvsessions List Sessions on a Server srvshares List shares on a server srvconnections List connections on a server srvfiles List files on a server lsaquery Query Info Policy (domain member or server) lookupsids Resolve names from SIDs ntpass NT SAM Password Change tcpdump The tcpdump utility, a classic system administration tool, dumps all the packet headers it sees on an interface that match an expression. The version included in the Samba distribution is enhanced to understand the SMB protocol. The expression is a logical expression with “and,” “or,” and “not,” although sometimes it s very simple. For example, host escrime would select every packet going to or from escrime. The expression is normally one or more of: host name net network_number port number src name dst name 435
We recommend high quality webhost to host and run your jsp application: christian web host services.
Posted in PHP5 | No Comments »
January 15th, 2008
-L server_name Resets the %L configuration variable to the specified server name. -s This option prevents the testparm program from prompting the user to press the Enter key before printing a list of the configuration options for the server. testprns The testprns program checks a specified printer name against the system printer capabilities (printcap) file. Its command line is: testprns printername [printcapname] If the printcapname isn t specified, Samba attempts to use one located in the smb.conf file. If one isn t specified there, Samba will try /etc/printcap. If that fails, the program will generate an error. rpcclient This is a new client that exercises the RPC (remote procedure call) interfaces of an SMB server. Like smbclient, rpcclient started its life as a test program for the Samba developers and will likely stay that way for a while. Its command line is: rpcclient //server/share The command-line options are the same as the Samba 2.0 smbclient, and the operations you can try are listed below. 434
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.
Posted in PHP5 | No Comments »
January 15th, 2008
Root-only options -a username Adds a user to the encrypted password file. -d username Disables a user in the encrypted password file. -e username Enables a disabled user in the encrypted password file. -m machine_name Changes a machine account s password. The machine accounts are used to authenticate machines when they connect to a primary or backup domain controller. -j domain_name Adds a Samba server to a Windows NT Domain. -n Sets no password for the user. -s username Causes smbpasswd to be silent and to read its old and new passwords from standard input, rather than from /dev/tty. This is useful for writing scripts. testparm The testparm program checks an smb.conf file for obvious errors and self-consistency. Its command line is: testparm [options] configfile_name [hostname IP_addr] If the configuration file is not specified, the file at samba_dir /lib/smb.conf is checked by default. If you specify a hostname and an IP address, an extra check will be made to ensure that the specified machine would be allowed to connect to Samba. If a hostname is specified, an IP address should be present as well. Options -h Prints command-line information for the program. 433
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
Posted in PHP5 | No Comments »
January 14th, 2008
-T This option can be used to translate IP addresses into resolved names. -U unicast_address Performs a unicast query to the specified address. Used with -R to query WINS servers. Note that there is no workgroup option for nmblookup; you can get around this by putting workgroup = workgroup_name in a file and passing it to nmblookup with the -s smb.conf_file option. smbpasswd The smbpasswd password has two distinct sets of functions. When run by users, it changes their encrypted passwords. When run by root, it updates the encrypted password file. When run by an ordinary user with no options, it connects to the primary domain controller and changes his or her Windows password. The program will fail if smbd is not operating, if the hosts allow or hosts deny configuration options will not permit connections from localhost (IP address 127.0.0.1), or the encrypted passwords = no option is set. Regular user options -D debug_level Sets the debug (also called logging) level. The level can range from 0 to 10. Debug level 0 logs only the most important messages; level 1 is normal; level 3 and above are primarily for debugging and slow the program considerably. -h Prints command-line usage information for the program. -r remote_machine_name Specifies on which machine the password should change. The remote machine must be a primary domain controller (PDC). -R resolve_order Sets the resolve order of the name servers. This option is similar to the resolve order configuration option, and can take any of the four parameters, lmhosts, host, wins, and bcast, in any order. -U username Used only with -r, to modify a username that is spelled differently on the remote machine. 432
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.
Posted in PHP5 | No Comments »
January 14th, 2008
-d debuglevel Sets the debug (sometimes called logging) level. The level can range from 0 all the way to 10. Debug level 0 logs only the most important messages; level 1 is normal; level 3 and above are primarily for debugging and slow the program considerably. -h Prints command-line usage information for the program. -i scope Sets a NetBIOS scope identifier. Only machines with the same identifier will communicate with the server. The scope identifier was a predecessor to workgroups, and this option is included only for backward compatibility. -M Searches for a local master browser. This is done with a broadcast searching for a machine that will respond to the special name __MSBROWSE__, and then asking that machine for information, instead of broadcasting the query itself. -R Sets the recursion desired bit in the packet. This will cause the machine that responds to try to do a WINS lookup and return the address and any other information the WINS server has saved. -r Use the root port of 137 for Windows 95 machines. -S Once the name query has returned an IP address, does a node status query as well. This returns all the resource types that the machine knows about, with their numeric attributes. For example: % nmblookup -d 4 -S elsbeth received 6 names ELSBETH <00> - B ELSBETH <03> -B ELSBETH <1d> -B ELSBETH <1e> - B ELSBETH <20> -B ..__MSBROWSE__.. <01> - B -s configuration_file Specifies the location of the Samba configuration file. Although the file defaults to /usr/local/samba/lib/smb.conf, you can override it here on the command-line, normally for debugging. 431
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.
Posted in PHP5 | No Comments »
January 13th, 2008
-t tape Tape device or file. Default is the value of the environment variable $TAPE, or tar.out if $TAPE isn t set. -u user Specifies the user to connect to the share as. You can specify the password as well, in the format username%password. Specifies the use of verbose mode. -X file Tells smbtar to exclude the specified file from the tar create or restore. -x share States the share name on the server to connect to. The default is backup, which is a common share name to perform backups with. For example, a trivial backup command to archive the data for user sue is: # smbtar -s pc_name -x sue -u sue -p secret -t sue.tar nmblookup The nmblookup program is a client program that exercises the NetBIOS-over-UDP/IP name service for resolving NBT machine names into IP addresses. The command works by broadcasting its queries on the local subnet until a machine with that name responds. You can think of it as a Windows nslookup(1) or dig(1). This is useful for looking up both normal NetBIOS names, and the odd ones like __MSBROWSE__ that the Windows name services use to provide directory-like services. If you wish to query for a particular type of NetBIOS name, add the NetBIOS to the end of the name. The command line is: nmblookup [-options] name The options supported are: -A Interprets name as an IP address and do a node-status query on this address. -B broadcast _address Sends the query to the given broadcast address. The default is to send the query to the broadcast address of the primary network interface. 430
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.
Posted in PHP5 | No Comments »
January 13th, 2008
-s configuration_file Sets the Samba configuration file to use when processing this command. -u username Limits the smbstatus report to the activity of a single user. smbtar The smbtar program is a shell script on top of smbclient that gives the program more intelligible options when doing tar operations. Functionally, it is equivalent to the Unix tar program. Options -a Resets the archive bit mode -b blocksize Blocking size. Defaults to 20. -d directory Changes to initial directory before restoring or backing up files. Incremental mode; tar files are backed up only if they have the DOS archive bit set. The archive bit is reset after each file is read. -l log_level Sets the logging level. -N filename Backs up only the files newer than the last modification date of filename. For incremental backups. -p password Specifies the password to use to access a share. -r Restores files to the share from the tar file. -s server Specifies the SMB/CIFS server in which the share resides. 429
In case you need quality webspace to host and run your web applications, try our personal web hosting services.
Posted in PHP5 | No Comments »
January 12th, 2008
-W workgroup Specifies the workgroup that you want the client to connect as. If you want to test a particular name service, run smbclient with -R and just the name of the service. This will force smbclient to use only the service you gave. smbstatus The smbstatus program lists the current connections on a Samba server. There are three separate sections. The first section lists various shares that are in use by specific users. The second section lists the locked files that Samba currently has on all of its shares. Finally, the third section lists the amount of memory usage for each of the shares. For example: # smbstatus Samba version 2.0.3 Service uid gid pid machine network davecb davecb 7470 phoenix (192.168.220.101) Sun May 16 network davecb davecb 7589 chimaera (192.168.220.102) Sun May 16 Locked files: Pid DenyMode R/W Oplock Name 7589 DENY_NONE RDONLY EXCLUSIVE+BATCH /home/samba/quicken/inet/common/system/help.bmp Sun May 16 21:23:40 1999 7470 DENY_WRITE RDONLY NONE /home/samba/word/office/findfast.exe Sun May 16 20:51:08 1999 7589 DENY_WRITE RDONLY EXCLUSIVE+BATCH /home/samba/quicken/lfbmp70n.dll Sun May 16 21:23:39 1999 7589 DENY_WRITE RDWR EXCLUSIVE+BATCH /home/samba/quicken/inet/qdata/runtime.dat Sun May 16 21:23:41 1999 7470 DENY_WRITE RDONLY EXCLUSIVE+BATCH /home/samba/word/office/osa.exe Sun May 16 20:51:09 1999 7589 DENY_WRITE RDONLY NONE /home/samba/quicken/qversion.dll Sun May 16 21:20:33 1999 7470 DENY_WRITE RDONLY NONE /home/samba/quicken/qversion.dll Sun May 16 20:51:11 1999 Share mode memory usage (bytes): 1043432(99%) free + 4312(0%) used + 832(0%) overhead = 1048576(100%) total Options -b Forces smbstatus to produce brief output. This includes the version of Samba and auditing information about the users that have logged into the server. -d Gives verbose output, including each of the three reporting sections listed in the previous example. This is the default. Forces smbstatus to print only the current file locks it has. This corresponds to the second section in a verbose output. -p Prints a list of smbd process IDs only. This is often used for scripts. -S Prints only a list of shares and their connections. This corresponds to the first section in a verbose output. 428
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
Posted in PHP5 | No Comments »