Search Results

Search found 6242 results on 250 pages for 'named pipe'.

Page 56/250 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • WPF StaticResource bound to subproperty

    - by mizipzor
    I have a class thats created as a resource: <Window.Resources> <Model:MyModel x:Key="model" /> </Window.Resources> The MyModel class has a cli property named Foo. I want the selected value in a combobox to be bound to this property. I thought I could do this but Im getting errors: <ComboBox SelectedItem="{Binding Source={StaticResource model.Foo}}" /> Heres the error: Cannot find resource named '{model.Foo}'. Where did I go wrong? What extra parameters do I need to specify to properly bind to a subproperty?

    Read the article

  • Syncronizing indices of function pointer table to table contents

    - by Thomas Matthews
    In the embedded system I'm working on, we are using a table of function pointers to support proprietary Dynamic Libraries. We have a header file that uses named constants (#define) for the function pointer indices. These values are used in calculating the location in the table of the function's address. Example: *(export_table.c)* // Assume each function in the table has an associated declaration typedef void (*Function_Ptr)(void); Function_Ptr Export_Function_Table[] = { 0, Print, Read, Write, Process, }; Here is the header file: *export_table.h* #define ID_PRINT_FUNCTION 1 #define ID_READ_FUNCTION 2 #define ID_WRITE_FUNCTION 3 #define ID_PROCESS_FUNCTION 4 I'm looking for a scheme to define the named constants in terms of their location in the array so that when the order of the functions changes, the constants will also change. (Also, I would like the compiler or preprocessor to calculate the indices to avoid human mistakes like typeo's.)

    Read the article

  • Fetching a result twice with deferend name

    - by user1799842
    I have 1 table with tasks named opentask:columns: id,title,description,expires,creator_id,creator_name, executer_id, executer_name, priority_id, status_id1 table with users named user: with columns: user_id, username What I want is to create a query where there will be all columns from opentask table where the executer_id will be equal to the user_id of user table AND the creator_id will be equal to the user_id again. This creates a confusion because the first equality excludes the second.So I need somehow to create a query where I will include the usernames for the executer with something like where "opentask.executer_id=user_user_id" and at the same time I will include the username again (as a differend name?) for the creator with something like "where opentask.executer_id=user_user_id"So I try this, which of course I know that is missing something, can you help? SELECT DISTINCT id, title, description, expires, creator_id, executer_id, oc_opentask.priority_id, oc_opentask.status_id, priority_name, status_name, user_id, username, (SELECT username FROM oc_opentask, oc_user WHERE oc_opentask.creator_id=oc_user.user_id) AS username2 FROM oc_opentask, oc_opentask_priority, oc_user, oc_opentask_status WHERE oc_opentask.priority_id=oc_opentask_priority.priority_id AND oc_opentask.executer_id=oc_user.user_id AND oc_opentask.status_id=oc_opentask_status.status_id ORDER BY oc_opentask.expires DESC

    Read the article

  • calling hibernate callback

    - by vrkmurali
    HibernateCallback callback=new HibernateCallback() { @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { Transaction transaction=session.beginTransaction(); Query query2 = session.createSQLQuery( "select user_id,user_name from usermasterdao where user_id not in('select usermaster_id from LoginHistoryDAO where logindate between :fromdate and :todate')"); ((SQLQuery) query2).addEntity(UserMasterDAO.class); //query.setParameter("stockCode", "7277"); query2.setParameter("todate", toDate); query2.setParameter("fromdate", fromDate); List result2 = query2.list(); listofNotUsing=result2; System.out.println(result2.size()+"sizeeee"); transaction.commit(); return result2;}} while executing the command getting error like as follows com.vaadin.event.ListenerMethod$MethodException: Invocation of method notUsingButton in com.iton.ioffice.admin.LoginHistory failed. at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164) at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219) at com.vaadin.ui.Button.fireClick(Button.java:567) at com.vaadin.ui.Button.changeVariables(Button.java:223) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761) at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:318) at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.orm.hibernate3.HibernateQueryException: could not locate named parameter [todate]; nested exception is org.hibernate.QueryPa rameterException: could not locate named parameter [todate] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:656) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at com.iton.ioffice.admin.DAO.impl.UserServiceDAOImpl.outOfProcess(UserServiceDAOImpl.java:304) at com.iton.ioffice.admin.LoginHistory.notUsingButton(LoginHistory.java:298) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:520) ... 23 more Caused by: org.hibernate.QueryParameterException: could not locate named parameter [todate] at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99) at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105) at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437) at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407) at com.iton.ioffice.admin.DAO.impl.UserServiceDAOImpl$4.doInHibernate(UserServiceDAOImpl.java:285) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) ... 31 more please help me

    Read the article

  • read contents of a sql table into a data grid view

    - by syedsaleemss
    Im using c# .net windows application form. i have created a database named "resources" in SQL server 2005. In that i have a table named "resourcetable" which has two columns. now i need to read the data in the table into a datagridview. I can do this by using the connection string and querry by giving the table name. But my problem is i have a button and if i click on that button, an open dialog box should open and i should be able to select a database amomng many databases and in that selected database i have to select one table amomg many tables. i.e select a table ofa particular database. and the contents of that table are to be displayed in a datagridview.

    Read the article

  • mysql twitter/facebook like status feed

    - by barjonah
    Hi, I have two tables. One named status like this... user_id | status --------+----------- 1 | random status from user 1 2 | random status from user 2 3 | random message from user 3 4 | staus from user 4 1 | second status for user1 etc... and another named users_following like this... user_id | is_following --------+----------- 1 | 2 1 | 3 2 | 1 3 | 2 meaning that user 1 is following both users 2 and 3 etc... So, let's say I chose user 1. What is the best query (performance wise) to show the status updates of users that user 1 is following, in this case users 2 and 3 currently I have something like SELECT * from status WHERE user_id IN(SELECT is_following FROM users_following WHERE user_id='1') LIMIT 0,5 but I don't think this is good for performance if a user was following thousands+ of users

    Read the article

  • how to access child instances in a vector in c++

    - by tsubasa
    I have a parent class and child class (inherited from parent). In the child class, I have a member function named function_blah(); I used vector<parent*> A to store 5 parent instances, 3 child instances. So the total number of elements in the vector is 8. I can easily access to member functions of element A[0] to A[4], which are parent instances. But whenever I try to have access to member functions of element A[5] to A[7], the compiler complains that class parent has no member named 'function_blah' The way I access to elements is using index. e.x A[i] with i = 0..7. Is it correct? if not, how?

    Read the article

  • apache Digester: Unexspected NoSuchMethodException on addSetNestedProperties

    - by qstorm
    Hi, I have a problem using Digester and I hope you can help me. I have the following Bean: public class MyEntry { private String entityID; public String getEntityID() { return this.entityID; } public void setEntityID(final String entityID) { this.entityID = entityID; } } And the following XML structure: <entries> <entry> <MyID> 24309LAGH1 </MyID> </entry> </entries> I use the addSetNestedProperties(…) method of the digester API: digester.addSetNestedProperties("entries/entry", "MyID", "entryID"); The following exception occurs: java.lang.NoSuchMethodException: Bean has no property named MyID Why is digester searching for a property named “MyID”? I specified “entryID” as bean property accorsing to the digester API Thanks :) Best regards QStorm

    Read the article

  • Hidden input text submit with jquery

    - by Lucas Silva de Freitas
    I have a javascript var that returns the value of a input text named "pro_barras", with the value of "pro_barras" I need to make a search in my database without submiting the page. I can't use a javascript var in the java code, so i've setted the value in a hidden input text named "hidden_barra", but I need to submit it to get the value with the java code and make the search...How do I do it ? <input type="text" id="pro_barras"> <input type="hidden" id="hidden_barra"> <script> var barra = document.getElementById('pro_barras').value; document.getElementById('hidden_barra').value = barra; var ref = <%=pd.getProdutosBarra(">VAR 'barra' HERE or request.getParameter("hidden_barra")<").getPro_referencia()%>; </script>

    Read the article

  • Rails attribute alias

    - by Dr1Ku
    Hi, I was just wondering if it's possible to "rename" an association in Rails. Let's assume : # An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb) class SomeModelASubModel < ActiveRecord::Base has_many :some_model_a_sub_model_items end # An ActiveRecord Class named SomeModelASubModelItem (some_model_a_sub_model_item.rb) class SomeModelASubModelItem < ActiveRecord::Base belongs_to :some_model_a_sub_model end At this point, calling some_model.items, where some_model is an instance of the SomeModelASubModel Class would trigger an undefined method error. What is the best practice for making this happen though, e.g. : # With a method_alias or something, would it be possible to : some_model = SomeModelASubModel.first # for instance items = some_model.items # For the reason stated, this doesn't work, one has to call : items = some_model.some_model_a_sub_model_items Is such a shorthand possible ? Thank you in advance !

    Read the article

  • How to access a method of a closure's parent object?

    - by Bytecode Ninja
    I have defined a class named MyClass and I have defined two methods myMethod1 and myMethod2 for it: function MyClass() {} MyClass.prototype.myMethod1 = function() {...}; MyClass.prototype.myMethod2 = function() {...}; Inside myMethod1, I use jQuery and there's a callback closure defined there: MyClass.prototype.myMethod2 = function() { $.jQuery({success: function(data) { this.myMethod2(); }, ...}); } Now the problem is that this no longer is referring to MyClass. The question is how can I refer to it? At the moment I have assigned it to a variable named thisObj and access it this way: MyClass.prototype.myMethod2 = function() { var thisObj = this; $.jQuery({success: function(data) { thisObj.myMethod2(); }, ...}); } Is there a better way to access MyClass.this from the closure nested in myMethod2? Thanks in advance.

    Read the article

  • Sql-server Database query help

    - by menacheb
    Hi, I have a problem that I didn't manage to solve for a very long time, and I quite desperate. I have a Database (SQL Server) with table named 'ProcessData' and columns named 'Process_Name' (Data Type: nvarchar(50)), 'Start_At' (DataType: DateTime) and 'End_At' (Data Type: DateTime). I need to know for each 'Time-Interval' (let's say 1 minute) how many processes (Process_Name = PN) was open (after or equal to the 'Start_at' column and before or equal to the 'End_At' column) during this time (It can be a few rows with the same data). Does anyone know how to make this query without a 'for' loop? (It ITSELF will promote the time), (The answer will be a table with two columns (1. The time the check took place. 2. the number of open processes at this time.) and a row for each 'Time-Interval' (1 minute in this example ) Many thanks,

    Read the article

  • pass parameter from controller to models condition

    - by Alex
    I'm trying to bind a param to a join via a named scope., but I'm getting an error. What is the correct way to do that? has_one :has_voted, :class_name => 'Vote', :conditions => ['ip = :userIp'] # named scopes scope :with_vote, lambda {|ip| { :include => [:has_voted], # like this ?? :conditions => [:has_voted => {:conditions => {:userIp => ip}} ] }} Idea.with_vote(request.ip).all I believe I need the condition definition in the model for it to appear in the ON clause of a JOIN, rather then in the WHERE one. Edit I'm trying to get the following query select Ideas.*, Votes.* from Ideas left outer join Votes on Votes.Idea_id = Idea.id AND Votes.ip = {request.ip}

    Read the article

  • MySQL Query to receive random combinations from two tables.

    - by Michael
    Alright, here is my issue, I have two tables, one named firstnames and the other named lastnames. What I am trying to do here is to find 100 of the possible combinations from these names for test data. The firstnames table has 5494 entries in a single column, and the lastnames table has 88799 entries in a single column. The only query that I have been able to come up with that has some results is: select * from (select * from firstnames order by rand()) f LEFT JOIN (select * from lastnames order by rand()) l on 1=1 limit 10; The problem with this code is that it selects 1 firstname and gives every lastname that could go with it. While this is plausible, I will have to set the limit to 500000000 in order to get all the combinations possible without having only 20 first names(and I'd rather not kill my server). However, I only need 100 random generations of entries for test data, and I will not be able to get that with this code. Can anyone please give me any advice?

    Read the article

  • Problems with starting windows service on windows xp SP3

    - by Michiel Peeters
    I'm currently facing a problem which I can not resolve and I really don't know what to do anymore. When I'm trying to start the service I receive the message: "The service is started but again also stopped, this because that some of the services will stop if they have nothing to do, for example the performance logs and the alerts service". I've looked into the Windows Logs but nothing is written there which could describe why my service is all the time stopping. I've also tried to fire the windows service via the command prompt which gives me the message: "The service is not started, but the service didn't return any faults.". I've tried to remove all keys which references to my service, which didn't resolve the issue. I've searched on google (maybe not good enough) to find an answer but I didn't found any. I did found some websites which describes what I could do, but all of these suggestions didn't work. This is kinda ** because I do not know where to look. I do not have any error message, i do not have any id which i can use to search on. I really don't know where to start and I hope you guys can help me on this one. Detailed explanation about the windows service OS: Windows XP SP3 .Net Framework: .Net 4.0 Client Profile Language: C# Development environment: Visual Studio 2010 Professional (but Visual Studio 2012 RC is installed) Communications: WCF (Named Pipes), WCF (BasicHTTPBinding) Named Pipes: I have chosen for this solution because I wanted to communicate from a windows service to a windows form application. It worked now for quite some time but suddenly my windows service shuts it self down and I couldn't restart it anymore. There are two named pipes services implemented: An event service which will send any notification to the windows form application and an management service which gives my windows form application the possibility to maintain my windows service. BasicHTTPBinding: The basic http binding makes the connection to a central server. This connection is then used for streaming information from the client to the server. I do not know which additional information you will need, but if you guys need something then I'll try to give it as detailed as possible. Thank you in advance.

    Read the article

  • Is it possible to deny access to SQL Server from specific programs?

    - by Paul McLoughlin
    Currently one of our databases (SQL Server 2008) is accessed via a number of different mechanisms: .Net SqlClient Data Provider; SQL Server Management Studio; various .Net applications and 2007 Microsoft Office system (basically Excel). I see that in the sys.dm_exec_sessions DMV it is possible to see the program name of the program accessing the database for the current sessions. My question is: is it possible for one to deny access from a particular named program? First prize would be if this could be done for any named program, but we would gain a great deal of benefit from being able to deny access to this specific database from all Microsoft Office applications (especially Excel).

    Read the article

  • jQuery .click() .toggle() - change display and swap character

    - by danit
    Here is my jQuery: $('.ask').click(function() { $('.addtitle').slideToggle('fast', function() { // Animation complete. }); }); And my HTML: <p class="ask">+</p> <div class="addtitle"> <p>Give your Idea a great title</p> <form name="input" action="#" method="get"> <input id="title" type="text" name="title" /> <input id="go" type="submit" value="Go" /> </form> </div> I have multiple .ask div's on the page and I only want it to effect the .next() div named .ask rather than all div's named .ask. I also want to .toggle() the '+' character to '-' Can anyone assist?

    Read the article

  • Force to reimplement a static function in inherit classes

    - by pacopepe
    Hi, I have a program in C++ with plugins (dynamic libs). In the main program, I want to execute a static function to check if i can create a object of this type. An example without dynamic libs (aren't neccesary to understand the problem): #include "libs/parent.h" #include "libs/one.h" #include "libs/two.h" int main(int argc, char * argv[]) { Parent obj; if (One.match(argv[1])) { obj = new One(); else if (Two.match(argv[1])) { obj = new Two(); } Now, i have a interface class named Parent. All plugins inherit from this class. Ideally, I have a virtual static function in Parent named match, and all the plugins need to reimplement this function. The problem with this code is that i can't do a static virtual function in C++, so i don't know how to solve the problem. Sorry for mi english, i did my best

    Read the article

  • MULTIPLE CRITERIA TABLE JOIN

    - by user1447203
    I have a table listing clothing items (shirt, trousers, etc) named . Each item is identified with a unique CLOTHING.CLOTHING_ID. So a blue shirt is 01, a flowery shirt is 12 and jeans are 07 say. I have a second table identifying outfits with a column for shirts, for trousers, shoes etc. For example Outfit 1: shirt 01, trousers 07 (i.e. blue shirt with jeans) Outfit 2: shirt 12, trousers 07 (so flowery shirt with jeans). This table is named and each outfit is unique with OUTFIT_LIST.OUTFIT_ID. I want to produce a select statement that will list each outfit's contents, i.e. find the clothing specified in Outfit 1. Any help would be very much appreciated, and apologies in advance if I am missing a very simple solution. I have been playing with JOINS of all descriptions and CONCATS and so on with now luck - I am very new to this. Thanks.

    Read the article

  • How to map an property of ClassA to one of SuperclassA?

    - by mystify
    I have a class named SuperclassA, and an class named ClassA. ClassA inherits from SuperclassA. SuperclassA has got an property called something, so a very generic not-much-saying name. In ClassA, I want to have an property which maps to that something of SuperclassA. How could I do that? I want to make absolutely sure that any access to myBetterProperty results in accessing what's behind something. Assigning an value to myBetterProperty should result in assigning one to something, and vice versa. How to? Pointers set up in init? How would that look like? *self.myBetterProperty = &something; ? I'm not sure about that...

    Read the article

  • Outlook 2010 Populating a Text Box

    - by Turkwise
    all! I'll try to be as detailed as possible in describing my predicament. I have a little background knowledge in Visual Basic, but none really in VBA or VBscript in Outlook 2010. I'm working with Outlook 2010. I created a custom form (this is my first time). I have a combo box named ComboBox1 and a text box named TextBox1. I am trying to auto-populate TextBox1 with a number based on the selection made from ComboBox1 (ex. I select Value 1 from ComboBox1 and TextBox1 populates with 124). I made an attempt using this code in the Visual Basic Editor (VBA version 7.0): Sub popBox() If ComboBox1 = "Value 1" Then TextBox1 = "124" End If End Sub My question is what am I doing wrong? Should I be using the VBscript editor, or is using VBA the proper thing to do? Is what I am asking even possible? Thank you all in advance!

    Read the article

  • Defining Proper Classes with Java

    - by user2579706
    Ok, I'm studying Java and have the following question: "Assume you defined a class named MyClass. A student wants to use your class and tries to declare an instance named myObj and instantiate it. He tried the following: MyObj MyClass = new MyClass( ); Why won't his code work? Show how he should correct it. " I'm not sure how to do this? Can anyone point me in the right direction? Many thanks.

    Read the article

  • Unable to connect to Samba printer

    - by user127236
    I have a headless Ubuntu 12.04 server for files and printers. It shares files via Samba just fine. However, the HP PSC-750xi connected to the server via USB is not accessible from my Ubuntu 12.04 laptop. I can browse for it in the Printing control panel, but any attempt to authenticate my ID to the printer with my user credentials results in the error "This print share is not accessible". I have included the Samba smb.conf file below. Any help appreciated. Thanks... JGB # # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors. # A well-established practice is to name the original file # "smb.conf.master" and create the "real" config file with # testparm -s smb.conf.master >smb.conf # This minimizes the size of the really used smb.conf file # which, according to the Samba Team, impacts performance # However, use this with caution if your smb.conf file contains nested # "include" statements. See Debian bug #483187 for a case # where using a master file is not a good idea. # #======================= Global Settings ======================= [global] log file = /var/log/samba/log.%m passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . obey pam restrictions = yes map to guest = bad user encrypt passwords = true passwd program = /usr/bin/passwd %u passdb backend = tdbsam dns proxy = no writeable = yes server string = %h server (Samba, Ubuntu) unix password sync = yes workgroup = WORKGROUP syslog = 0 panic action = /usr/share/samba/panic-action %d usershare allow guests = yes max log size = 1000 pam password change = yes ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of # server string is the equivalent of the NT Description field # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # This will prevent nmbd to search for NetBIOS names through DNS. # What naming service and in what order should we use to resolve host names # to IP addresses ; name resolve order = lmhosts host wins bcast #### Networking #### # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0 # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects # Cap the size of the individual log files (in KiB). # If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. # Do something sensible when Samba crashes: mail the admin a backtrace ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. # security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. # If you are using encrypted passwords, Samba will need to know what # password database type you are using. # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<[email protected]> for # sending the correct chat script for the passwd program in Debian Sarge). # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections ########## Domains ########### # Is this machine able to authenticate users. Both PDC and BDC # must have this setting enabled. If you are the BDC you must # change the 'domain master' setting to no # ; domain logons = yes # # The following setting only takes effect if 'domain logons' is set # It specifies the location of the user's profile directory # from the client point of view) # The following required a [profiles] share to be setup on the # samba server (see below) ; logon path = \\%N\profiles\%U # Another common choice is storing the profile in the user's home directory # (this is Samba's default) # logon path = \\%N\%U\profile # The following setting only takes effect if 'domain logons' is set # It specifies the location of a user's home directory (from the client # point of view) ; logon drive = H: # logon home = \\%N\%U # The following setting only takes effect if 'domain logons' is set # It specifies the script to run during logon. The script must be stored # in the [netlogon] share # NOTE: Must be store in 'DOS' file format convention ; logon script = logon.cmd # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix # password; please adapt to your needs ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u # This allows machine accounts to be created on the domain controller via the # SAMR RPC pipe. # The following assumes a "machines" group exists on the system ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u # This allows Unix groups to be created on the domain controller via the SAMR # RPC pipe. ; add group script = /usr/sbin/addgroup --force-badname %g ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this # load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups ############ Misc ############ # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /home/samba/etc/smb.conf.%m # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 # socket options = TCP_NODELAY # The following parameter is useful only if you have the linpopup package # installed. The samba maintainer and the linpopup maintainer are # working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & # Domain Master specifies Samba to be the Domain Master Browser. If this # machine will be configured as a BDC (a secondary logon server), you # must set this to 'no'; otherwise, the default behavior is recommended. # domain master = auto # Some defaults for winbind (make sure you're not using the ranges # for something else.) ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash # The following was the default behaviour in sarge, # but samba upstream reverted the default because it might induce # performance issues in large organizations. # See Debian bug #368251 for some of the consequences of *not* # having this setting and smb.conf(5) for details. ; winbind enum groups = yes ; winbind enum users = yes # Setup usershare options to enable non-root users to share folders # with the net usershare command. # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home director as \\server\username ;[homes] ; comment = Home Directories ; browseable = no # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. ; read only = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. ; create mask = 0700 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. ; directory mask = 0700 # By default, \\server\username shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \\server\username # The following parameter makes sure that only "username" can connect # # This might need tweaking when using external authentication schemes ; valid users = %S # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) ;[netlogon] ; comment = Network Logon Service ; path = /home/samba/netlogon ; guest ok = yes ; read only = yes # Un-comment the following and create the profiles directory to store # users profiles (see the "logon path" option above) # (you need to configure Samba to act as a domain controller too.) # The path below should be writable by all users so that their # profile directory may be created the first time they log on ;[profiles] ; comment = Users profiles ; path = /home/samba/profiles ; guest ok = no ; browseable = no ; create mask = 0600 ; directory mask = 0700 [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers browseable = yes writeable = no path = /var/lib/samba/printers # Uncomment to allow remote administration of Windows print drivers. # You may need to replace 'lpadmin' with the name of the group your # admin users are members of. # Please note that you also need to set appropriate Unix permissions # to the drivers directory for these users to have write rights in it ; write list = root, @lpadmin # A sample share for sharing your CD-ROM with others. ;[cdrom] ; comment = Samba server's CD-ROM ; read only = yes ; locking = no ; path = /cdrom ; guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain # an entry like this: # # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom [mediafiles] path = /media/multimedia/

    Read the article

  • Combine multiple unix commands into one output

    - by Ben McCormack
    I need to search our mail logs for a specific e-mail address. We keep a current file named maillog as well as a week's worth of .bz2 files in the same folder. Currently, I'm running the following commands to search for the file: grep [email protected] maillog bzgrep [email protected] *.bz2 Is there a way combine the grep and bzgrep commands into a single output? That way, I could pipe the combined results to a single e-mail or a single file.

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >