Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 05/05/2022, à 14:21

jpt2042

Freebox et ordinateur

Bonjour
Je voudrais voir des vidéos qui sont sur mon ordi depuis ma télévision. Si j'essaie, j'ai un message (sur la tv) qui dit que je dois m'authentifier avec un "username" et un "domain name" au format DOMAIN;USERNAME.
Mon problème est que je ne sais pas où trouver ce nom de domaine.

Merci pour l'information

Jean-Pierre

Hors ligne

#2 Le 05/05/2022, à 14:24

iznobe

Re : Freebox et ordinateur

Bonjour a tout hasard , essaie :
domain=workgroup
username=rien ou vide


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

En ligne

#3 Le 05/05/2022, à 14:36

jpt2042

Re : Freebox et ordinateur

Merci
Cela ne fonctionne pas.
Je suppose que le nom de l'utilisateur est celui que j'ai sous Kubuntu et que le mot de passe est celui de mon ordinateur.

Hors ligne

#4 Le 05/05/2022, à 14:49

iznobe

Re : Freebox et ordinateur

il s' agit d ' un nom de domaine et d ' un nom d ' utilisateur , pas d ' un nom d ' utilisateur et un mot de passe .

Mais bon si tu ne sais pas d ' ou cela provient , ca va etre compliqué roll


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

En ligne

#5 Le 05/05/2022, à 15:05

jpt2042

Re : Freebox et ordinateur

Le message commence par :
"The computer (192.168.1.23) you are trying to connect to requires authetification. Please provide a username using the format DOMAIN;USENAME and a password;"
J'ai essayé de mettre 192.16.1.23;monnom dans le champ Identifiant et le mot de passe de mon Kubuntu dans la champ Mot de Passe, mais cela ne fonctionne pas.

Hors ligne

#6 Le 05/05/2022, à 15:48

iznobe

Re : Freebox et ordinateur

ok , donne ces retours pour voir sur l' ordinateur :

ip a
apt policy samba
cat /etc/samba/smb.conf
ls -l /var/lib/samba/usershares

y a moyen de voir si le serveur samba est actif , mais j ' ai un trou de memoire là roll pour trouver la bonne commande ( alors j ' ai mis 2 autres commandes en remplacement ) , c ' est le resulat qui compte , meme si j' avoue que c ' est moins propre forcement ...
Comme excuse , je dirais que je n' ai pas mon ordi sous la main tongue

c ' est peut etre celle-ci , mais pas sur du tout :

service smbd status

Dernière modification par iznobe (Le 05/05/2022, à 15:56)


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

En ligne

#7 Le 05/05/2022, à 18:32

jpt2042

Re : Freebox et ordinateur

Voici :

jp@cdt1:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 18:60:24:76:a5:8b brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether d4:25:8b:e1:3b:5b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 31452sec preferred_lft 31452sec
    inet6 2a01:e0a:275:ff30:818b:dec8:3694:6cbd/64 scope global temporary dynamic 
       valid_lft 86247sec preferred_lft 74395sec
    inet6 2a01:e0a:275:ff30:9809:2b6d:4138:be55/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 86247sec preferred_lft 86247sec
    inet6 fe80::772b:e0f2:ae79:3efc/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
jp@cdt1:~$ apt policy samba
samba:
  Installé : 2:4.15.5~dfsg-0ubuntu5
  Candidat : 2:4.15.5~dfsg-0ubuntu5
 Table de version :
 *** 2:4.15.5~dfsg-0ubuntu5 500
        500 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
jp@cdt1:~$ cat /etc/samba/smb.conf
#
# 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. 

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

#### 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
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
   logging = file

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

   obey pam restrictions = yes

# 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.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# 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'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = classic
# primary domain controller', 'server role = classic backup domain controller'
# or '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

############ 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

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 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
   usershare allow guests = yes

#======================= 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 directory 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
# 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
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# 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
jp@cdt1:~$ ls -l /var/lib/samba/usershares
total 0
p@cdt1:~$ service smbd status
● smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-05-05 13:57:57 CEST; 4h 32min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 1063 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
   Main PID: 1068 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 4 (limit: 9264)
     Memory: 17.9M
        CPU: 2.776s
     CGroup: /system.slice/smbd.service
             ├─1068 /usr/sbin/smbd --foreground --no-process-group
             ├─1088 /usr/sbin/smbd --foreground --no-process-group
             ├─1089 /usr/sbin/smbd --foreground --no-process-group
             └─1110 /usr/lib/x86_64-linux-gnu/samba/samba-bgqd --ready-signal-fd=45 --parent-watch-fd=11 --debug>

