Results 1 to 3 of 3

Thread: QProcces and smbclient

  1. #1
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question QProcces and smbclient

    Hi everybody.

    I am doing a simple app that look for shared folders in a remote computer, using QProcess class to launch the smbclient process.

    When I execute in a system console the following command:
    Qt Code:
    1. smbclient -L IP -U student%1234567
    To copy to clipboard, switch view to plain text mode 

    where IP is the computer address, student is the user on the remote computer, and 1234567 his password to access it, I get a list of shared resources, otherwise, with the following code in QT4:
    Qt Code:
    1. QStringList params;
    2. params <<"-L" << lineEdit->text()<<"-U student%1234567" ;
    3. miProceso->start("smbclient",parametros);
    To copy to clipboard, switch view to plain text mode 

    I got just a session setup failed: NT_STATUS_LOGON_FAILURE .
    lineEdit is used to enter manually the IP address of the computer.
    miProceso is an object of type QProcess.

    Some help would be fine.

    Regards!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QProcces and smbclient

    try adding spaces:
    Qt Code:
    1. params <<"-L " << lineEdit->text()<<" -U student%1234567" ;
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    drake1983 (12th December 2007)

  4. #3
    Join Date
    Mar 2007
    Posts
    31
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QProcces and smbclient

    Thanks,

    Now It works:

    Qt Code:
    1. params <<"-L" << lineEdit->text()<<"-U"<<"student%1234567" ;
    To copy to clipboard, switch view to plain text mode 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.