Skip to content

Instantly share code, notes, and snippets.

@SAW4
Last active August 18, 2017 18:01
Show Gist options
  • Select an option

  • Save SAW4/eb5fc7c6145557ee4884f0c9a42ab904 to your computer and use it in GitHub Desktop.

Select an option

Save SAW4/eb5fc7c6145557ee4884f0c9a42ab904 to your computer and use it in GitHub Desktop.

Revisions

  1. SAW4 revised this gist Aug 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion howto.md
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ ErrorPolicy stop-printer
    </pre>
    # Other useful tools
    `smbtree -U {username}`

    `smbclient -L core -U cubieadmin -W workgroup` - core=domain; cubieadmin=username
    # Tips
    1. Remeber that your remote printing server should not be suspended otherwise the connection will fail
    2. SAMBA is not routable by default, but you can set port-forwarding to router for routing
  2. Sawa revised this gist Jul 14, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion howto.md
    Original file line number Diff line number Diff line change
    @@ -45,4 +45,5 @@ ErrorPolicy stop-printer
    `smbtree -U {username}`

    # Tips
    Remeber that your remote printing server should not be suspended otherwise the connection will fail
    1. Remeber that your remote printing server should not be suspended otherwise the connection will fail
    2. SAMBA is not routable by default, but you can set port-forwarding to router for routing
  3. Sawa revised this gist Jul 14, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ Install stuffs
    `sudo pacman -S samba smbclient cups`
    Launch required services
    `sudo systemctl enable smbd nmbd winbindd` //nmbd may not required, it used to resolve netbios name
    `sudo systemctl start smbd nmbd winbindd`

    ## Config your printer in CUPS
    Go to localhost:631, enter remote printer the address
  4. Sawa revised this gist Jul 14, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ You must stop the cups service first
    Edit the conf file
    `sudo vim /etc/cups/printers.conf`
    It should be looked like this:
    `
    <pre>
    <Printer HP-Deskjet-1050-All-in-One-Printer>
    UUID urn:uuid:e80e3a5f-cca2-3691-7b55-8c7059ba873a
    AuthInfoRequired username,password
    @@ -39,7 +39,7 @@ KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>
    `
    </pre>
    # Other useful tools
    `smbtree -U {username}`

  5. Sawa revised this gist Jul 14, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion howto.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Linux connect to Windows Printer through Samba
    ## The first thing: Install and launch service
    Install stuffs
    Install stuffs
    `sudo pacman -S samba smbclient cups`
    Launch required services
    `sudo systemctl enable smbd nmbd winbindd` //nmbd may not required, it used to resolve netbios name
  6. Sawa revised this gist Jul 14, 2017. 1 changed file with 36 additions and 36 deletions.
    72 changes: 36 additions & 36 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -1,47 +1,47 @@
    # Linux connect to Windows Printer through Samba
    ## The first thing: Install and launch service
    Install stuffs
    `sudo pacman -S samba smbclient cups`
    Launch required services
    `sudo systemctl enable smbd nmbd winbindd` //nmbd may not required, it used to resolve netbios name
    `sudo pacman -S samba smbclient cups`
    Launch required services
    `sudo systemctl enable smbd nmbd winbindd` //nmbd may not required, it used to resolve netbios name

    ## Config your printer in CUPS
    Go to localhost:631, enter remote printer the address
    Your printer's address should look like `smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series`
    format `smb://{WORK_GROUP_NAME}/{print account}:{password}@{Remote server}/{printer name}`
    ## Config your printer in CUPS
    Go to localhost:631, enter remote printer the address
    Your printer's address should look like `smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series`
    format `smb://{WORK_GROUP_NAME}/{print account}:{password}@{Remote server}/{printer name}`

    It should be okay, if not try next step:
    It should be okay, if not try next step:

    ## Set printer address manually
    You must stop the cups service first
    `sudo systemctl start org.cups.cupsd.service`
    Edit the conf file
    `sudo vim /etc/cups/printers.conf`
    It should be looked like this:
    `
    <Printer HP-Deskjet-1050-All-in-One-Printer>
    UUID urn:uuid:e80e3a5f-cca2-3691-7b55-8c7059ba873a
    AuthInfoRequired username,password
    Info HP-Deskjet-1050-All-in-One-Printer
    Location SecretBase
    MakeModel HP Deskjet 1050 j410 Series hpijs, 3.17.6
    DeviceURI smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series
    State Idle
    StateTime 1500012069
    ConfigTime 1500012044
    Type 8425484
    Accepting Yes
    Shared No
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>
    ## Set printer address manually
    You must stop the cups service first
    `sudo systemctl start org.cups.cupsd.service`
    Edit the conf file
    `sudo vim /etc/cups/printers.conf`
    It should be looked like this:
    `
    <Printer HP-Deskjet-1050-All-in-One-Printer>
    UUID urn:uuid:e80e3a5f-cca2-3691-7b55-8c7059ba873a
    AuthInfoRequired username,password
    Info HP-Deskjet-1050-All-in-One-Printer
    Location SecretBase
    MakeModel HP Deskjet 1050 j410 Series hpijs, 3.17.6
    DeviceURI smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series
    State Idle
    StateTime 1500012069
    ConfigTime 1500012044
    Type 8425484
    Accepting Yes
    Shared No
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>
    `
    # Other useful tools
    `smbtree -U {username}`
    `smbtree -U {username}`

    # Tips
    Remeber that your remote printing server should not be suspended otherwise the connection will fail
  7. Sawa created this gist Jul 14, 2017.
    47 changes: 47 additions & 0 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # Linux connect to Windows Printer through Samba
    ## The first thing: Install and launch service
    Install stuffs
    `sudo pacman -S samba smbclient cups`
    Launch required services
    `sudo systemctl enable smbd nmbd winbindd` //nmbd may not required, it used to resolve netbios name

    ## Config your printer in CUPS
    Go to localhost:631, enter remote printer the address
    Your printer's address should look like `smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series`
    format `smb://{WORK_GROUP_NAME}/{print account}:{password}@{Remote server}/{printer name}`

    It should be okay, if not try next step:

    ## Set printer address manually
    You must stop the cups service first
    `sudo systemctl start org.cups.cupsd.service`
    Edit the conf file
    `sudo vim /etc/cups/printers.conf`
    It should be looked like this:
    `
    <Printer HP-Deskjet-1050-All-in-One-Printer>
    UUID urn:uuid:e80e3a5f-cca2-3691-7b55-8c7059ba873a
    AuthInfoRequired username,password
    Info HP-Deskjet-1050-All-in-One-Printer
    Location SecretBase
    MakeModel HP Deskjet 1050 j410 Series hpijs, 3.17.6
    DeviceURI smb://WORKGROUP/smb:password@SAMPC/HP%20Deskjet%201050%20J410%20series
    State Idle
    StateTime 1500012069
    ConfigTime 1500012044
    Type 8425484
    Accepting Yes
    Shared No
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>
    `
    # Other useful tools
    `smbtree -U {username}`

    # Tips
    Remeber that your remote printing server should not be suspended otherwise the connection will fail