mai 05 15:23:04 cdt1 smbd[5582]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:04 cdt1 smbd[5586]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:06 cdt1 smbd[5588]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:10 cdt1 smbd[5592]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:10 cdt1 smbd[5590]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:10 cdt1 smbd[5594]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:13 cdt1 smbd[5598]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:13 cdt1 smbd[5596]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:13 cdt1 smbd[5600]: pam_unix(samba:session): session closed for user nobody
mai 05 15:23:15 cdt1 smbd[5602]: pam_unix(samba:session): session closed for user nobody
lines 1-28/28 (END)

Hors ligne

#8 Le 05/05/2022, à 19:18

iznobe

Re : Freebox et ordinateur

Alors , avec les retours que tu viens de donner , on voit que la tele detecte bien ton ordinateur connecté en wifi avec l' adresse ipv4 192.168.1.23 , que tu as installé samba , qu ' il fonctionne correctement , mais que tu n' as configuré aucun partage .

Alors 1ere chose ( avant que j' oublie ) il faut definir un mot de passe pour le partage samba avec cette commande :

sudo smbpwd -a

je te conseille fortement de mettre le meme mot de passe que lorsque tu te connectes a ta session .

une fois cela fait , il faut definir un partage , tu as parlé semble t ' il de videos ( tu me diras ca semble logique pour une TV ) , donc voici comment proceder en expres , edition du fichier smb.conf pour y ajouter la partage :

sudo nano /etc/samba/smb.conf

tu descends tout en bas du fichier avec la fleche , puis tu ajoutes une section comme cela , en remplacant par les bons chemin de fichiers / dossiers / nom  :

[Vidéos]
    path = /Vidéos # remplace par ton chemin a toi ver le dossier contenant les videos que tu desires partager .
    browseable = yes
    read only = yes
    valid users = @iznobe  # remplace par ton d ' utilisateur a toi 
    write list = @iznobe # remplace par ton d ' utilisateur a toi
    force user = iznobe # remplace par ton d ' utilisateur a toi
    force group = iznobe # remplace par ton d ' utilisateur a toi
    guest ok = no
    create mask = 0744
    directory mask = 0755

Ensuite , si ton edition est conforme a tes attentes , tu appuies sur ctrl+x , o , entrée pour valider et sauvegarder ,
sinon tu appuies sur ctrl+x , n , entrée pour quitter sans sauvegarder .

pour prendre en compte les changements tu passes :

sudo service smbd restart

ensuite tu vas sur la tv , les infos sont les suivantes :
domain = WORKGROUP
username = ton nom d' utilisateur
password = ton mot de passe de session si tu as suivi mon conseil .

Et alors la magie devrait operer big_smile

Dernière modification par iznobe (Le 05/05/2022, à 19:25)


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

En ligne

#9 Le 06/05/2022, à 10:34

jpt2042

Re : Freebox et ordinateur

J'ai fait tout ce que tu m'as dit, mais je me fais toujours jeter.

Il y a une différence, quand même. Avant, le message commençait par "The computer (192.168.1.23) you are trying to connect to requires authentification. Please provide a username using the format DOMAIN;USENAME and a password;"
Maintenant, c'est "The computer (CDT1) you are trying to connect to requires authentification. Please provide a username using the format DOMAIN;USENAME and a password;"
CDT1 est le nom que j'ai donné à l'ordinateur quand j'ai installé Kubuntu.
Comme DOMAIN, j'ai essayé WORKGROUP et CDT1.

JP

Hors ligne

#10 Le 06/05/2022, à 10:38

iznobe

Re : Freebox et ordinateur

Bonjour , installe smbclient :

sudo apt install smbclient

et donne le retour de commande suivante :

smbclient -L 127.0.0.1

ainsi que

testparm

retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

En ligne

#11 Le 06/05/2022, à 14:24

jpt2042

Re : Freebox et ordinateur

smbclient était déjà installé.
Voici les deux commandes :

$ smbclient -L 127.0.0.1
Password for [WORKGROUP\jp]:

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        Vidéos         Disk      
        IPC$            IPC       IPC Service (cdt1 server (Samba, Ubuntu))
        HP_ENVY_5640_series Printer   HP ENVY 5640 series
SMB1 disabled -- no workgroup available
$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb

[printers]
        browseable = No
        comment = All Printers
        create mask = 0700
        path = /var/spool/samba
        printable = Yes

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers

[Vidéos]
        directory mask = 0075
        force group = jp
        force user = jp
        path = /home/jp/Vidéos
        valid users = @jp
        write list = @iznobejp

Hors ligne