diff --git a/net/Makefile b/net/Makefile index 44a1130e2c68..a27797afb95c 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1,1613 +1,1614 @@ COMMENT = Networking tools SUBDIR += 3proxy SUBDIR += 44bsd-rdist SUBDIR += 6tunnel SUBDIR += R-cran-pingr SUBDIR += R-cran-twitteR SUBDIR += Sockets SUBDIR += activemq SUBDIR += addrwatch SUBDIR += afpfs-ng SUBDIR += aget SUBDIR += akonadi-calendar SUBDIR += akonadi-contacts SUBDIR += akonadi-mime SUBDIR += akonadi-notes SUBDIR += akonadi-search SUBDIR += aluminum SUBDIR += aoe SUBDIR += apache-commons-net SUBDIR += apinger SUBDIR += aprsc SUBDIR += aquantia-atlantic-kmod SUBDIR += arataga SUBDIR += arp-scan SUBDIR += arp-sk SUBDIR += arpdig SUBDIR += arping SUBDIR += arpoison SUBDIR += arprelease SUBDIR += asio SUBDIR += aslookup SUBDIR += asterisk-chan_sccp SUBDIR += asterisk-g72x SUBDIR += asterisk16 SUBDIR += asterisk18 SUBDIR += astron SUBDIR += avahi SUBDIR += avahi-app SUBDIR += avahi-autoipd SUBDIR += avahi-gtk SUBDIR += avahi-gtk3 SUBDIR += avahi-header SUBDIR += avahi-libdns SUBDIR += avahi-qt5 SUBDIR += avahi-sharp SUBDIR += axa SUBDIR += babeld SUBDIR += balance SUBDIR += bctoolbox SUBDIR += beacon SUBDIR += beanstalkd SUBDIR += belle-sip SUBDIR += bindtest SUBDIR += binkd SUBDIR += bird SUBDIR += bird2 SUBDIR += bittwist SUBDIR += bmon SUBDIR += boinc-client SUBDIR += boinc_curses SUBDIR += bosh-bootloader SUBDIR += bosh-cli SUBDIR += bounce SUBDIR += bredbandskollen SUBDIR += bsdec2-image-upload SUBDIR += bsdrcmds SUBDIR += bwi-firmware-kmod SUBDIR += bwn-firmware-kmod SUBDIR += bwping SUBDIR += c3270 SUBDIR += calendarsupport SUBDIR += ccxstream SUBDIR += ceph14 SUBDIR += cf SUBDIR += charm SUBDIR += chrony SUBDIR += chrony-lite SUBDIR += citrix_ica SUBDIR += cjdns SUBDIR += clash SUBDIR += cloud-init SUBDIR += cloud-init-devel SUBDIR += cloudflared SUBDIR += cloudquery SUBDIR += clusterit SUBDIR += cnd SUBDIR += concourse-fly SUBDIR += corkscrew SUBDIR += corosync2 SUBDIR += corosync3 SUBDIR += courier-authlib-ldap SUBDIR += courier-sox SUBDIR += cpp-pcp-client SUBDIR += cppzmq SUBDIR += croc SUBDIR += cryptcat SUBDIR += csocks SUBDIR += csync2 SUBDIR += ctrace SUBDIR += cvsup-static SUBDIR += cvsync SUBDIR += czmq SUBDIR += czmq4 SUBDIR += daemonlogger SUBDIR += dante SUBDIR += daq SUBDIR += datapipe SUBDIR += dbeacon SUBDIR += delegate SUBDIR += deviceatlas-enterprise-c SUBDIR += dgd SUBDIR += dgd-kernel SUBDIR += dgd-lpmud SUBDIR += dhcp6 SUBDIR += dhcpcd SUBDIR += dhcpcd-ui SUBDIR += dhcpd SUBDIR += dhcpd-pools SUBDIR += dhcpdump SUBDIR += dhcperf SUBDIR += dhcping SUBDIR += dhcprelya SUBDIR += dictd SUBDIR += dimes SUBDIR += dpdk SUBDIR += dpdk-20.11 SUBDIR += dpinger SUBDIR += drawterm SUBDIR += drive SUBDIR += dropbox-api-command SUBDIR += dropbox-uploader SUBDIR += dshell SUBDIR += dtcp SUBDIR += dtcpclient SUBDIR += dual-dhclient SUBDIR += dual-dhclient-daemon SUBDIR += easysoap SUBDIR += echoping SUBDIR += empty SUBDIR += endlessh SUBDIR += enet SUBDIR += eternalterminal SUBDIR += evans SUBDIR += eventviews SUBDIR += exabgp4 SUBDIR += fb303 SUBDIR += fbzmq SUBDIR += fiche SUBDIR += file2pcap SUBDIR += findmtu SUBDIR += findomain SUBDIR += flower SUBDIR += foreman-proxy SUBDIR += fort SUBDIR += fpc-ldap SUBDIR += fpc-libenet SUBDIR += fpc-pcap SUBDIR += fping SUBDIR += freebsd-telnetd SUBDIR += freebsd-uucp SUBDIR += freediameter SUBDIR += freeradius-client SUBDIR += freeradius3 SUBDIR += freerdp SUBDIR += freeswitch SUBDIR += freevrrpd SUBDIR += frp SUBDIR += frr7 SUBDIR += frr7-pythontools SUBDIR += frr8 SUBDIR += frr8-pythontools SUBDIR += fspclient SUBDIR += fspd SUBDIR += fsplib SUBDIR += gamenetworkingsockets SUBDIR += gdrive SUBDIR += gemserv SUBDIR += geoclue SUBDIR += geocode-glib SUBDIR += geoipupdate SUBDIR += gerbera SUBDIR += gfbgraph SUBDIR += gitlab-agent SUBDIR += gitup SUBDIR += glflow SUBDIR += glib-networking SUBDIR += glusterfs SUBDIR += gmid SUBDIR += gnet2 SUBDIR += gnetcat SUBDIR += gnome-connections SUBDIR += gnome-nettool SUBDIR += gnome-online-accounts SUBDIR += gnome-online-miners SUBDIR += gnu-dico SUBDIR += gnu-radius SUBDIR += go-bapu SUBDIR += go-cs SUBDIR += gobgp SUBDIR += gofish SUBDIR += google-cloud-sdk SUBDIR += gopher SUBDIR += goreplay SUBDIR += gorss SUBDIR += gotthard SUBDIR += gq SUBDIR += graphpath SUBDIR += grilo SUBDIR += grilo-plugins SUBDIR += grive2 SUBDIR += grpcox SUBDIR += grpcui SUBDIR += grpcurl SUBDIR += grsync SUBDIR += gscloud SUBDIR += gsk SUBDIR += gsocket SUBDIR += gspoof SUBDIR += gssdp SUBDIR += gssdp14 SUBDIR += gstreamer1-plugins-srtp SUBDIR += gtk-vnc SUBDIR += guacamole-server SUBDIR += gupnp SUBDIR += gupnp-av SUBDIR += gupnp-dlna SUBDIR += gupnp-igd SUBDIR += gupnp-tools SUBDIR += gupnp-ui SUBDIR += gupnp14 SUBDIR += gutenfetch SUBDIR += gwhois SUBDIR += h323plus SUBDIR += hanstunnel SUBDIR += haproxy SUBDIR += haproxy-devel SUBDIR += haproxy17 SUBDIR += haproxy18 SUBDIR += haproxy20 SUBDIR += haproxy22 SUBDIR += haproxy23 SUBDIR += haproxy24 SUBDIR += haproxy25 SUBDIR += hblock SUBDIR += hexinject SUBDIR += hlmaster SUBDIR += honeyd SUBDIR += hostapd SUBDIR += hostapd-devel SUBDIR += hostapd29 SUBDIR += hping3 SUBDIR += hsflowd SUBDIR += htpdate SUBDIR += http_ping SUBDIR += httping SUBDIR += httpry SUBDIR += iaxmodem SUBDIR += icmpinfo SUBDIR += icpld SUBDIR += ifdepd SUBDIR += iffinder SUBDIR += ifstat SUBDIR += ifstated SUBDIR += igmpproxy SUBDIR += iipsrv SUBDIR += ilbc SUBDIR += imapproxy SUBDIR += incidenceeditor SUBDIR += intel-em-kmod SUBDIR += intel-ix-kmod SUBDIR += intel-ixl-kmod SUBDIR += iodine SUBDIR += ip2location SUBDIR += ip2proxy SUBDIR += ip6_int SUBDIR += ipdecap SUBDIR += ipgrab SUBDIR += ipinfo-cli SUBDIR += ipsumdump SUBDIR += ipsvd SUBDIR += ipxe SUBDIR += irrd SUBDIR += isboot-kmod SUBDIR += isc-dhcp44-client SUBDIR += isc-dhcp44-relay SUBDIR += isc-dhcp44-server SUBDIR += istgt SUBDIR += iwnet SUBDIR += java-beepcore SUBDIR += jcifs SUBDIR += jgroups SUBDIR += jicmp SUBDIR += jicmp6 SUBDIR += jose SUBDIR += jotta-cli SUBDIR += jrdesktop SUBDIR += jsch SUBDIR += jumpgate SUBDIR += jwhois SUBDIR += k6 SUBDIR += kafka SUBDIR += kamailio SUBDIR += kcalutils SUBDIR += kcat SUBDIR += kdenetwork SUBDIR += kdenetwork-filesharing SUBDIR += kea SUBDIR += keycloak SUBDIR += kf5-kcalendarcore SUBDIR += kf5-kcontacts SUBDIR += kf5-kdav SUBDIR += kf5-kholidays SUBDIR += kf5-kxmlrpcclient SUBDIR += kf5-syndication SUBDIR += kget SUBDIR += kidentitymanagement SUBDIR += kimap SUBDIR += kio-gdrive SUBDIR += kio-zeroconf SUBDIR += kippo SUBDIR += kitinerary SUBDIR += kldap SUBDIR += kmailtransport SUBDIR += kmbox SUBDIR += kmime SUBDIR += knc SUBDIR += knxd SUBDIR += kontactinterface SUBDIR += kpeoplevcard SUBDIR += kpimtextedit SUBDIR += krdc SUBDIR += krfb SUBDIR += krill SUBDIR += ksmtp SUBDIR += ktnef SUBDIR += kube-controller-manager SUBDIR += kube-scheduler SUBDIR += l2tpd SUBDIR += ladvd SUBDIR += lambdamoo SUBDIR += landrop SUBDIR += latd SUBDIR += ldap-stats SUBDIR += ldapbrowser SUBDIR += ldapdiff SUBDIR += ldapscripts SUBDIR += ldapsdk SUBDIR += ldapsh SUBDIR += leproxy SUBDIR += lft SUBDIR += libarcus SUBDIR += libarms SUBDIR += libbgpdump SUBDIR += libcapn SUBDIR += libcharon SUBDIR += libcmis SUBDIR += libcoap SUBDIR += libdaq SUBDIR += libdmapsharing SUBDIR += libdnet SUBDIR += libexosip2 SUBDIR += libfabric SUBDIR += libfb SUBDIR += libfixbuf SUBDIR += libgravatar SUBDIR += libgrss SUBDIR += libgweather SUBDIR += libgweather4 SUBDIR += libilbc SUBDIR += libiscsi SUBDIR += libkgapi SUBDIR += libksieve SUBDIR += libkvkontakte SUBDIR += liblinphone SUBDIR += libmaia SUBDIR += libmateweather SUBDIR += libmaxminddb SUBDIR += libmdf SUBDIR += libmediawiki SUBDIR += libnatpmp SUBDIR += libnet SUBDIR += libnfs SUBDIR += libngtcp2 SUBDIR += libnids SUBDIR += libnpupnp SUBDIR += libnss-cache SUBDIR += libnss-mysql SUBDIR += libnss-pgsql SUBDIR += liboauth SUBDIR += libopennet SUBDIR += liboping SUBDIR += libosip2 SUBDIR += libpaho-mqtt3 SUBDIR += libpcap SUBDIR += libpcapnav SUBDIR += libpfctl SUBDIR += libproxy SUBDIR += libproxy-gnome3 SUBDIR += libproxy-kde SUBDIR += libproxy-pacrunner SUBDIR += libproxy-perl SUBDIR += libproxy-python SUBDIR += libproxy-webkit3 SUBDIR += librdkafka SUBDIR += librespeed-cli SUBDIR += librespeed-go SUBDIR += librsync SUBDIR += libsignal-protocol-c SUBDIR += libslirp SUBDIR += libsrtp2 SUBDIR += libtnl SUBDIR += libtrace SUBDIR += libunp SUBDIR += libusipp SUBDIR += libusrsctp SUBDIR += libutp SUBDIR += libvncserver SUBDIR += libwebsockets SUBDIR += libyang SUBDIR += libyang2 SUBDIR += libzapojit SUBDIR += libzmq2 SUBDIR += libzmq3 SUBDIR += libzmq4 SUBDIR += liferea SUBDIR += linknx SUBDIR += linphone SUBDIR += linux-c7-avahi-libs SUBDIR += linux-c7-openldap SUBDIR += linux-c7-tcp_wrappers-libs SUBDIR += liveMedia SUBDIR += lla SUBDIR += lualdap SUBDIR += luasocket SUBDIR += mDNSResponder SUBDIR += macchanger SUBDIR += mad_fcl SUBDIR += madonctl SUBDIR += mailcommon SUBDIR += mailimporter SUBDIR += malo-firmware-kmod SUBDIR += mcjoin SUBDIR += mdns-repeater SUBDIR += measurement-kit SUBDIR += mediastreamer SUBDIR += megacmd SUBDIR += megatools SUBDIR += messagelib SUBDIR += mgen SUBDIR += micro_inetd SUBDIR += micro_proxy SUBDIR += microsocks SUBDIR += minidlna SUBDIR += minisapserver SUBDIR += minissdpd SUBDIR += miniupnpc SUBDIR += miniupnpd SUBDIR += miredo SUBDIR += miruo SUBDIR += mlvpn SUBDIR += mobile-broadband-provider-info SUBDIR += mod_amd SUBDIR += mopd SUBDIR += mosh SUBDIR += mosquitto SUBDIR += motsognir SUBDIR += mpd-l2tp-ipv6pd-client SUBDIR += mpd5 SUBDIR += mpich SUBDIR += mpifx SUBDIR += mping SUBDIR += mptsd SUBDIR += mrouted SUBDIR += mrtparse SUBDIR += msend SUBDIR += msoak SUBDIR += mtr SUBDIR += mtr-nox11 SUBDIR += multicat SUBDIR += mvfst SUBDIR += nakenchat SUBDIR += nanomsg SUBDIR += nast SUBDIR += nats-nkeys SUBDIR += nats-nsc SUBDIR += nats-server SUBDIR += nats-streaming-server SUBDIR += nats-top SUBDIR += natscli SUBDIR += nbd-server SUBDIR += nbdkit SUBDIR += nc SUBDIR += ncp SUBDIR += ndisc6 SUBDIR += ndpi SUBDIR += ndproxy SUBDIR += neatvnc SUBDIR += nemesis SUBDIR += nepenthes SUBDIR += net6 SUBDIR += netatalk3 SUBDIR += netcat SUBDIR += netembryo SUBDIR += nethogs SUBDIR += netmap SUBDIR += netpipes SUBDIR += netscript SUBDIR += netsed SUBDIR += netselect SUBDIR += netstrain SUBDIR += netwib SUBDIR += nfs-ganesha-kmod SUBDIR += nfsshell SUBDIR += nfstrace SUBDIR += ng_mikrotik_eoip SUBDIR += ngrep SUBDIR += nifmon SUBDIR += nitroshare SUBDIR += nload SUBDIR += nmsg SUBDIR += nncp SUBDIR += nng SUBDIR += norm SUBDIR += ns3 SUBDIR += nsq SUBDIR += nss-pam-ldapd SUBDIR += nss-pam-ldapd-sasl SUBDIR += nss_ldap SUBDIR += nsscache SUBDIR += ntimed SUBDIR += ntopng SUBDIR += ntp SUBDIR += ntpa SUBDIR += ntpsec SUBDIR += ntraceroute SUBDIR += nusoap SUBDIR += nuster SUBDIR += nxproxy SUBDIR += nyancat SUBDIR += nylon SUBDIR += ocserv SUBDIR += oha SUBDIR += olsrd SUBDIR += omnitty SUBDIR += onedrive SUBDIR += onenetd SUBDIR += onioncat SUBDIR += onionprobe SUBDIR += ooni-mini SUBDIR += ooni-probe-cli SUBDIR += opal SUBDIR += open-isns SUBDIR += openbgpd SUBDIR += openbgpd6 SUBDIR += openbgpd7 SUBDIR += openldap24-client SUBDIR += openldap24-server SUBDIR += openldap25-client SUBDIR += openldap25-server SUBDIR += openldap26-client SUBDIR += openldap26-server SUBDIR += openmdns SUBDIR += openmpi SUBDIR += openmpi3 SUBDIR += openntpd SUBDIR += opennx SUBDIR += openpgm SUBDIR += openradius SUBDIR += openrsync SUBDIR += opensips31 SUBDIR += openslp SUBDIR += opentracker SUBDIR += openvswitch SUBDIR += ortp SUBDIR += osrtspproxy SUBDIR += ossp-sa SUBDIR += owamp SUBDIR += p5-Acme-HTTP SUBDIR += p5-AddressBook SUBDIR += p5-Amazon-SQS-Simple SUBDIR += p5-AnyEvent-MPRPC SUBDIR += p5-AnyEvent-MQTT SUBDIR += p5-AnyEvent-RabbitMQ SUBDIR += p5-AnyEvent-Twitter SUBDIR += p5-AnyEvent-Twitter-Stream SUBDIR += p5-AnyMQ-AMQP SUBDIR += p5-Apache2-SOAP SUBDIR += p5-BBS-Client SUBDIR += p5-BBS-UserInfo SUBDIR += p5-BBS-UserInfo-Maple3 SUBDIR += p5-BBS-UserInfo-Maple3itoc SUBDIR += p5-BBS-UserInfo-Ptt SUBDIR += p5-BBS-UserInfo-SOB SUBDIR += p5-BBS-UserInfo-Wretch SUBDIR += p5-Beanstalk-Client SUBDIR += p5-Cisco-IPPhone SUBDIR += p5-Crypt-DH-GMP SUBDIR += p5-Daemon-Generic SUBDIR += p5-Data-IPV4-Range-Parse SUBDIR += p5-EasyTCP SUBDIR += p5-Event-tcp SUBDIR += p5-File-Rsync SUBDIR += p5-File-RsyncP SUBDIR += p5-Frontier-RPC SUBDIR += p5-Geo-IP-PurePerl SUBDIR += p5-Geo-IPfree SUBDIR += p5-GeoIP2 SUBDIR += p5-Google-SAML-Request SUBDIR += p5-Google-SAML-Response SUBDIR += p5-Growl-GNTP SUBDIR += p5-IO-Interface SUBDIR += p5-IO-Socket-INET6 SUBDIR += p5-IO-Socket-IP SUBDIR += p5-IO-Socket-Multicast SUBDIR += p5-IO-Socket-Multicast6 SUBDIR += p5-IO-Socket-Socks SUBDIR += p5-IO-Socket-Socks-Wrapper SUBDIR += p5-IO-Socket-Timeout SUBDIR += p5-IO-Socket-UNIX-Util SUBDIR += p5-IP-Anonymous SUBDIR += p5-IP-Country SUBDIR += p5-IPC-Session SUBDIR += p5-IPv6-Address SUBDIR += p5-JavaScript-RPC SUBDIR += p5-Kafka SUBDIR += p5-MaxMind-DB-Common SUBDIR += p5-MaxMind-DB-Reader SUBDIR += p5-MaxMind-DB-Reader-XS SUBDIR += p5-MaxMind-DB-Writer SUBDIR += p5-Mojo-RabbitMQ-Client SUBDIR += p5-Net SUBDIR += p5-Net-ACME2 SUBDIR += p5-Net-AMQP SUBDIR += p5-Net-AMQP-RabbitMQ SUBDIR += p5-Net-APNS SUBDIR += p5-Net-APNs-Extended SUBDIR += p5-Net-ARP SUBDIR += p5-Net-Address-Ethernet SUBDIR += p5-Net-Address-IPv4-Local SUBDIR += p5-Net-Amazon SUBDIR += p5-Net-Amazon-AWSSign SUBDIR += p5-Net-Amazon-EC2 SUBDIR += p5-Net-Amazon-MechanicalTurk SUBDIR += p5-Net-Amazon-S3 SUBDIR += p5-Net-Amazon-Signature SUBDIR += p5-Net-Amazon-Signature-V3 SUBDIR += p5-Net-Amazon-Signature-V4 SUBDIR += p5-Net-Amazon-Thumbnail SUBDIR += p5-Net-Analysis SUBDIR += p5-Net-Appliance-Phrasebook SUBDIR += p5-Net-Appliance-Session SUBDIR += p5-Net-BGP SUBDIR += p5-Net-Blogger SUBDIR += p5-Net-CIDR-Lite SUBDIR += p5-Net-CIDR-MobileJP SUBDIR += p5-Net-CIDR-Set SUBDIR += p5-Net-CLI-Interact SUBDIR += p5-Net-CSTA SUBDIR += p5-Net-CascadeCopy SUBDIR += p5-Net-Cassandra SUBDIR += p5-Net-Cassandra-Easy SUBDIR += p5-Net-Connection SUBDIR += p5-Net-Connection-Match SUBDIR += p5-Net-Connection-Sort SUBDIR += p5-Net-Connection-lsof SUBDIR += p5-Net-Connection-ncnetstat SUBDIR += p5-Net-DAV-Server SUBDIR += p5-Net-DHCP SUBDIR += p5-Net-DHCP-Watch SUBDIR += p5-Net-DHCPClient SUBDIR += p5-Net-DLookup SUBDIR += p5-Net-Daemon SUBDIR += p5-Net-Delicious SUBDIR += p5-Net-Dict SUBDIR += p5-Net-Divert SUBDIR += p5-Net-Dropbox-API SUBDIR += p5-Net-EPP SUBDIR += p5-Net-EPP-Proxy SUBDIR += p5-Net-FS-Flickr SUBDIR += p5-Net-FS-Gmail SUBDIR += p5-Net-FTP-AutoReconnect SUBDIR += p5-Net-FTP-File SUBDIR += p5-Net-Finger SUBDIR += p5-Net-Flow SUBDIR += p5-Net-Frame SUBDIR += p5-Net-Frame-Device SUBDIR += p5-Net-Frame-Dump SUBDIR += p5-Net-Frame-Layer-ICMPv6 SUBDIR += p5-Net-Frame-Layer-IPv6 SUBDIR += p5-Net-Frame-Simple SUBDIR += p5-Net-GitHub SUBDIR += p5-Net-Gnats SUBDIR += p5-Net-Google SUBDIR += p5-Net-Google-Analytics SUBDIR += p5-Net-Google-AuthSub SUBDIR += p5-Net-Google-Calendar SUBDIR += p5-Net-Google-Code SUBDIR += p5-Net-Google-DataAPI SUBDIR += p5-Net-Google-PicasaWeb SUBDIR += p5-Net-Google-SafeBrowsing2 SUBDIR += p5-Net-Google-Spreadsheets SUBDIR += p5-Net-Growl SUBDIR += p5-Net-GrowlClient SUBDIR += p5-Net-HL7 SUBDIR += p5-Net-HTTP SUBDIR += p5-Net-HTTP-Spore SUBDIR += p5-Net-HTTP-Spore-Middleware-Header SUBDIR += p5-Net-HTTPS-Any SUBDIR += p5-Net-HTTPS-NB SUBDIR += p5-Net-Hiveminder SUBDIR += p5-Net-INET6Glue SUBDIR += p5-Net-IP-Minimal SUBDIR += p5-Net-IP-RangeCompare SUBDIR += p5-Net-IPTrie SUBDIR += p5-Net-IRR SUBDIR += p5-Net-Ident SUBDIR += p5-Net-Ifconfig-Wrapper SUBDIR += p5-Net-Interface SUBDIR += p5-Net-Jifty SUBDIR += p5-Net-LDAP-AutoDNs SUBDIR += p5-Net-LDAP-AutoServer SUBDIR += p5-Net-LDAP-Express SUBDIR += p5-Net-LDAP-FilterBuilder SUBDIR += p5-Net-LDAP-LDAPhash SUBDIR += p5-Net-LDAP-Makepath SUBDIR += p5-Net-LDAP-Server SUBDIR += p5-Net-LDAP-Server-Test SUBDIR += p5-Net-LDAP-posixAccount SUBDIR += p5-Net-LDAP-posixGroup SUBDIR += p5-Net-Libdnet SUBDIR += p5-Net-Libdnet6 SUBDIR += p5-Net-LimeLight-Purge SUBDIR += p5-Net-MAC SUBDIR += p5-Net-MAC-Vendor SUBDIR += p5-Net-MQTT SUBDIR += p5-Net-Mosso-CloudFiles SUBDIR += p5-Net-MovableType SUBDIR += p5-Net-NBName SUBDIR += p5-Net-NBsocket SUBDIR += p5-Net-NIS SUBDIR += p5-Net-NIS-Listgroup SUBDIR += p5-Net-NTP SUBDIR += p5-Net-Nessus-XMLRPC SUBDIR += p5-Net-Netcat SUBDIR += p5-Net-Nmsg SUBDIR += p5-Net-OAuth SUBDIR += p5-Net-OAuth-Simple SUBDIR += p5-Net-OAuth2 SUBDIR += p5-Net-OpenID-Consumer SUBDIR += p5-Net-OpenSSH SUBDIR += p5-Net-OpenSSH-Parallel SUBDIR += p5-Net-OpenStack-Attack SUBDIR += p5-Net-Packet SUBDIR += p5-Net-Packet-Target SUBDIR += p5-Net-ParseWhois SUBDIR += p5-Net-Patricia SUBDIR += p5-Net-Pcap SUBDIR += p5-Net-PcapUtils SUBDIR += p5-Net-Ping SUBDIR += p5-Net-Ping-External SUBDIR += p5-Net-Proxy SUBDIR += p5-Net-PubSubHubbub-Publisher SUBDIR += p5-Net-RTP SUBDIR += p5-Net-RabbitFoot SUBDIR += p5-Net-RabbitMQ SUBDIR += p5-Net-Radius SUBDIR += p5-Net-Random SUBDIR += p5-Net-RawIP SUBDIR += p5-Net-Rendezvous-Publish SUBDIR += p5-Net-Riak SUBDIR += p5-Net-Rsh SUBDIR += p5-Net-SAP SUBDIR += p5-Net-SCP SUBDIR += p5-Net-SCP-Expect SUBDIR += p5-Net-SDP SUBDIR += p5-Net-SFTP SUBDIR += p5-Net-SFTP-Foreign SUBDIR += p5-Net-SIP SUBDIR += p5-Net-SMPP SUBDIR += p5-Net-SMS-Clickatell SUBDIR += p5-Net-SMS-Mollie SUBDIR += p5-Net-SMS-PChome SUBDIR += p5-Net-SNPP SUBDIR += p5-Net-SPDY SUBDIR += p5-Net-SSH SUBDIR += p5-Net-SSH-Expect SUBDIR += p5-Net-SSH-Mechanize SUBDIR += p5-Net-SSH-Perl SUBDIR += p5-Net-SSH2 SUBDIR += p5-Net-STOMP-Client SUBDIR += p5-Net-Server SUBDIR += p5-Net-Server-Coro SUBDIR += p5-Net-Server-SS-PreFork SUBDIR += p5-Net-Subnet SUBDIR += p5-Net-Syslog SUBDIR += p5-Net-TCLink SUBDIR += p5-Net-TacacsPlus SUBDIR += p5-Net-TcpDumpLog SUBDIR += p5-Net-Telnet SUBDIR += p5-Net-Telnet-Netscreen SUBDIR += p5-Net-TiVo SUBDIR += p5-Net-Todoist SUBDIR += p5-Net-Traceroute SUBDIR += p5-Net-Traceroute-PurePerl SUBDIR += p5-Net-Traceroute6 SUBDIR += p5-Net-Trackback SUBDIR += p5-Net-Twitter SUBDIR += p5-Net-Twitter-Lite SUBDIR += p5-Net-VNC SUBDIR += p5-Net-Wake SUBDIR += p5-Net-WhitePages SUBDIR += p5-Net-Whois SUBDIR += p5-Net-Whois-ARIN SUBDIR += p5-Net-Whois-IP SUBDIR += p5-Net-Whois-RIPE SUBDIR += p5-Net-Whois-Raw SUBDIR += p5-Net-Works SUBDIR += p5-Net-Write SUBDIR += p5-Net-XWhois SUBDIR += p5-Net-Yadis SUBDIR += p5-Net-Z3950-SimpleServer SUBDIR += p5-Net-Z3950-ZOOM SUBDIR += p5-Net-ext SUBDIR += p5-Net-sFlow SUBDIR += p5-Net-uFTP SUBDIR += p5-NetAddr-IP-Count SUBDIR += p5-NetAddr-MAC SUBDIR += p5-NetPacket SUBDIR += p5-OAI-Harvester SUBDIR += p5-OurNet-BBS SUBDIR += p5-OurNet-BBSAgent SUBDIR += p5-POE-Component-Client-Ident SUBDIR += p5-POE-Component-Client-Keepalive SUBDIR += p5-POE-Component-Client-Ping SUBDIR += p5-POE-Component-Client-Telnet SUBDIR += p5-POE-Component-Client-Traceroute SUBDIR += p5-POE-Component-Client-Twitter SUBDIR += p5-POE-Component-Client-Whois SUBDIR += p5-POE-Component-ControlPort SUBDIR += p5-POE-Component-Generic SUBDIR += p5-POE-Component-Jabber SUBDIR += p5-POE-Component-Pcap SUBDIR += p5-POE-Component-PubSub SUBDIR += p5-POE-Component-Server-Twirc SUBDIR += p5-POEx-Role-TCPServer SUBDIR += p5-POSIX-Socket SUBDIR += p5-POSIX-getpeername SUBDIR += p5-Parallel-Pvm SUBDIR += p5-Parse-Netstat SUBDIR += p5-Phone-Info SUBDIR += p5-PlRPC SUBDIR += p5-Queue-Beanstalk SUBDIR += p5-REST-Application SUBDIR += p5-REST-Google SUBDIR += p5-RPC-EPC-Service SUBDIR += p5-RPC-Simple SUBDIR += p5-RPC-XML SUBDIR += p5-ResourcePool-Resource-Net-LDAP SUBDIR += p5-ResourcePool-Resource-SOAP-Lite SUBDIR += p5-Rose-URI SUBDIR += p5-S3 SUBDIR += p5-SOAP SUBDIR += p5-SOAP-Amazon-S3 SUBDIR += p5-SOAP-Data-Builder SUBDIR += p5-SOAP-Lite SUBDIR += p5-SOAP-MySOAP SUBDIR += p5-SOAP-XML-Client SUBDIR += p5-Samba-LDAP SUBDIR += p5-Server-Starter SUBDIR += p5-Socket SUBDIR += p5-Socket-Class SUBDIR += p5-Socket-GetAddrInfo SUBDIR += p5-Socket-Multicast6 SUBDIR += p5-Socket6 SUBDIR += p5-Socks SUBDIR += p5-Sort-Key-IPv4 SUBDIR += p5-TFTP SUBDIR += p5-Test-URI SUBDIR += p5-Text-Authinfo SUBDIR += p5-Twitter-API SUBDIR += p5-URI SUBDIR += p5-URI-Based SUBDIR += p5-URI-Encode-XS SUBDIR += p5-URI-Fast SUBDIR += p5-URI-FromHash SUBDIR += p5-URI-Match SUBDIR += p5-URI-Nested SUBDIR += p5-URI-OpenURL SUBDIR += p5-URI-Query SUBDIR += p5-URI-SmartURI SUBDIR += p5-URI-Template SUBDIR += p5-URI-Template-Restrict SUBDIR += p5-URI-cpan SUBDIR += p5-URI-db SUBDIR += p5-URI-ws SUBDIR += p5-VM-EC2 SUBDIR += p5-VM-EC2-Security-CredentialCache SUBDIR += p5-Validate-Net SUBDIR += p5-WebService-Dropbox SUBDIR += p5-WebService-Prowl SUBDIR += p5-What SUBDIR += p5-X500-DN SUBDIR += p5-XML-Compile-SOAP SUBDIR += p5-XML-Compile-SOAP-AnyEvent SUBDIR += p5-XML-Compile-SOAP-Daemon SUBDIR += p5-XML-Compile-SOAP-WSA SUBDIR += p5-XML-Compile-WSDL11 SUBDIR += p5-XML-Fast SUBDIR += p5-XML-RPC SUBDIR += p5-XML-RPC-Fast SUBDIR += p5-XMLRPC-Lite SUBDIR += p5-XPC SUBDIR += p5-ZMQ-FFI SUBDIR += p5-ip2location-perl SUBDIR += p5-ldap2pf SUBDIR += p5-ldap2pw SUBDIR += p5-perl-ldap SUBDIR += p5-srv2pf SUBDIR += pacemaker1 SUBDIR += pacemaker2 SUBDIR += packetdrill SUBDIR += packter-agent SUBDIR += parpd SUBDIR += pathneck SUBDIR += pbnc SUBDIR += pear-Auth_RADIUS SUBDIR += pear-File_Bittorrent2 SUBDIR += pear-Horde_Kolab_Server SUBDIR += pear-Horde_Kolab_Session SUBDIR += pear-Horde_Ldap SUBDIR += pear-Horde_Rpc SUBDIR += pear-Horde_Scribe SUBDIR += pear-Horde_Socket_Client SUBDIR += pear-Horde_Url SUBDIR += pear-Net_CDDB SUBDIR += pear-Net_CheckIP SUBDIR += pear-Net_DIME SUBDIR += pear-Net_DNSBL SUBDIR += pear-Net_Dict SUBDIR += pear-Net_Finger SUBDIR += pear-Net_Geo SUBDIR += pear-Net_GeoIP SUBDIR += pear-Net_Growl SUBDIR += pear-Net_IDNA SUBDIR += pear-Net_IPv4 SUBDIR += pear-Net_IPv6 SUBDIR += pear-Net_Ident SUBDIR += pear-Net_LDAP SUBDIR += pear-Net_LDAP2 SUBDIR += pear-Net_MAC SUBDIR += pear-Net_NNTP SUBDIR += pear-Net_Nmap SUBDIR += pear-Net_POP3 SUBDIR += pear-Net_Ping SUBDIR += pear-Net_SMS SUBDIR += pear-Net_SMTP SUBDIR += pear-Net_Server SUBDIR += pear-Net_Sieve SUBDIR += pear-Net_Socket SUBDIR += pear-Net_Traceroute SUBDIR += pear-Net_URL SUBDIR += pear-Net_URL2 SUBDIR += pear-Net_URL_Mapper SUBDIR += pear-Net_UserAgent_Detect SUBDIR += pear-Net_UserAgent_Mobile SUBDIR += pear-Net_Vpopmaild SUBDIR += pear-Net_Whois SUBDIR += pear-SOAP SUBDIR += pear-Services_Pingback SUBDIR += pear-Services_Twitter SUBDIR += pear-URI_Template SUBDIR += pear-XML_RPC SUBDIR += pear-XML_RPC2 SUBDIR += pecl-amqp SUBDIR += pecl-mosquitto SUBDIR += pecl-oauth2 SUBDIR += pecl-radius SUBDIR += pecl-rdkafka SUBDIR += pecl-smbclient SUBDIR += pecl-xmlrpc SUBDIR += pecl-zmq SUBDIR += pen SUBDIR += php74-ldap SUBDIR += php74-soap SUBDIR += php74-sockets SUBDIR += php74-xmlrpc SUBDIR += php80-ldap SUBDIR += php80-soap SUBDIR += php80-sockets SUBDIR += php81-ldap SUBDIR += php81-soap SUBDIR += php81-sockets SUBDIR += php82-ldap SUBDIR += php82-soap SUBDIR += php82-sockets SUBDIR += phpldapadmin SUBDIR += pichi SUBDIR += pimcommon SUBDIR += pimd SUBDIR += pimdd SUBDIR += pjsip SUBDIR += pkt-gen SUBDIR += pktanon SUBDIR += pload SUBDIR += plugdaemon SUBDIR += poptop SUBDIR += portfwd SUBDIR += pptpclient SUBDIR += proby SUBDIR += proftpd-mod_ldap SUBDIR += prosearch SUBDIR += proxy-suite SUBDIR += proxychains SUBDIR += proxychains-ng SUBDIR += prtunnel SUBDIR += ptpd2 SUBDIR += ptunnel SUBDIR += pvm SUBDIR += pwhois SUBDIR += pwnat SUBDIR += pxe SUBDIR += pxe-pdhcp SUBDIR += py-DTLSSocket SUBDIR += py-GeoIP2 SUBDIR += py-aiocoap SUBDIR += py-aiohttp-socks SUBDIR += py-amqp SUBDIR += py-amqplib SUBDIR += py-avahi SUBDIR += py-cepa SUBDIR += py-cjdns SUBDIR += py-cloudflare-scrape SUBDIR += py-cloudflare-scrape-js2py SUBDIR += py-cloudscraper SUBDIR += py-confluent-kafka SUBDIR += py-cymruwhois SUBDIR += py-dpkt SUBDIR += py-duet SUBDIR += py-dugong SUBDIR += py-ec2-cli-tools SUBDIR += py-errbot SUBDIR += py-eventlet SUBDIR += py-gdown SUBDIR += py-geopy SUBDIR += py-gntp SUBDIR += py-gspread SUBDIR += py-h11 SUBDIR += py-haproxy-log-analysis SUBDIR += py-haproxyctl SUBDIR += py-httpstat SUBDIR += py-ifaddr SUBDIR += py-impacket SUBDIR += py-iplib SUBDIR += py-iptools SUBDIR += py-kafka-python SUBDIR += py-kombu SUBDIR += py-ldap SUBDIR += py-ldap0 SUBDIR += py-ldap3 SUBDIR += py-ldappool SUBDIR += py-libcloud SUBDIR += py-libdnet SUBDIR += py-magic-wormhole SUBDIR += py-matrix-synapse-ldap3 SUBDIR += py-maxminddb SUBDIR += py-miniupnpc SUBDIR += py-mpi4py SUBDIR += py-msrplib SUBDIR += py-ndg-httpsclient SUBDIR += py-netaddr SUBDIR += py-netif SUBDIR += py-netifaces SUBDIR += py-netsnmpagent SUBDIR += py-nnpy SUBDIR += py-ntplib SUBDIR += py-oauth SUBDIR += py-oauth2 SUBDIR += py-paho-mqtt SUBDIR += py-pamqp SUBDIR += py-pcapy SUBDIR += py-pcapy-ng SUBDIR += py-port-for SUBDIR += py-portend SUBDIR += py-pyenet SUBDIR += py-pyfixbuf SUBDIR += py-pygeoip SUBDIR += py-pyicap SUBDIR += py-pynamecheap SUBDIR += py-pynmsg SUBDIR += py-pynsq SUBDIR += py-pypacker SUBDIR += py-pypcap SUBDIR += py-pyroute2 SUBDIR += py-pyroute2.minimal SUBDIR += py-pyroute2.protocols SUBDIR += py-pysendfile SUBDIR += py-pyshark SUBDIR += py-pysmb SUBDIR += py-pysocks SUBDIR += py-pystun SUBDIR += py-python-barbicanclient SUBDIR += py-python-bitcoinrpc SUBDIR += py-python-ceilometerclient SUBDIR += py-python-cinderclient SUBDIR += py-python-designateclient SUBDIR += py-python-glanceclient SUBDIR += py-python-heatclient SUBDIR += py-python-keystoneclient SUBDIR += py-python-neutronclient SUBDIR += py-python-novaclient SUBDIR += py-python-openstackclient SUBDIR += py-python-socks SUBDIR += py-python-twitter SUBDIR += py-pytradfri SUBDIR += py-pyu2f SUBDIR += py-pyvmomi SUBDIR += py-pyzmq SUBDIR += py-qt5-networkauth SUBDIR += py-rabbitpy SUBDIR += py-radix SUBDIR += py-raet SUBDIR += py-ripe.atlas.cousteau SUBDIR += py-ripe.atlas.sagan SUBDIR += py-ripe.atlas.tools SUBDIR += py-s3cmd SUBDIR += py-s3transfer SUBDIR += py-s4cmd SUBDIR += py-saltyrtc.server SUBDIR += py-sbws SUBDIR += py-shodan SUBDIR += py-siosocks SUBDIR += py-smart-open SUBDIR += py-smbpasswd SUBDIR += py-smbprotocol SUBDIR += py-soap2py SUBDIR += py-socketio-client SUBDIR += py-socksio SUBDIR += py-softlayer SUBDIR += py-speedtest-cli SUBDIR += py-sshtunnel SUBDIR += py-sshuttle SUBDIR += py-stomp.py SUBDIR += py-suds SUBDIR += py-tacacs_plus SUBDIR += py-terminado SUBDIR += py-tofu SUBDIR += py-transip SUBDIR += py-trio SUBDIR += py-tweepy SUBDIR += py-twitter-tools SUBDIR += py-txamqp SUBDIR += py-txrestapi SUBDIR += py-uritemplate SUBDIR += py-uritools SUBDIR += py-url-normalize SUBDIR += py-urlextract SUBDIR += py-urllib3 SUBDIR += py-whois SUBDIR += py-wmi-query SUBDIR += py-wsdd SUBDIR += py-wsproto SUBDIR += py-zeep SUBDIR += py-zeroconf SUBDIR += py-zope.proxy SUBDIR += pyrad SUBDIR += qadsl SUBDIR += qoauth-qt5 SUBDIR += qt5-network SUBDIR += qt5-networkauth SUBDIR += qt6-networkauth SUBDIR += quagga SUBDIR += quiche SUBDIR += quiterss SUBDIR += quoted SUBDIR += rabbiteer SUBDIR += rabbitmq SUBDIR += rabbitmq-c SUBDIR += rabbitmq-c-devel SUBDIR += radcli SUBDIR += raddump SUBDIR += radiator SUBDIR += radiusclient SUBDIR += radreport SUBDIR += radsecproxy SUBDIR += radvd SUBDIR += rclone SUBDIR += rclone-browser SUBDIR += rdapper SUBDIR += rdesktop SUBDIR += rdist6 SUBDIR += read_bbrlog SUBDIR += realtek-re-kmod SUBDIR += reaver SUBDIR += recvnet SUBDIR += redir SUBDIR += relayd SUBDIR += remarkable-devd SUBDIR += remmina SUBDIR += remotebox SUBDIR += remotedesk SUBDIR += repeater SUBDIR += rfbproxy SUBDIR += rinetd SUBDIR += ripe-whois SUBDIR += rospo SUBDIR += routinator SUBDIR += rp-pppoe SUBDIR += rpki-client SUBDIR += rscsi SUBDIR += rsocket-cpp SUBDIR += rsplib SUBDIR += rssguard SUBDIR += rsync SUBDIR += rsync-bpc SUBDIR += rtg SUBDIR += rtpproxy SUBDIR += rtptools SUBDIR += rubygem-activestorage52 SUBDIR += rubygem-activestorage60 SUBDIR += rubygem-activestorage61 SUBDIR += rubygem-activestorage70 SUBDIR += rubygem-amazon-ec2 SUBDIR += rubygem-amq-protocol SUBDIR += rubygem-amqp SUBDIR += rubygem-amqp-utils SUBDIR += rubygem-apollo_upload_server SUBDIR += rubygem-asset_sync SUBDIR += rubygem-aws-s3 SUBDIR += rubygem-aws-ses SUBDIR += rubygem-azure SUBDIR += rubygem-azure-core SUBDIR += rubygem-beefcake SUBDIR += rubygem-bunny SUBDIR += rubygem-cloudflare SUBDIR += rubygem-connection_pool SUBDIR += rubygem-docker-api SUBDIR += rubygem-dogapi SUBDIR += rubygem-domain_name SUBDIR += rubygem-dropbox-sdk SUBDIR += rubygem-epp-client-afnic SUBDIR += rubygem-epp-client-base SUBDIR += rubygem-epp-client-rgp SUBDIR += rubygem-epp-client-secdns SUBDIR += rubygem-epp-client-smallregistry SUBDIR += rubygem-fog-aliyun SUBDIR += rubygem-fog-atmos SUBDIR += rubygem-fog-aws SUBDIR += rubygem-fog-azure SUBDIR += rubygem-fog-brightbox SUBDIR += rubygem-fog-cloudatcost SUBDIR += rubygem-fog-cloudstack SUBDIR += rubygem-fog-digitalocean SUBDIR += rubygem-fog-dnsimple SUBDIR += rubygem-fog-dynect SUBDIR += rubygem-fog-ecloud SUBDIR += rubygem-fog-google SUBDIR += rubygem-fog-gridscale SUBDIR += rubygem-fog-internet-archive SUBDIR += rubygem-fog-joyent SUBDIR += rubygem-fog-local SUBDIR += rubygem-fog-openstack SUBDIR += rubygem-fog-ovirt SUBDIR += rubygem-fog-powerdns SUBDIR += rubygem-fog-profitbricks SUBDIR += rubygem-fog-rackspace SUBDIR += rubygem-fog-radosgw SUBDIR += rubygem-fog-riakcs SUBDIR += rubygem-fog-sakuracloud SUBDIR += rubygem-fog-serverlove SUBDIR += rubygem-fog-softlayer SUBDIR += rubygem-fog-storm_on_demand SUBDIR += rubygem-fog-terremark SUBDIR += rubygem-fog-vmfusion SUBDIR += rubygem-fog-voxel SUBDIR += rubygem-fog-vsphere SUBDIR += rubygem-fog-xenserver SUBDIR += rubygem-gitaly SUBDIR += rubygem-gitaly-proto SUBDIR += rubygem-gitlab-fog-azure-rm SUBDIR += rubygem-gitlab-omniauth-openid-connect SUBDIR += rubygem-gitlab_omniauth-ldap SUBDIR += rubygem-google-cloud-bigquery SUBDIR += rubygem-google-cloud-bigtable SUBDIR += rubygem-google-cloud-bigtable-admin-v2 SUBDIR += rubygem-google-cloud-bigtable-v2 SUBDIR += rubygem-google-cloud-core SUBDIR += rubygem-google-cloud-env SUBDIR += rubygem-google-cloud-errors SUBDIR += rubygem-google-cloud-logging SUBDIR += rubygem-google-cloud-logging-v2 SUBDIR += rubygem-google-cloud-pubsub SUBDIR += rubygem-google-cloud-pubsub-v1 SUBDIR += rubygem-google-cloud-spanner SUBDIR += rubygem-google-cloud-spanner-admin-database-v1 SUBDIR += rubygem-google-cloud-spanner-admin-instance-v1 SUBDIR += rubygem-google-cloud-spanner-v1 SUBDIR += rubygem-google-cloud-storage SUBDIR += rubygem-grpc SUBDIR += rubygem-grpc142 SUBDIR += rubygem-hangouts-chat SUBDIR += rubygem-http-parser SUBDIR += rubygem-http_parser.rb SUBDIR += rubygem-httpauth SUBDIR += rubygem-ipaddr SUBDIR += rubygem-ipaddress SUBDIR += rubygem-iproto SUBDIR += rubygem-kas-grpc SUBDIR += rubygem-lita-gems SUBDIR += rubygem-macaddr SUBDIR += rubygem-maxmind-db SUBDIR += rubygem-mqtt SUBDIR += rubygem-nats-pure SUBDIR += rubygem-net-ldap SUBDIR += rubygem-net-netrc SUBDIR += rubygem-net-ntp SUBDIR += rubygem-net-ping SUBDIR += rubygem-net-protocol SUBDIR += rubygem-netrc SUBDIR += rubygem-network_interface SUBDIR += rubygem-nkf SUBDIR += rubygem-no_proxy_fix SUBDIR += rubygem-oauth SUBDIR += rubygem-oauth2 SUBDIR += rubygem-oauth21 SUBDIR += rubygem-octokit SUBDIR += rubygem-octopress-deploy SUBDIR += rubygem-omniauth-auth0 SUBDIR += rubygem-omniauth-authentiq SUBDIR += rubygem-omniauth-azure-activedirectory-v2 SUBDIR += rubygem-omniauth-azure-oauth2 SUBDIR += rubygem-omniauth-facebook SUBDIR += rubygem-omniauth-github SUBDIR += rubygem-omniauth-github-discourse SUBDIR += rubygem-omniauth-google-oauth2 SUBDIR += rubygem-omniauth-kerberos SUBDIR += rubygem-omniauth-oauth SUBDIR += rubygem-omniauth-oauth2 SUBDIR += rubygem-omniauth-openid SUBDIR += rubygem-omniauth-salesforce SUBDIR += rubygem-omniauth-twitter SUBDIR += rubygem-omniauth-ultraauth SUBDIR += rubygem-omniauth_openid_connect SUBDIR += rubygem-open-uri SUBDIR += rubygem-open-uri-cached SUBDIR += rubygem-openid_connect SUBDIR += rubygem-opennebula SUBDIR += rubygem-orchestrator_client SUBDIR += rubygem-ovirt-engine-sdk SUBDIR += rubygem-packetfu SUBDIR += rubygem-pcaprub SUBDIR += rubygem-private_address_check SUBDIR += rubygem-proxifier SUBDIR += rubygem-qiniu SUBDIR += rubygem-rabbiter SUBDIR += rubygem-rbvmomi SUBDIR += rubygem-right_aws SUBDIR += rubygem-right_flexiscale SUBDIR += rubygem-right_gogrid SUBDIR += rubygem-right_http_connection SUBDIR += rubygem-right_slicehost SUBDIR += rubygem-rsync SUBDIR += rubygem-ruby-growl SUBDIR += rubygem-ruby-openid SUBDIR += rubygem-ruby-yadis SUBDIR += rubygem-ruby_smb SUBDIR += rubygem-rubyntlm SUBDIR += rubygem-rubytter SUBDIR += rubygem-rudy SUBDIR += rubygem-rye SUBDIR += rubygem-serverengine SUBDIR += rubygem-simple_oauth SUBDIR += rubygem-spamcheck SUBDIR += rubygem-stackdriver-core SUBDIR += rubygem-stompserver SUBDIR += rubygem-t SUBDIR += rubygem-train SUBDIR += rubygem-train-core SUBDIR += rubygem-train-winrm SUBDIR += rubygem-tweetstream SUBDIR += rubygem-twitter SUBDIR += rubygem-twitter-stream SUBDIR += rubygem-twitter4r SUBDIR += rubygem-u2f SUBDIR += rubygem-u2f0 SUBDIR += rubygem-uri SUBDIR += rubygem-uri-redis SUBDIR += rubygem-uri_template SUBDIR += rubygem-whois SUBDIR += rubygem-xmlrpc SUBDIR += rude SUBDIR += ryu SUBDIR += s5cmd SUBDIR += sacc SUBDIR += sakisafecli SUBDIR += samba412 SUBDIR += samba413 + SUBDIR += samba416 SUBDIR += samplicator SUBDIR += savvycan SUBDIR += sbd SUBDIR += sbm SUBDIR += scamper SUBDIR += scapy SUBDIR += scr_ipfm SUBDIR += sctplib SUBDIR += sdl2_net SUBDIR += sdl_net SUBDIR += seaweedfs SUBDIR += seda SUBDIR += self-service-password SUBDIR += sems SUBDIR += sendemail SUBDIR += sendsms SUBDIR += sendsnpp SUBDIR += serveez SUBDIR += serviio SUBDIR += sflowtool SUBDIR += shadowsocks-libev SUBDIR += shelldap SUBDIR += shmux SUBDIR += sie-nmsg SUBDIR += simpleproxy SUBDIR += siproxd SUBDIR += sipsak SUBDIR += skstream SUBDIR += sl2tps SUBDIR += slackcat SUBDIR += smb4k SUBDIR += smcroute SUBDIR += smm++ SUBDIR += sngrep SUBDIR += sniffit SUBDIR += sniproxy SUBDIR += sntop SUBDIR += sobby SUBDIR += socat SUBDIR += sock SUBDIR += socketapi SUBDIR += socketbind SUBDIR += socketpipe SUBDIR += socketw SUBDIR += sofia-sip SUBDIR += spiritvnc SUBDIR += spoofer SUBDIR += spread SUBDIR += spread-j SUBDIR += spread4 SUBDIR += sqtop SUBDIR += srelay SUBDIR += ss5 SUBDIR += sshping SUBDIR += ssldump SUBDIR += sslh SUBDIR += ssspl SUBDIR += stone SUBDIR += storj SUBDIR += stund SUBDIR += subnetcalc SUBDIR += suckblow SUBDIR += sup SUBDIR += svnup SUBDIR += syncthing SUBDIR += tableutil SUBDIR += tac_plus4 SUBDIR += tacacs SUBDIR += tapidbus SUBDIR += tayga SUBDIR += tclsoap SUBDIR += tcludp SUBDIR += tcpcat SUBDIR += tcpdump SUBDIR += tcpflow SUBDIR += tcpick SUBDIR += tcpillust SUBDIR += tcping SUBDIR += tcpkali SUBDIR += tcplog_dumper SUBDIR += tcpmssd SUBDIR += tcpproxy SUBDIR += tcpreen SUBDIR += tcprtt SUBDIR += tcpsg SUBDIR += tcpshow SUBDIR += tcpslice SUBDIR += tcpsplit SUBDIR += tcpstat SUBDIR += tcptestsuite SUBDIR += tcptrace SUBDIR += tcptraceroute SUBDIR += tcpview SUBDIR += tcpwatch SUBDIR += tcpxd SUBDIR += tcpxtract SUBDIR += td-system-tools SUBDIR += tdetect SUBDIR += termshark SUBDIR += tftpgrab SUBDIR += thcrut SUBDIR += throttled SUBDIR += tigervnc-server SUBDIR += tigervnc-viewer SUBDIR += tightvnc SUBDIR += timed SUBDIR += tintin++ SUBDIR += tiny-network-utilities SUBDIR += tinyfugue SUBDIR += tinyfugue-devel SUBDIR += tinyldap SUBDIR += tn5250 SUBDIR += toonel SUBDIR += torsocks SUBDIR += traefik SUBDIR += traff SUBDIR += trafshow SUBDIR += trafshow3 SUBDIR += trickle SUBDIR += tsclient SUBDIR += tsctp SUBDIR += tshark SUBDIR += tshark-lite SUBDIR += tsocks SUBDIR += tunneller SUBDIR += turnserver SUBDIR += u6rd SUBDIR += ucarp SUBDIR += udpbroadcastrelay SUBDIR += udptunnel SUBDIR += udpxy SUBDIR += udt SUBDIR += uget SUBDIR += uhttpmock SUBDIR += ulxmlrpcpp SUBDIR += unfs3 SUBDIR += unison SUBDIR += unison232 SUBDIR += unison240 SUBDIR += unison248 SUBDIR += unison251 SUBDIR += unix2tcp SUBDIR += urelay SUBDIR += uriparser SUBDIR += urlendec SUBDIR += usbredir SUBDIR += usockets SUBDIR += utftpd SUBDIR += v2ray SUBDIR += vde SUBDIR += vde2 SUBDIR += vether-kmod SUBDIR += viamillipede SUBDIR += vinagre SUBDIR += vino SUBDIR += vmware-vsphere-cli SUBDIR += vncreflector SUBDIR += vnstat SUBDIR += vortex SUBDIR += vtun SUBDIR += wackamole SUBDIR += wakeonlan SUBDIR += wangle SUBDIR += waypipe SUBDIR += wayvnc SUBDIR += webalizer-geodb SUBDIR += whois SUBDIR += widentd SUBDIR += wifibox SUBDIR += wifibox-alpine SUBDIR += wifibox-core SUBDIR += wireguard SUBDIR += wireguard-go SUBDIR += wireguard-kmod SUBDIR += wireguard-tools SUBDIR += wireproxy SUBDIR += wireshark SUBDIR += wireshark-lite SUBDIR += wlan2eth SUBDIR += wlvncc SUBDIR += wmnd SUBDIR += wmnet SUBDIR += wmping SUBDIR += wmwave SUBDIR += wmwifi SUBDIR += wmwlmon SUBDIR += wol SUBDIR += wpa_supplicant_gui SUBDIR += wping SUBDIR += x11vnc SUBDIR += x2goclient SUBDIR += x2goclient-cli SUBDIR += xisp SUBDIR += xmlrpc-c SUBDIR += xmlrpc-epi SUBDIR += xprobe SUBDIR += xrdesktop2 SUBDIR += xrdp SUBDIR += xrdp-devel SUBDIR += yami4 SUBDIR += yaph SUBDIR += yate SUBDIR += yaz SUBDIR += yaz++ SUBDIR += yazproxy SUBDIR += yconalyzer SUBDIR += yggdrasil SUBDIR += yptransitd SUBDIR += zebra-server SUBDIR += zerotier SUBDIR += zillion SUBDIR += zmap SUBDIR += zsync SUBDIR += zyre .include diff --git a/net/samba416/Makefile b/net/samba416/Makefile new file mode 100644 index 000000000000..96424eef6b37 --- /dev/null +++ b/net/samba416/Makefile @@ -0,0 +1,700 @@ +PORTNAME= ${SAMBA4_BASENAME}416 +PORTVERSION= ${SAMBA4_VERSION} +PORTREVISION= 0 +CATEGORIES?= net +MASTER_SITES= SAMBA/samba/stable SAMBA/samba/rc +DISTNAME= ${SAMBA4_DISTNAME} + +MAINTAINER= timur@FreeBSD.org +COMMENT= Free SMB/CIFS and AD/DC server and client for Unix +WWW= https://www.samba.org/ + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= cpe + +CONFLICTS_INSTALL?= samba4* + +EXTRA_PATCHES+= \ + ${PATCHDIR}/0001-Compact-and-simplify-modules-build-and-config-genera.patch:-p1 \ + ${PATCHDIR}/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch:-p1 \ + ${PATCHDIR}/0003-Mask-CLang-prototype-warnings-in-kadm5-admin.h.patch:-p1 \ + ${PATCHDIR}/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch:-p1 \ + ${PATCHDIR}/0005-Include-jemalloc-jemalloc.h-if-ENABLE_JEMALLOC-is-se.patch:-p1 \ + ${PATCHDIR}/0006-Install-nss_-modules-into-PAMMODULESDIR-path.patch:-p1 \ + ${PATCHDIR}/0007-Use-macro-value-as-a-default-backlog-size-for-the-li.patch:-p1 \ + ${PATCHDIR}/0008-Brute-force-work-around-usage-of-Linux-specific-m-fl.patch:-p1 \ + ${PATCHDIR}/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch:-p1 \ + ${PATCHDIR}/0010-Add-option-with-pkgconfigdir-to-specify-alternative-.patch:-p1 \ + ${PATCHDIR}/0011-Use-provided-by-port-location-of-the-XML-catalog.patch:-p1 \ + ${PATCHDIR}/0012-Create-shared-libraries-according-to-the-FreeBSD-spe.patch:-p1 \ + ${PATCHDIR}/0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch:-p1 \ + ${PATCHDIR}/0014-Add-option-to-disable-CTDB-tests-failing-on-FreeBSD-.patch:-p1 \ + ${PATCHDIR}/0015-Add-extra-debug-class-to-trck-down-DB-locking-code.patch:-p1 \ + ${PATCHDIR}/0016-Make-ldb_schema_attribute_compare-a-stable-comparisi.patch:-p1 \ + ${PATCHDIR}/0017-Use-arc4random-when-available-to-generate-random-tal.patch:-p1 \ + ${PATCHDIR}/0018-Add-configuration-option-that-allows-to-choose-alter.patch:-p1 \ + ${PATCHDIR}/0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch:-p1 \ + ${PATCHDIR}/0020-FreeBSD-12-between-r336017-and-r342928-wrongfuly-ret.patch:-p1 \ + ${PATCHDIR}/0021-Fix-casting-warnings-in-the-nfs_quota-debug-message.patch:-p1 \ + ${PATCHDIR}/0022-Clean-up-UTMP-handling-code-and-add-FreeBSD-support..patch:-p1 \ + ${PATCHDIR}/0023-Add-cmd_get_quota-test-function-into-vfstest-to-test.patch:-p1 \ + ${PATCHDIR}/0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch:-p1 \ + ${PATCHDIR}/0025-From-d9b748869a8f4018ebee302aae8246bf29f60309-Mon-Se.patch:-p1 \ + ${PATCHDIR}/0026-vfs-add-a-compatibility-option-to-the-vfs_streams_xa.patch:-p1 \ + ${PATCHDIR}/0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch:-p1 \ + ${PATCHDIR}/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch:-p1 \ + ${PATCHDIR}/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch:-p1 \ + ${PATCHDIR}/0099-s4-mitkdc-Add-support-for-MIT-Kerberos-1.20.patch:-p1 + +SAMBA4_BASENAME= samba +SAMBA4_PORTNAME= ${SAMBA4_BASENAME}4 +SAMBA4_VERSION= 4.16.5 +SAMBA4_DISTNAME= ${SAMBA4_BASENAME}-${SAMBA4_VERSION:S|.p|pre|:S|.r|rc|:S|.t|tp|:S|.a|alpha|} + +WRKSRC?= ${WRKDIR}/${DISTNAME} +PLIST?= ${PKGDIR}/pkg-plist + +CPE_VENDOR= samba +CPE_PRODUCT= samba +# Directories +VARDIR= ${DESTDIR}/var +SAMBA4_RUNDIR= ${VARDIR}/run/${SAMBA4_PORTNAME} +SAMBA4_LOGDIR= ${VARDIR}/log/${SAMBA4_PORTNAME} +SAMBA4_LOCKDIR= ${VARDIR}/db/${SAMBA4_PORTNAME} +SAMBA4_BINDDNSDIR= ${SAMBA4_LOCKDIR}/bind-dns +SAMBA4_PRIVATEDIR= ${SAMBA4_LOCKDIR}/private +SAMBA4_PAMDIR= ${PREFIX}/lib +SAMBA4_LIBDIR= ${PREFIX}/lib/${SAMBA4_PORTNAME} +SAMBA4_INCLUDEDIR= ${PREFIX}/include/${SAMBA4_PORTNAME} +SAMBA4_CONFDIR= ${PREFIX}/etc +SAMBA4_CONFIG= smb4.conf +SAMBA4_MODULES_CLASS= auth bind9 gensec gpext idmap ldb nss_info \ + pdb perfcount process_model service vfs + +CONFIGURE_ARGS+= --mandir="${MANPREFIX}/man" \ + --sysconfdir="${SAMBA4_CONFDIR}" \ + --includedir="${SAMBA4_INCLUDEDIR}" \ + --datadir="${DATADIR}" \ + --libdir="${SAMBA4_LIBDIR}" \ + --with-privatelibdir="${SAMBA4_LIBDIR}/private" \ + --with-pammodulesdir="${SAMBA4_PAMDIR}" \ + --with-modulesdir="${SAMBA4_MODULEDIR}" \ + --with-pkgconfigdir="${PKGCONFIGDIR}" \ + --localstatedir="${VARDIR}" \ + --with-piddir="${SAMBA4_RUNDIR}" \ + --with-sockets-dir="${SAMBA4_RUNDIR}" \ + --with-privileged-socket-dir="${SAMBA4_RUNDIR}" \ + --with-lockdir="${SAMBA4_LOCKDIR}" \ + --with-statedir="${SAMBA4_LOCKDIR}" \ + --with-cachedir="${SAMBA4_LOCKDIR}" \ + --with-bind-dns-dir=${SAMBA4_BINDDNSDIR} \ + --with-privatedir="${SAMBA4_PRIVATEDIR}" \ + --with-logfilebase="${SAMBA4_LOGDIR}" +# XXX: Flags +CONFIGURE_ENV+= PTHREAD_LDFLAGS="-lpthread" +MAKE_ENV+= PYTHONHASHSEED=1 + +USES+= compiler:c++11-lang iconv localbase:ldflags \ + perl5 pkgconfig shebangfix waf gettext-runtime +USE_PERL5= build +USE_LDCONFIG= ${SAMBA4_LIBDIR} +WAF_CMD= buildtools/bin/waf +CONFIGURE_LOG= bin/config.log + +PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig +PKGCONFIGDIR_REL?= ${PKGCONFIGDIR:S,^${PREFIX}/,,} +PLIST_SUB+= PKGCONFIGDIR=${PKGCONFIGDIR_REL} +SUB_LIST+= PKGCONFIGDIR=${PKGCONFIGDIR_REL} +############################################################################## +OPTIONS_SUB= yes + +OPTIONS_DEFINE= AD_DC ADS CLUSTER CUPS DOCS FAM GPGME \ + LDAP MANDOC PROFILE PYTHON3 QUOTAS \ + SPOTLIGHT SYSLOG UTMP +#OPTIONS_DEFINE+= DEVELOPER MEMORY_DEBUG + +OPTIONS_GROUP= VFS +OPTIONS_GROUP_VFS= FRUIT GLUSTERFS + +OPTIONS_SINGLE= GSSAPI ZEROCONF + +OPTIONS_SINGLE_GSSAPI= GSSAPI_BUILTIN GSSAPI_MIT +#GSSAPI_HEIMDAL +OPTIONS_SINGLE_ZEROCONF= ZEROCONF_NONE AVAHI MDNSRESPONDER + +# Make those default options +OPTIONS_DEFAULT= AD_DC ADS DOCS FAM LDAP \ + PROFILE PYTHON3 QUOTAS SYSLOG UTMP \ + FRUIT GSSAPI_BUILTIN AVAHI +############################################################################## +ADS_DESC= Active Directory client(implies LDAP) +AD_DC_DESC= Active Directory Domain Controller(implies PYTHON3) +CLUSTER_DESC= Clustering support +DEVELOPER_DESC= With developer framework +FAM_DESC= File Alteration Monitor +GPGME_DESC= GpgME support +LDAP_DESC= LDAP client +LIBZFS_DESC= LibZFS +SPOTLIGHT_DESC= Spotlight server-side search support +MANDOC_DESC= Build manpages from DOCBOOK templates +MEMORY_DEBUG_DESC= Debug memory allocator +PICKY_DEVELOPER_DESC= Treat compiler warnings as errors(implies DEVELOPER) +PROFILE_DESC= Profiling data +QUOTAS_DESC= Disk quota support +UTMP_DESC= UTMP accounting + +VFS_DESC= VFS modules +FRUIT_DESC= MacOSX and TimeMachine support +GLUSTERFS_DESC= GlusterFS support + +GSSAPI_BUILTIN_DESC= GSSAPI support via bundled Heimdal + +ZEROCONF_DESC= Zero configuration networking +ZEROCONF_NONE_DESC= Zeroconf support is absent +############################################################################## +# XXX: Unconditional dependencies which can't be switched off(if present in +# the system) + +# Iconv(picked up unconditionaly) +LIB_DEPENDS+= libiconv.so:converters/libiconv +# unwind +LIB_DEPENDS+= libunwind.so:devel/libunwind +# Readline(sponsored by Python) +# XXX: USES=readline pollutes CPPFLAGS, so we explicitly put dependency +LIB_DEPENDS+= libreadline.so:devel/readline +# popt +LIB_DEPENDS+= libpopt.so:devel/popt +# inotify +LIB_DEPENDS+= libinotify.so:devel/libinotify +# GNUTLS +LIB_DEPENDS+= libgnutls.so:security/gnutls +LIB_DEPENDS+= libgcrypt.so:security/libgcrypt +# NFSv4 ACL glue +LIB_DEPENDS+= libsunacl.so:sysutils/libsunacl +# Jansson +BUILD_DEPENDS+= jansson>=2.10:devel/jansson +RUN_DEPENDS+= jansson>=2.10:devel/jansson +# tasn1 +BUILD_DEPENDS+= libtasn1>=3.8:security/libtasn1 +RUN_DEPENDS+= libtasn1>=3.8:security/libtasn1 +# External Samba dependencies +# Needed for IDL compiler +BUILD_DEPENDS+= p5-Parse-Yapp>=0:devel/p5-Parse-Yapp + +# Libarchive +SAMBA4_BUNDLED_LIBS+= !libarchive +BUILD_DEPENDS+= libarchive>=3.1.2:archivers/libarchive +RUN_DEPENDS+= libarchive>=3.1.2:archivers/libarchive + +### Bundled libraries +SAMBA4_BUNDLED_CMOCKA?= no +SAMBA4_BUNDLED_TALLOC?= no +SAMBA4_BUNDLED_TEVENT?= no +SAMBA4_BUNDLED_TDB?= no +SAMBA4_BUNDLED_LDB?= yes +# cmocka +.if defined(SAMBA4_BUNDLED_CMOCKA) && ${SAMBA4_BUNDLED_CMOCKA} == yes +SAMBA4_BUNDLED_LIBS+= cmocka +CONFLICTS_INSTALL+= cmocka-1.* +PLIST_SUB+= SAMBA4_BUNDLED_CMOCKA="" +SUB_LIST+= SAMBA4_BUNDLED_CMOCKA="" +.else +SAMBA4_BUNDLED_LIBS+= !cmocka +BUILD_DEPENDS+= cmocka>=1.1.3:sysutils/cmocka +TEST_DEPENDS+= cmocka>=1.1.3:sysutils/cmocka +PLIST_SUB+= SAMBA4_BUNDLED_CMOCKA="@comment " +SUB_LIST+= SAMBA4_BUNDLED_CMOCKA="@comment " +.endif +# talloc +.if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes +SAMBA4_BUNDLED_LIBS+= talloc +CONFLICTS_INSTALL+= talloc-* talloc1-* +PLIST_SUB+= SAMBA4_BUNDLED_TALLOC="" +SUB_LIST+= SAMBA4_BUNDLED_TALLOC="" +.else +SAMBA4_BUNDLED_LIBS+= !talloc +BUILD_DEPENDS+= talloc>=2.3.3:devel/talloc +RUN_DEPENDS+= talloc>=2.3.3:devel/talloc +PLIST_SUB+= SAMBA4_BUNDLED_TALLOC="@comment " +SUB_LIST+= SAMBA4_BUNDLED_TALLOC="@comment " +.endif +# tevent +.if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes +SAMBA4_BUNDLED_LIBS+= tevent +CONFLICTS_INSTALL+= tevent-* tevent1-* +PLIST_SUB+= SAMBA4_BUNDLED_TEVENT="" +SUB_LIST+= SAMBA4_BUNDLED_TEVENT="" +.else +SAMBA4_BUNDLED_LIBS+= !tevent +BUILD_DEPENDS+= tevent>=0.11.0:devel/tevent +RUN_DEPENDS+= tevent>=0.11.0:devel/tevent +PLIST_SUB+= SAMBA4_BUNDLED_TEVENT="@comment " +SUB_LIST+= SAMBA4_BUNDLED_TEVENT="@comment " +.endif +# tdb +.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes +SAMBA4_BUNDLED_LIBS+= tdb +CONFLICTS_INSTALL+= tdb-* tdb1-* +PLIST_SUB+= SAMBA4_BUNDLED_TDB="" +SUB_LIST+= SAMBA4_BUNDLED_TDB="" +.else +SAMBA4_BUNDLED_LIBS+= !tdb +BUILD_DEPENDS+= tdb>=1.4.6:databases/tdb +RUN_DEPENDS+= tdb>=1.4.6:databases/tdb +PLIST_SUB+= SAMBA4_BUNDLED_TDB="@comment " +SUB_LIST+= SAMBA4_BUNDLED_TDB="@comment " +.endif +# ldb +.if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes +SAMBA4_BUNDLED_LDB= yes +SAMBA4_BUNDLED_LIBS+= ldb +PLIST_SUB+= SAMBA4_BUNDLED_LDB="" +SUB_LIST+= SAMBA4_BUNDLED_LDB="" +SAMBA4_MODULEDIR= ${SAMBA4_LIBDIR}/modules +.else +SAMBA4_BUNDLED_LIBS+= !ldb +BUILD_DEPENDS+= ldb25>=2.5.2:databases/ldb25 +RUN_DEPENDS+= ldb25>=2.5.2:databases/ldb25 +PLIST_SUB+= SAMBA4_BUNDLED_LDB="@comment " +SUB_LIST+= SAMBA4_BUNDLED_LDB="@comment " +SAMBA4_MODULEDIR= ${PREFIX}/lib/shared-modules +.endif + +.if (defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes) \ + || (defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes) \ + || (defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes) \ + || (defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes) +SAMBA4_BUNDLED_LIBS+= replace +.endif +# Don't use external libcom_err +SAMBA4_BUNDLED_LIBS+= com_err +# Set the test environment variables +TEST_USES= python +TEST_ENV+= PYTHON="${PYTHON_CMD}" \ + SHA1SUM=/sbin/sha1 \ + SHA256SUM=/sbin/sha256 \ + MD5SUM=/sbin/md5 \ + PYTHONDONTWRITEBYTECODE=1 + +TEST_DEPENDS+= bash:shells/bash \ + tshark:net/tshark +# External Python modules +TEST_BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR} +TEST_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR} +############################################################################## +CONFIGURE_ARGS+= \ + --with-pam \ + --with-iconv \ + --with-winbind \ + --with-regedit \ + --disable-rpath \ + --without-lttng \ + --without-gettext \ + --enable-pthreadpool \ + --without-fake-kaserver \ + --without-systemd \ + --with-libarchive \ + --with-acl-support \ + --with-sendfile-support \ + --disable-ctdb-tests +# ${ICONV_CONFIGURE_BASE} +############################################################################## +FRUIT_PREVENTS= ZEROCONF_NONE +FRUIT_PREVENTS_MSG= MacOSX support requires Zeroconf(AVAHI or MDNSRESPONDER) +FRUIT_VARS= SAMBA4_MODULES+=vfs_fruit +FRUIT_PLIST_FILES= man/man8/vfs_fruit.8.gz + +GLUSTERFS_CONFIGURE_ENABLE= glusterfs +GLUSTERFS_LIB_DEPENDS= libglusterfs.so:net/glusterfs +GLUSTERFS_VARS= SAMBA4_MODULES+=vfs_glusterfs +GLUSTERFS_PLIST_FILES= man/man8/vfs_glusterfs.8.gz + +ZEROCONF_NONE_MAKE_ENV= ZEROCONF=none +############################################################################## +AVAHI_CONFIGURE_ENABLE= avahi +AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app +AVAHI_VARS= SAMBA4_SERVICES+=avahi_daemon + +MDNSRESPONDER_CONFIGURE_ENABLE= dnssd +MDNSRESPONDER_LIB_DEPENDS= libdns_sd.so:net/mDNSResponder +MDNSRESPONDER_VARS= SAMBA4_SERVICES+=mdnsd +############################################################################## +MEMORY_DEBUG_IMPLIES= DEBUG +MEMORY_DEBUG_CONFIGURE_ENV= ADDITIONAL_CFLAGS="-DENABLE_JEMALLOC `pkg-config --cflags jemalloc`" ADDITIONAL_LDFLAGS="`pkg-config --libs jemalloc`" +MEMORY_DEBUG_LIB_DEPENDS= libjemalloc.so.2:devel/jemalloc +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194046 +GDB_CMD?= ${LOCALBASE}/bin/gdb +# https://bugzilla.samba.org/show_bug.cgi?id=8969 +PICKY_DEVELOPER_IMPLIES= DEVELOPER +PICKY_DEVELOPER_CONFIGURE_ON= --picky-developer + +DEVELOPER_CONFIGURE_ON= --enable-developer --enable-selftest --abi-check-disable +DEVELOPER_CONFIGURE_ENV= WAF_CMD_FORMAT=string +DEVELOPER_BUILD_DEPENDS= ${SAMBA4_LMDB_DEPENDS} \ + ${GDB_CMD}:devel/gdb +DEVELOPER_RUN_DEPENDS= ${SAMBA4_LMDB_DEPENDS} +DEVELOPER_TEST_DEPENDS= ${GDB_CMD}:devel/gdb +DEVELOPER_VARS_OFF= GDB_CMD=true +############################################################################## +AD_DC_IMPLIES= PYTHON3 +AD_DC_CONFIGURE_OFF= --without-ad-dc +AD_DC_BUILD_DEPENDS= ${SAMBA4_LMDB_DEPENDS} +AD_DC_RUN_DEPENDS= ${SAMBA4_LMDB_DEPENDS} +AD_DC_VARS= PLIST+=${PKGDIR}/pkg-plist.ad_dc +# samba-tool requires those for *upgrade +AD_DC_BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}markdown>=3.3.7:textproc/py-markdown@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dnspython>=2.2.1:dns/py-dnspython@${PY_FLAVOR} +AD_DC_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}markdown>=3.3.7:textproc/py-markdown@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dnspython>=2.2.1:dns/py-dnspython@${PY_FLAVOR} + +ADS_IMPLIES= LDAP +ADS_CONFIGURE_WITH= ads + +CLUSTER_CONFIGURE_WITH= cluster-support +CLUSTER_VARS= PLIST+=${PKGDIR}/pkg-plist.cluster + +CUPS_CONFIGURE_ENABLE= cups iprint +CUPS_LIB_DEPENDS= libcups.so:print/cups +# https://bugzilla.samba.org/show_bug.cgi?id=9545 +FAM_USES= fam +FAM_CONFIGURE_WITH= fam + +GPGME_CONFIGURE_WITH= gpgme +GPGME_LIB_DEPENDS= libgpgme.so:security/gpgme +GPGME_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gpgme>=1.14.0:security/py-gpgme@${PY_FLAVOR} + +GSSAPI_BUILTIN_USES= bison +GSSAPI_BUILTIN_BUILD_DEPENDS= p5-JSON>=4.0:converters/p5-JSON + +GSSAPI_MIT_CONFIGURE_ON= --with-system-mitkrb5 ${GSSAPIBASEDIR} \ + --with-system-mitkdc=${GSSAPIBASEDIR}/sbin/krb5kdc \ + --with-experimental-mit-ad-dc +GSSAPI_MIT_USES= gssapi:mit + +GSSAPI_HEIMDAL_CONFIGURE_ON= --with-system-heimdalkrb5 ${GSSAPIBASEDIR} +GSSAPI_HEIMDAL_USES= gssapi:heimdal +GSSAPI_HEIMDAL_PREVENTS= AD_DC +GSSAPI_HEIMDAL_PREVENTS_MSG= GSSAPI_HEIMDAL and AD_DC enable conflicting options + +LDAP_CONFIGURE_WITH= ldap +LDAP_CONFIGURE_ON= --with-openldap=${LOCALBASE} +LDAP_USE= OPENLDAP=yes +LDAP_VARS= SAMBA4_MODULES+=idmap_ldap + +LIBZFS_CONFIGURE_WITH= libzfs +LIBZFS_VARS= SAMBA4_MODULES+=vfs_zfs_space + +MANDOC_BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \ + xsltproc:textproc/libxslt +MANDOC_CONFIGURE_ENV_OFF= XSLTPROC="true" + +PROFILE_CONFIGURE_WITH= profiling-data + +QUOTAS_CONFIGURE_WITH= quotas + +SPOTLIGHT_CONFIGURE_ENABLE= spotlight +SPOTLIGHT_BUILD_DEPENDS= tracker>=1.4.1:sysutils/tracker +SPOTLIGHT_RUN_DEPENDS= tracker>=1.4.1:sysutils/tracker +# ICU +SPOTLIGHT_LIB_DEPENDS= libicuuc.so:devel/icu +SPOTLIGHT_USES= bison gnome +SPOTLIGHT_USE= gnome=glib20 + +SYSLOG_CONFIGURE_WITH= syslog + +UTMP_CONFIGURE_WITH= utmp + +############################################################################## +.include +############################################################################## +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300076 +IGNORE=runs only on FreeBSD 13.1 and above due use of O_EMPTY_PATH +.endif + +.if !defined(WANT_EXP_MODULES) || empty(WANT_EXP_MODULES) +WANT_EXP_MODULES= vfs_cacheprime +.endif + +.if ${WANT_EXP_MODULES:Mvfs_snapper} +# snapper needs dbus +LIB_DEPENDS+= libdbus-1.so:devel/dbus +LIB_DEPENDS+= libdbus-glib-1.so:devel/dbus-glib +.endif + +SAMBA4_MODULES+= krb5_async_dns_krb5_locator krb5_winbind_krb5_locator idmap_nss idmap_autorid \ + idmap_rid idmap_hash idmap_tdb idmap_tdb2 idmap_script \ + nss-info_hash +# List of extra modules taken from RHEL build +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197320 +.if ${PORT_OPTIONS:MADS} +SAMBA4_MODULES+= idmap_ad idmap_rfc2307 nss-info_template \ + nss-info_rfc2307 nss-info_sfu nss-info_sfu20 +.endif +# This kind of special for this distribution +SAMBA4_MODULES+= vfs_freebsd + +SAMBA4_MODULES+= vfs_acl_tdb vfs_acl_xattr vfs_aio_fork vfs_aio_pthread \ + vfs_audit vfs_cap vfs_catia vfs_commit vfs_crossrename \ + vfs_default_quota vfs_dirsort vfs_expand_msdfs \ + vfs_extd_audit vfs_fake_perms vfs_full_audit \ + vfs_linux_xfs_sgid vfs_media_harmony vfs_offline \ + vfs_preopen vfs_readahead vfs_readonly vfs_recycle \ + vfs_shadow_copy vfs_shadow_copy2 vfs_shell_snap \ + vfs_streams_depot vfs_streams_xattr vfs_syncops \ + vfs_time_audit vfs_unityed_media vfs_virusfilter \ + vfs_widelinks vfs_worm vfs_xattr_tdb vfs_zfsacl + +.if ${PORT_OPTIONS:MDEVELOPER} +SAMBA4_MODULES+= auth_skel pdb_test gpext_security gpext_registry \ + gpext_scripts perfcount_test vfs_fake_dfq \ + vfs_skel_opaque vfs_skel_transparent \ + vfs_shadow_copy_test vfs_fake_acls \ + vfs_nfs4acl_xattr vfs_error_inject vfs_delay_inject +.endif +# Python bindings +.if ! ${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON) +USES+= python:build,test +CONFIGURE_ARGS+= --disable-python +.else +USES+= python:3.6+ +PLIST+= ${PKGDIR}/pkg-plist.python +# Don't cache Python modules +CONFIGURE_ARGS+= --nopycache +MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1 + +. if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes +SAMBA4_BUNDLED_LIBS+= pytalloc-util +. else +SAMBA4_BUNDLED_LIBS+= !pytalloc-util +. endif + +. if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes +SAMBA4_BUNDLED_LIBS+= pytevent +. else +SAMBA4_BUNDLED_LIBS+= !pytevent +. endif + +. if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes +SAMBA4_BUNDLED_LIBS+= pytdb +. else +SAMBA4_BUNDLED_LIBS+= !pytdb +. endif + +. if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes +SAMBA4_BUNDLED_LIBS+= pyldb pyldb-util +. else +SAMBA4_BUNDLED_LIBS+= !pyldb !pyldb-util +. endif +.endif + +.if defined(WANT_EXP_MODULES) && !empty(WANT_EXP_MODULES) +SAMBA4_MODULES+= ${WANT_EXP_MODULES} +.endif + +.if defined(SAMBA4_BUNDLED_LIBS) && !empty(SAMBA4_BUNDLED_LIBS) +CONFIGURE_ARGS+= --bundled-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}" +.endif + +.if defined(SAMBA4_MODULES) && !empty(SAMBA4_MODULES) +CONFIGURE_ARGS+= --with-shared-modules="${SAMBA4_MODULES:C|-|_|:Q:C|(\\\\ )+|,|g:S|\\||g}" +.endif +# XXX: Hack for nss-info_* -> nss_info/* modules +# Add selected modules to the plist +.for module in ${SAMBA4_MODULES} +PLIST_FILES+= ${SAMBA4_MODULEDIR}/${module:C|_|/|:C|-|_|}.so +.endfor + +.for module_class in ${SAMBA4_MODULES_CLASS} +PLIST_DIRS+= ${SAMBA4_MODULEDIR}/${module_class} +.endfor +PLIST_DIRS+= ${SAMBA4_MODULEDIR} + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --verbose --enable-debug +MAKE_ARGS+= --verbose +DEBUG_FLAGS?= -g -ggdb3 -O0 +.endif + +############################################################################## +.include +############################################################################## +# Implemented in the gcrypt on AMD64 +.if ${ARCH} == "amd64" +CONFIGURE_ARGS+= --accel-aes=intelaesni +.else +CONFIGURE_ARGS+= --accel-aes=none +.endif + +# Only for 64-bit architectures +.if ${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != i386 && ${ARCH} != mips && ${ARCH} != powerpc && ${ARCH} != powerpcspe +. if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes && (${PORT_OPTIONS:MAD_DC} || ${PORT_OPTIONS:MDEVELOPER}) +# LMDB +SAMBA4_LMDB_DEPENDS= lmdb>=0.9.16:databases/lmdb +PLIST_FILES+= ${SAMBA4_LIBDIR}/private/libldb-mdb-int-samba4.so \ + ${SAMBA4_MODULEDIR}/ldb/mdb.so +. endif +.endif + +.if ${PORT_OPTIONS:MGSSAPI_MIT} +PLIST_FILES+= ${SAMBA4_MODULEDIR}/krb5/winbind_krb5_localauth.so \ + man/man8/winbind_krb5_localauth.8.gz +. if ${PORT_OPTIONS:MAD_DC} +PLIST_FILES+= ${SAMBA4_LIBDIR}/krb5/plugins/kdb/samba.so +. endif +.endif +# for libexecinfo: (so that __builtin_frame_address() finds the top of the stack) +CFLAGS_amd64+= -fno-omit-frame-pointer +# No fancy color error messages +CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}} +CFLAGS_clang= -fno-color-diagnostics +CONFIGURE_ENV+= NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s' +MAKE_ENV+= NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s' +# Allow rpcgen to find proper CPP +MAKE_ENV+= RPCGEN_CPP="${CPP}" +#.if ${readline_ARGS} == port +#CFLAGS+= -D_FUNCTION_DEF +#.endif + +# Make sure that the right version of Python is used by the tools +# https://bugzilla.samba.org/show_bug.cgi?id=7305 +SHEBANG_FILES= ${PATCH_WRKSRC}/source4/scripting/bin/* ${PATCH_WRKSRC}/selftest/* + +SAMBA4_SUB= SAMBA4_LOGDIR="${SAMBA4_LOGDIR}" \ + SAMBA4_RUNDIR="${SAMBA4_RUNDIR}" \ + SAMBA4_LOCKDIR="${SAMBA4_LOCKDIR}" \ + SAMBA4_LIBDIR="${SAMBA4_LIBDIR}" \ + SAMBA4_MODULEDIR="${SAMBA4_MODULEDIR}" \ + SAMBA4_BINDDNSDIR="${SAMBA4_BINDDNSDIR}" \ + SAMBA4_PRIVATEDIR="${SAMBA4_PRIVATEDIR}" \ + SAMBA4_CONFDIR="${SAMBA4_CONFDIR}" \ + SAMBA4_CONFIG="${SAMBA4_CONFIG}" \ + SAMBA4_SERVICES="${SAMBA4_SERVICES}" + +PLIST_SUB+= ${SAMBA4_SUB} +SUB_LIST+= ${SAMBA4_SUB} + +USE_RC_SUBR= samba_server +SUB_FILES= pkg-message README.FreeBSD + +PORTDOCS= README.FreeBSD + +post-extract: + @${RM} -r ${WRKSRC}/pidl/lib/Parse/Yapp + +post-patch: + @${REINPLACE_CMD} -e 's|$${PKGCONFIGDIR}|${PKGCONFIGDIR}|g' \ + ${PATCH_WRKSRC}/buildtools/wafsamba/pkgconfig.py + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${PATCH_WRKSRC}/buildtools/wafsamba/wafsamba.py + @${REINPLACE_CMD} -e 's|%%GDB_CMD%%|${GDB_CMD}|g' \ + ${PATCH_WRKSRC}/buildtools/scripts/abi_gen.sh + @${REINPLACE_CMD} -e 's|%%SAMBA4_CONFIG%%|${SAMBA4_CONFIG}|g' \ + ${PATCH_WRKSRC}/dynconfig/wscript + +# Use threading (or multiprocessing) but not thread (renamed in python 3+). +pre-configure: +.if (!${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON)) && ${PORT_OPTIONS:MAD_DC} + @${ECHO_CMD}; \ + ${ECHO_MSG} "===> AD_DC option requires PYTHON3 to be set"; \ + ${ECHO_CMD}; \ + ${FALSE} +.endif + +pre-build-MANDOC-off: + ${MKDIR} ${BUILD_WRKSRC}/bin/default/docs-xml/ + ${CP} -rp ${BUILD_WRKSRC}/docs/manpages ${BUILD_WRKSRC}/bin/default/docs-xml/ +.for man in libcli/nbt/man/nmblookup4.1 \ + librpc/tools/ndrdump.1 \ + source4/lib/registry/man/regdiff.1 \ + source4/lib/registry/man/regpatch.1 \ + source4/lib/registry/man/regshell.1 \ + source4/lib/registry/man/regtree.1 \ + source4/scripting/man/samba-gpupdate.8 \ + source4/torture/man/gentest.1 \ + source4/torture/man/locktest.1 \ + source4/torture/man/masktest.1 \ + source4/torture/man/smbtorture.1 \ + source4/utils/man/ntlm_auth4.1 \ + source4/utils/oLschema2ldif/oLschema2ldif.1 \ + lib/tdb/man/tdbdump.8 \ + lib/tdb/man/tdbbackup.8 \ + lib/tdb/man/tdbtool.8 \ + lib/talloc/man/talloc.3 \ + lib/tdb/man/tdbrestore.8 \ + lib/ldb/man/ldb.3 \ + lib/ldb/man/ldbadd.1 \ + lib/ldb/man/ldbdel.1 \ + lib/ldb/man/ldbedit.1 \ + lib/ldb/man/ldbmodify.1 \ + lib/ldb/man/ldbrename.1 \ + lib/ldb/man/ldbsearch.1 \ + docs-xml/manpages/vfs_freebsd.8 + ${MKDIR} `dirname ${BUILD_WRKSRC}/bin/default/${man}` + ${INSTALL_MAN} ${FILESDIR}/man/`basename ${man}` ${BUILD_WRKSRC}/bin/default/${man} +.endfor +.if ${PORT_OPTIONS:MCLUSTER} + ${MKDIR} ${BUILD_WRKSRC}/bin/default/ctdb/ +. for man in ctdb_diagnostics.1 ctdb.1 ctdbd_wrapper.1 ctdbd.1 ltdbtool.1 onnode.1 ping_pong.1 \ + ctdb.conf.5 ctdb.sysconfig.5 ctdb-script.options.5 \ + ctdb.7 ctdb-statistics.7 ctdb-tunables.7 + ${INSTALL_MAN} ${FILESDIR}/man/${man} ${BUILD_WRKSRC}/bin/default/ctdb/ +. endfor +.endif + +post-install-rm-junk: + ${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/samba/third_party + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name __pycache__ \ + -type d -print0 | ${XARGS} -0 -n 1 -t ${RM} -r + +post-install-fix-manpages: +.for f in vfs_aio_linux.8 vfs_btrfs.8 vfs_ceph.8 vfs_gpfs.8 + ${RM} ${STAGEDIR}${PREFIX}/man/man8/${f} +.endfor +.if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes +. for f in ldbadd.1 ldbdel.1 ldbedit.1 ldbmodify.1 ldbrename.1 ldbsearch.1 + ${MV} ${STAGEDIR}${PREFIX}/man/man1/${f} ${STAGEDIR}${PREFIX}/man/man1/samba-${f} +. endfor +.endif +.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes +. for f in tdbbackup.8 tdbdump.8 tdbrestore.8 tdbtool.8 + ${MV} ${STAGEDIR}${PREFIX}/man/man8/${f} ${STAGEDIR}${PREFIX}/man/man8/samba-${f} +. endfor +.endif + +post-install: post-install-rm-junk post-install-fix-manpages + ${LN} -sf smb.conf.5.gz ${STAGEDIR}${PREFIX}/man/man5/smb4.conf.5.gz +# Run post-install script +.for dir in ${SAMBA4_LOGDIR} ${SAMBA4_RUNDIR} ${SAMBA4_LOCKDIR} ${SAMBA4_MODULEDIR} + ${INSTALL} -d -m 0755 "${STAGEDIR}${dir}" +.endfor + ${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_BINDDNSDIR}" + ${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_PRIVATEDIR}" +.for module_class in ${SAMBA4_MODULES_CLASS} + ${INSTALL} -d -m 0755 "${STAGEDIR}${SAMBA4_MODULEDIR}/${module_class}" +.endfor +.if !defined(WITH_DEBUG) + -${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin ${STAGEDIR}${PREFIX}/libexec \ + -type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD} + -${FIND} ${STAGEDIR}${PREFIX}/lib -name '*.so*' \ + -type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD} +.endif + +post-install-FRUIT-off: + ${RM} ${STAGEDIR}${SAMBA4_MODULEDIR}/vfs/fruit.so + ${RM} ${STAGEDIR}${PREFIX}/man/man8/vfs_fruit.8 + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for doc in ${PORTDOCS} + ${INSTALL_DATA} ${WRKDIR}/${doc} ${STAGEDIR}${DOCSDIR} +.endfor + +post-install-CLUSTER-on: + ${LN} -nfs ../../../../share/ctdb/events/legacy/00.ctdb.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/00.ctdb.script + ${LN} -nfs ../../../../share/ctdb/events/legacy/10.interface.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/10.interface.script + ${LN} -nfs ../../../../share/ctdb/events/legacy/05.system.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/05.system.script + ${LN} -nfs ../../../../share/ctdb/events/legacy/01.reclock.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/01.reclock.script + +.include diff --git a/net/samba416/distinfo b/net/samba416/distinfo new file mode 100644 index 000000000000..3d86f57054fd --- /dev/null +++ b/net/samba416/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1663020631 +SHA256 (samba-4.16.5.tar.gz) = c73c092017d2d1dd270709c8597321d0dd667c882a1b2470cf60f8ee56d3fd44 +SIZE (samba-4.16.5.tar.gz) = 30613439 diff --git a/net/samba416/files/0001-Compact-and-simplify-modules-build-and-config-genera.patch b/net/samba416/files/0001-Compact-and-simplify-modules-build-and-config-genera.patch new file mode 100644 index 000000000000..b4bc56519f7e --- /dev/null +++ b/net/samba416/files/0001-Compact-and-simplify-modules-build-and-config-genera.patch @@ -0,0 +1,292 @@ +From 05e3cc236406680a55e19b204202b63cdaf48ea1 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 1 Aug 2022 04:15:43 +0200 +Subject: [PATCH 01/28] Compact and simplify modules build and config + generation for Bind 9.x AD DLZ. + +Signed-off-by: Timur I. Bakeyev +--- + python/samba/provision/sambadns.py | 68 ++++++++++++------------------ + source4/dns_server/dlz_minimal.h | 44 +++++++++---------- + source4/dns_server/wscript_build | 62 +++------------------------ + source4/setup/named.conf.dlz | 25 +---------- + source4/torture/dns/wscript_build | 2 +- + 5 files changed, 55 insertions(+), 146 deletions(-) + +diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py +index 404b346a885..8e5a8ba5f25 100644 +--- a/python/samba/provision/sambadns.py ++++ b/python/samba/provision/sambadns.py +@@ -21,6 +21,7 @@ + """DNS-related provisioning""" + + import os ++import re + import uuid + import shutil + import time +@@ -1010,52 +1011,37 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): + stderr=subprocess.STDOUT, + cwd='.').communicate()[0] + bind_info = get_string(bind_info) +- bind9_8 = '#' +- bind9_9 = '#' +- bind9_10 = '#' +- bind9_11 = '#' +- bind9_12 = '#' +- bind9_14 = '#' +- bind9_16 = '#' +- bind9_18 = '#' +- if bind_info.upper().find('BIND 9.8') != -1: +- bind9_8 = '' +- elif bind_info.upper().find('BIND 9.9') != -1: +- bind9_9 = '' +- elif bind_info.upper().find('BIND 9.10') != -1: +- bind9_10 = '' +- elif bind_info.upper().find('BIND 9.11') != -1: +- bind9_11 = '' +- elif bind_info.upper().find('BIND 9.12') != -1: +- bind9_12 = '' +- elif bind_info.upper().find('BIND 9.14') != -1: +- bind9_14 = '' +- elif bind_info.upper().find('BIND 9.16') != -1: +- bind9_16 = '' +- elif bind_info.upper().find('BIND 9.18') != -1: +- bind9_18 = '' +- elif bind_info.upper().find('BIND 9.7') != -1: +- raise ProvisioningError("DLZ option incompatible with BIND 9.7.") +- elif bind_info.upper().find('BIND_9.13') != -1: +- raise ProvisioningError("Only stable/esv releases of BIND are supported.") +- elif bind_info.upper().find('BIND_9.15') != -1: +- raise ProvisioningError("Only stable/esv releases of BIND are supported.") +- elif bind_info.upper().find('BIND_9.17') != -1: +- raise ProvisioningError("Only stable/esv releases of BIND are supported.") ++ bind9_release = re.search('BIND (9)\.(\d+)\.', bind_info, re.I) ++ if bind9_release: ++ bind9_disabled = '' ++ bind9_version = bind9_release.group(0) + "x" ++ bind9_version_major = int(bind9_release.group(1)) ++ bind9_version_minor = int(bind9_release.group(2)) ++ if bind9_version_minor == 7: ++ raise ProvisioningError("DLZ option incompatible with BIND 9.7.") ++ elif bind9_version_minor == 8: ++ bind9_dlz_version = "9" ++ elif bind9_version_minor in [13, 15, 17]: ++ raise ProvisioningError("Only stable/esv releases of BIND are supported.") ++ else: ++ bind9_dlz_version = "%d_%d" % (bind9_version_major, bind9_version_minor) + else: ++ bind9_disabled = '# ' ++ bind9_version = "BIND z.y.x" ++ bind9_dlz_version = "z_y" + logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf) ++ ++ bind9_dlz = ( ++ ' # For %s\n' ++ ' %sdatabase "dlopen %s/bind9/dlz_bind%s.so";' ++ ) % ( ++ bind9_version, bind9_disabled, samba.param.modules_dir(), bind9_dlz_version ++ ) + setup_file(setup_path("named.conf.dlz"), paths.namedconf, { + "NAMED_CONF": paths.namedconf, + "MODULESDIR": samba.param.modules_dir(), +- "BIND9_8": bind9_8, +- "BIND9_9": bind9_9, +- "BIND9_10": bind9_10, +- "BIND9_11": bind9_11, +- "BIND9_12": bind9_12, +- "BIND9_14": bind9_14, +- "BIND9_16": bind9_16, +- "BIND9_18": bind9_18 +- }) ++ "BIND9_DLZ": bind9_dlz ++ }) + + + def create_named_txt(path, realm, dnsdomain, dnsname, binddns_dir, +diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h +index b7e36e7f8e6..bbdb616deb2 100644 +--- a/source4/dns_server/dlz_minimal.h ++++ b/source4/dns_server/dlz_minimal.h +@@ -26,31 +26,25 @@ + #include + #include + +-#if defined (BIND_VERSION_9_8) +-# error Bind 9.8 is not supported! +-#elif defined (BIND_VERSION_9_9) +-# error Bind 9.9 is not supported! +-#elif defined (BIND_VERSION_9_10) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 1 +-# define ISC_BOOLEAN_AS_BOOL 0 +-#elif defined (BIND_VERSION_9_11) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 2 +-# define ISC_BOOLEAN_AS_BOOL 0 +-#elif defined (BIND_VERSION_9_12) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 2 +-# define ISC_BOOLEAN_AS_BOOL 0 +-#elif defined (BIND_VERSION_9_14) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 2 +-#elif defined (BIND_VERSION_9_16) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 2 +-#elif defined (BIND_VERSION_9_18) +-# define DLZ_DLOPEN_VERSION 3 +-# define DNS_CLIENTINFO_VERSION 2 ++#if defined (BIND_VERSION) ++# if BIND_VERSION == 908 ++# error Bind 9.8 is not supported! ++# elif BIND_VERSION == 909 ++# error Bind 9.9 is not supported! ++# elif BIND_VERSION == 910 ++# define DLZ_DLOPEN_VERSION 3 ++# define DNS_CLIENTINFO_VERSION 1 ++# define ISC_BOOLEAN_AS_BOOL 0 ++# elif BIND_VERSION == 911 || BIND_VERSION == 912 ++# define DLZ_DLOPEN_VERSION 3 ++# define DNS_CLIENTINFO_VERSION 2 ++# define ISC_BOOLEAN_AS_BOOL 0 ++# elif BIND_VERSION >= 914 ++# define DLZ_DLOPEN_VERSION 3 ++# define DNS_CLIENTINFO_VERSION 2 ++# else ++# error Unsupported BIND version ++# endif + #else + # error Unsupported BIND version + #endif +diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build +index ab0a241b937..3743753504c 100644 +--- a/source4/dns_server/wscript_build ++++ b/source4/dns_server/wscript_build +@@ -20,69 +20,21 @@ bld.SAMBA_MODULE('service_dns', + ) + + # a bind9 dlz module giving access to the Samba DNS SAM +-bld.SAMBA_LIBRARY('dlz_bind9_10', ++for bind_version in (910, 911, 912, 914, 916, 918): ++ string_version='%d_%d' % (bind_version // 100, bind_version % 100) ++ bld.SAMBA_LIBRARY('dlz_bind%s' % (string_version), + source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_10', ++ cflags='-DBIND_VERSION=%d' % bind_version, + private_library=True, +- link_name='modules/bind9/dlz_bind9_10.so', +- realname='dlz_bind9_10.so', +- install_path='${MODULESDIR}/bind9', +- deps='samba-hostconfig samdb-common gensec popt dnsserver_common', +- enabled=bld.AD_DC_BUILD_IS_ENABLED()) +- +-bld.SAMBA_LIBRARY('dlz_bind9_11', +- source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_11', +- private_library=True, +- link_name='modules/bind9/dlz_bind9_11.so', +- realname='dlz_bind9_11.so', +- install_path='${MODULESDIR}/bind9', +- deps='samba-hostconfig samdb-common gensec popt dnsserver_common', +- enabled=bld.AD_DC_BUILD_IS_ENABLED()) +- +-bld.SAMBA_LIBRARY('dlz_bind9_12', +- source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_12', +- private_library=True, +- link_name='modules/bind9/dlz_bind9_12.so', +- realname='dlz_bind9_12.so', +- install_path='${MODULESDIR}/bind9', +- deps='samba-hostconfig samdb-common gensec popt dnsserver_common', +- enabled=bld.AD_DC_BUILD_IS_ENABLED()) +- +-bld.SAMBA_LIBRARY('dlz_bind9_14', +- source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_14', +- private_library=True, +- link_name='modules/bind9/dlz_bind9_14.so', +- realname='dlz_bind9_14.so', +- install_path='${MODULESDIR}/bind9', +- deps='samba-hostconfig samdb-common gensec popt dnsserver_common', +- enabled=bld.AD_DC_BUILD_IS_ENABLED()) +- +-bld.SAMBA_LIBRARY('dlz_bind9_16', +- source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_16', +- private_library=True, +- link_name='modules/bind9/dlz_bind9_16.so', +- realname='dlz_bind9_16.so', +- install_path='${MODULESDIR}/bind9', +- deps='samba-hostconfig samdb-common gensec popt dnsserver_common', +- enabled=bld.AD_DC_BUILD_IS_ENABLED()) +- +-bld.SAMBA_LIBRARY('dlz_bind9_18', +- source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_18', +- private_library=True, +- link_name='modules/bind9/dlz_bind9_18.so', +- realname='dlz_bind9_18.so', ++ link_name='modules/bind9/dlz_bind%s.so' % (string_version), ++ realname='dlz_bind%s.so' % (string_version), + install_path='${MODULESDIR}/bind9', + deps='samba-hostconfig samdb-common gensec popt dnsserver_common', + enabled=bld.AD_DC_BUILD_IS_ENABLED()) + + bld.SAMBA_LIBRARY('dlz_bind9_for_torture', + source='dlz_bind9.c', +- cflags='-DBIND_VERSION_9_16', ++ cflags='-DBIND_VERSION=918', + private_library=True, + deps='samba-hostconfig samdb-common gensec popt dnsserver_common', + enabled=bld.AD_DC_BUILD_IS_ENABLED()) +diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz +index cbe7d805f58..32672768af4 100644 +--- a/source4/setup/named.conf.dlz ++++ b/source4/setup/named.conf.dlz +@@ -10,28 +10,5 @@ + # Uncomment only single database line, depending on your BIND version + # + dlz "AD DNS Zone" { +- # For BIND 9.8.x +- ${BIND9_8} database "dlopen ${MODULESDIR}/bind9/dlz_bind9.so"; +- +- # For BIND 9.9.x +- ${BIND9_9} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_9.so"; +- +- # For BIND 9.10.x +- ${BIND9_10} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_10.so"; +- +- # For BIND 9.11.x +- ${BIND9_11} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_11.so"; +- +- # For BIND 9.12.x +- ${BIND9_12} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_12.so"; +- +- # For BIND 9.14.x +- ${BIND9_14} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_14.so"; +- +- # For BIND 9.16.x +- ${BIND9_16} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_16.so"; +- # +- # For BIND 9.18.x +- ${BIND9_18} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_18.so"; ++${BIND9_DLZ} + }; +- +diff --git a/source4/torture/dns/wscript_build b/source4/torture/dns/wscript_build +index 0b40e03e370..bf7415ff88a 100644 +--- a/source4/torture/dns/wscript_build ++++ b/source4/torture/dns/wscript_build +@@ -5,7 +5,7 @@ if bld.AD_DC_BUILD_IS_ENABLED(): + source='dlz_bind9.c', + subsystem='smbtorture', + init_function='torture_bind_dns_init', +- cflags='-DBIND_VERSION_9_16', ++ cflags='-DBIND_VERSION=918', + deps='torture talloc torturemain dlz_bind9_for_torture', + internal_module=True + ) +-- +2.37.1 + diff --git a/net/samba416/files/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch b/net/samba416/files/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch new file mode 100644 index 000000000000..fec7b9d07172 --- /dev/null +++ b/net/samba416/files/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch @@ -0,0 +1,35 @@ +From 639b8d650685476016a6d5b1c996a04ac54f8a6f Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 04:00:08 +0200 +Subject: [PATCH 02/28] Adjust abi_gen.sh script to run under FreeBSD with it's + own bintools and slightly different output of GDB. + +Substitution: yes + +Signed-off-by: Timur I. Bakeyev +--- + buildtools/scripts/abi_gen.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/buildtools/scripts/abi_gen.sh b/buildtools/scripts/abi_gen.sh +index ddb0a7cc36f..d2750705ff9 100755 +--- a/buildtools/scripts/abi_gen.sh ++++ b/buildtools/scripts/abi_gen.sh +@@ -9,6 +9,7 @@ GDBSCRIPT="gdb_syms.$$" + cat < $GDBSCRIPT + + # forcing the terminal avoids a problem on Fedora12 +-TERM=none gdb -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null ++TERM=none %%GDB_CMD%% -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null + rm -f $GDBSCRIPT +-- +2.37.1 + diff --git a/net/samba416/files/0003-Mask-CLang-prototype-warnings-in-kadm5-admin.h.patch b/net/samba416/files/0003-Mask-CLang-prototype-warnings-in-kadm5-admin.h.patch new file mode 100644 index 000000000000..8540609886da --- /dev/null +++ b/net/samba416/files/0003-Mask-CLang-prototype-warnings-in-kadm5-admin.h.patch @@ -0,0 +1,32 @@ +From 382c3edc95a1747e0a6edd05c76adc0ec21a66c7 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:50:17 +0200 +Subject: [PATCH 03/28] Mask CLang prototype warnings in kadm5/admin.h + +Signed-off-by: Timur I. Bakeyev +--- + source4/kdc/kdc-service-mit.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/source4/kdc/kdc-service-mit.c b/source4/kdc/kdc-service-mit.c +index 22663b6ecc8..5bef125206a 100644 +--- a/source4/kdc/kdc-service-mit.c ++++ b/source4/kdc/kdc-service-mit.c +@@ -36,9 +36,13 @@ + #include "kdc/samba_kdc.h" + #include "kdc/kdc-server.h" + #include "kdc/kpasswd-service.h" +-#include + #include + ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wstrict-prototypes" ++#include ++#pragma clang diagnostic pop ++ + #include "source4/kdc/mit_kdc_irpc.h" + + /* PROTOTYPES */ +-- +2.37.1 + diff --git a/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch b/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch new file mode 100644 index 000000000000..4df0249fced2 --- /dev/null +++ b/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch @@ -0,0 +1,38 @@ +From 0eb28116ceefee7bdafabac18a1763f13cb71883 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:42:31 +0200 +Subject: [PATCH 04/28] On FreeBSD `date(1)` has different semantics than on + Linux. Generate call parameter accordingly. + +FreeBSD: `date [[[[[cc]yy]mm]dd]HH]MM[.ss]` +Linux: `date [mmddHHMM[[cc]yy][.ss]]` + +Signed-off-by: Timur I. Bakeyev +--- + source3/utils/net_time.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c +index d102f84614f..f679000a979 100644 +--- a/source3/utils/net_time.c ++++ b/source3/utils/net_time.c +@@ -82,10 +82,15 @@ static const char *systime(time_t t) + if (!tm) { + return "unknown"; + } +- ++#if defined(FREEBSD) ++ return talloc_asprintf(talloc_tos(), "%04d%02d%02d%02d%02d.%02d", ++ tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, ++ tm->tm_hour, tm->tm_min, tm->tm_sec); ++#else + return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d", + tm->tm_mon+1, tm->tm_mday, tm->tm_hour, + tm->tm_min, tm->tm_year + 1900, tm->tm_sec); ++#endif + } + + int net_time_usage(struct net_context *c, int argc, const char **argv) +-- +2.37.1 + diff --git a/net/samba416/files/0005-Include-jemalloc-jemalloc.h-if-ENABLE_JEMALLOC-is-se.patch b/net/samba416/files/0005-Include-jemalloc-jemalloc.h-if-ENABLE_JEMALLOC-is-se.patch new file mode 100644 index 000000000000..a898a50f9972 --- /dev/null +++ b/net/samba416/files/0005-Include-jemalloc-jemalloc.h-if-ENABLE_JEMALLOC-is-se.patch @@ -0,0 +1,26 @@ +From 3cc67018c560d32b98523618d16902c1a670ed40 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:33:51 +0200 +Subject: [PATCH 05/28] Include jemalloc/jemalloc.h if ENABLE_JEMALLOC is set. + +Signed-off-by: Timur I. Bakeyev +--- + source3/include/includes.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/source3/include/includes.h b/source3/include/includes.h +index 510a0b96539..94a076de11e 100644 +--- a/source3/include/includes.h ++++ b/source3/include/includes.h +@@ -326,6 +326,8 @@ typedef char fstring[FSTRING_LEN]; + * the *bottom* of include files so as not to conflict. */ + #ifdef ENABLE_DMALLOC + # include ++#elif ENABLE_JEMALLOC ++# include + #endif + + +-- +2.37.1 + diff --git a/net/samba416/files/0006-Install-nss_-modules-into-PAMMODULESDIR-path.patch b/net/samba416/files/0006-Install-nss_-modules-into-PAMMODULESDIR-path.patch new file mode 100644 index 000000000000..9fa102f09d75 --- /dev/null +++ b/net/samba416/files/0006-Install-nss_-modules-into-PAMMODULESDIR-path.patch @@ -0,0 +1,32 @@ +From 406621efcd26d48b5e8f1e5df4082c8bf2cc8bab Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:32:21 +0200 +Subject: [PATCH 06/28] Install nss_* modules into PAMMODULESDIR path. + +Signed-off-by: Timur I. Bakeyev +--- + nsswitch/wscript_build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build +index 3247b6c2b7c..df2fc3b97ea 100644 +--- a/nsswitch/wscript_build ++++ b/nsswitch/wscript_build +@@ -54,12 +54,14 @@ elif (host_os.rfind('freebsd') > -1): + source='winbind_nss_linux.c winbind_nss_freebsd.c', + deps='wbclient', + realname='nss_winbind.so.1', ++ install_path='${PAMMODULESDIR}', + vnum='1') + + bld.SAMBA3_PLUGIN('nss_wins', + source='wins.c wins_freebsd.c', + deps='''wbclient''', + realname='nss_wins.so.1', ++ install_path='${PAMMODULESDIR}', + vnum='1') + + elif (host_os.rfind('netbsd') > -1): +-- +2.37.1 + diff --git a/net/samba416/files/0007-Use-macro-value-as-a-default-backlog-size-for-the-li.patch b/net/samba416/files/0007-Use-macro-value-as-a-default-backlog-size-for-the-li.patch new file mode 100644 index 000000000000..96fa888f3784 --- /dev/null +++ b/net/samba416/files/0007-Use-macro-value-as-a-default-backlog-size-for-the-li.patch @@ -0,0 +1,105 @@ +From 75f20f8e144a926873b619e1c0918896689d39a0 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:28:09 +0200 +Subject: [PATCH 07/28] Use macro value as a default backlog size for the + `listen()` syscall. + +Set that macro to -1 on FreeBSD, specifying maximum kernel configured +allowed backlog size. + +Signed-off-by: Timur I. Bakeyev +--- + lib/tevent/echo_server.c | 2 +- + source3/include/local.h | 11 +++++++++++ + source3/libsmb/unexpected.c | 2 +- + source3/utils/smbfilter.c | 2 +- + source3/winbindd/winbindd.c | 4 ++-- + 5 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/lib/tevent/echo_server.c b/lib/tevent/echo_server.c +index f93d8bcdee7..49354dbf0e5 100644 +--- a/lib/tevent/echo_server.c ++++ b/lib/tevent/echo_server.c +@@ -633,7 +633,7 @@ int main(int argc, const char **argv) + exit(1); + } + +- ret = listen(listen_sock, 5); ++ ret = listen(listen_sock, DEFAULT_LISTEN_BACKLOG); + if (ret == -1) { + perror("listen() failed"); + exit(1); +diff --git a/source3/include/local.h b/source3/include/local.h +index 297e5572fdb..d85aab09f9f 100644 +--- a/source3/include/local.h ++++ b/source3/include/local.h +@@ -163,7 +163,18 @@ + #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2) + + /* size of listen() backlog in smbd */ ++#if defined (FREEBSD) ++#define SMBD_LISTEN_BACKLOG -1 ++#else + #define SMBD_LISTEN_BACKLOG 50 ++#endif ++ ++/* size of listen() default backlog */ ++#if defined (FREEBSD) ++#define DEFAULT_LISTEN_BACKLOG -1 ++#else ++#define DEFAULT_LISTEN_BACKLOG 5 ++#endif + + /* Number of microseconds to wait before a sharing violation. */ + #define SHARING_VIOLATION_USEC_WAIT 950000 +diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c +index ced46969b88..317d6b1e0e2 100644 +--- a/source3/libsmb/unexpected.c ++++ b/source3/libsmb/unexpected.c +@@ -95,7 +95,7 @@ NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx, + status = map_nt_error_from_unix(errno); + goto fail; + } +- rc = listen(result->listen_sock, 5); ++ rc = listen(result->listen_sock, DEFAULT_LISTEN_BACKLOG); + if (rc < 0) { + status = map_nt_error_from_unix(errno); + goto fail; +diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c +index 3fbd63975c9..b2d90f993fc 100644 +--- a/source3/utils/smbfilter.c ++++ b/source3/utils/smbfilter.c +@@ -291,7 +291,7 @@ static void start_filter(char *desthost) + exit(1); + } + +- if (listen(s, 5) == -1) { ++ if (listen(s, DEFAULT_LISTEN_BACKLOG) == -1) { + d_printf("listen failed\n"); + } + +diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c +index 0f9c6449a5a..c2df0c92372 100644 +--- a/source3/winbindd/winbindd.c ++++ b/source3/winbindd/winbindd.c +@@ -1312,7 +1312,7 @@ static bool winbindd_setup_listeners(void) + if (pub_state->fd == -1) { + goto failed; + } +- rc = listen(pub_state->fd, 5); ++ rc = listen(pub_state->fd, DEFAULT_LISTEN_BACKLOG); + if (rc < 0) { + goto failed; + } +@@ -1344,7 +1344,7 @@ static bool winbindd_setup_listeners(void) + if (priv_state->fd == -1) { + goto failed; + } +- rc = listen(priv_state->fd, 5); ++ rc = listen(priv_state->fd, DEFAULT_LISTEN_BACKLOG); + if (rc < 0) { + goto failed; + } +-- +2.37.1 + diff --git a/net/samba416/files/0008-Brute-force-work-around-usage-of-Linux-specific-m-fl.patch b/net/samba416/files/0008-Brute-force-work-around-usage-of-Linux-specific-m-fl.patch new file mode 100644 index 000000000000..a9528247cec3 --- /dev/null +++ b/net/samba416/files/0008-Brute-force-work-around-usage-of-Linux-specific-m-fl.patch @@ -0,0 +1,111 @@ +From 29d0b3479f61f33356d6cc82099085b5c412f949 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:24:48 +0200 +Subject: [PATCH 08/28] Brute force work around usage of Linux-specific `%m` + flag in `sscanf()`. + +Signed-off-by: Timur I. Bakeyev +--- + libcli/http/http.c | 36 ++++++++++++++++++++++++++----- + source4/libcli/ldap/ldap_client.c | 12 +++++++++++ + 2 files changed, 43 insertions(+), 5 deletions(-) + +diff --git a/libcli/http/http.c b/libcli/http/http.c +index d20fc25f9e2..a28caca0045 100644 +--- a/libcli/http/http.c ++++ b/libcli/http/http.c +@@ -142,7 +142,19 @@ static enum http_read_status http_parse_headers(struct http_read_response_state + return HTTP_ALL_DATA_READ; + } + ++#ifdef FREEBSD ++ int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0; ++ n = sscanf(line, "%n%*[^:]%n: %n%*[^\r\n]%n\r\n", &s0, &s1, &s2, &s3); ++ ++ if(n >= 0) { ++ key = calloc(sizeof(char), s1-s0+1); ++ value = calloc(sizeof(char), s3-s2+1); ++ ++ n = sscanf(line, "%[^:]: %[^\r\n]\r\n", key, value); ++ } ++#else + n = sscanf(line, "%m[^:]: %m[^\r\n]\r\n", &key, &value); ++#endif + if (n != 2) { + DEBUG(0, ("%s: Error parsing header '%s'\n", __func__, line)); + status = HTTP_DATA_CORRUPTED; +@@ -168,7 +180,7 @@ error: + static bool http_parse_response_line(struct http_read_response_state *state) + { + bool status = true; +- char *protocol; ++ char *protocol = NULL; + char *msg = NULL; + char major; + char minor; +@@ -188,12 +200,22 @@ static bool http_parse_response_line(struct http_read_response_state *state) + return false; + } + ++#ifdef FREEBSD ++ int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0; ++ n = sscanf(line, "%n%*[^/]%n/%c.%c %d %n%*[^\r\n]%n\r\n", ++ &s0, &s1, &major, &minor, &code, &s2, &s3); ++ ++ if(n == 3) { ++ protocol = calloc(sizeof(char), s1-s0+1); ++ msg = calloc(sizeof(char), s3-s2+1); ++ ++ n = sscanf(line, "%[^/]/%c.%c %d %[^\r\n]\r\n", ++ protocol, &major, &minor, &code, msg); ++ } ++#else + n = sscanf(line, "%m[^/]/%c.%c %d %m[^\r\n]\r\n", + &protocol, &major, &minor, &code, &msg); +- +- DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, " +- "code->%d, message->%s\n", __func__, n, protocol, major, minor, +- code, msg)); ++#endif + + if (n != 5) { + DEBUG(0, ("%s: Error parsing header\n", __func__)); +@@ -201,6 +223,10 @@ static bool http_parse_response_line(struct http_read_response_state *state) + goto error; + } + ++ DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, " ++ "code->%d, message->%s\n", __func__, n, protocol, major, minor, ++ code, msg)); ++ + if (major != '1') { + DEBUG(0, ("%s: Bad HTTP major number '%c'\n", __func__, major)); + status = false; +diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c +index 8614ccdfd54..2630d3c8859 100644 +--- a/source4/libcli/ldap/ldap_client.c ++++ b/source4/libcli/ldap/ldap_client.c +@@ -402,8 +402,20 @@ static int ldap_parse_basic_url( + *pport = port; + return 0; + } ++#ifdef FREEBSD ++ int s0, s1; s0 = s1 = 0; ++ ret = sscanf(url, "%n%*[^:/]%n:%d", &s0, &s1, &port); + ++ if(ret >= 0) { ++ host = calloc(sizeof(char), s1 - s0 + 1); ++ if (host == NULL) { ++ return ENOMEM; ++ } ++ ret = sscanf(url, "%[^:/]:%d", host, &port); ++ } ++#else + ret = sscanf(url, "%m[^:/]:%d", &host, &port); ++#endif + if (ret < 1) { + return EINVAL; + } +-- +2.37.1 + diff --git a/net/samba416/files/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch b/net/samba416/files/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch new file mode 100644 index 000000000000..eed200921c65 --- /dev/null +++ b/net/samba416/files/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch @@ -0,0 +1,39 @@ +From 3189d57e9c6cf8d5d25566f2760cfa4f822d7a2c Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:21:19 +0200 +Subject: [PATCH 09/28] Make sure that config checks fail if the warning is + raised, by adding -Werror flag to the CFLAGS(WERROR_CFLAGS) + +Signed-off-by: Timur I. Bakeyev +--- + buildtools/wafsamba/samba_autoconf.py | 2 +- + lib/replace/wscript | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py +index 78927d85193..cf87c8bb9ff 100644 +--- a/buildtools/wafsamba/samba_autoconf.py ++++ b/buildtools/wafsamba/samba_autoconf.py +@@ -987,5 +987,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf): + conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True) + + if (conf.env.undefined_ignore_ldflags == [] and +- conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])): ++ conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)): + conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup'] +diff --git a/lib/replace/wscript b/lib/replace/wscript +index 0db93d8caf1..1f9806f1dd7 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -122,7 +122,7 @@ def configure(conf): + conf.CHECK_HEADERS('sys/atomic.h stdatomic.h') + conf.CHECK_HEADERS('libgen.h') + +- if conf.CHECK_CFLAGS('-Wno-format-truncation'): ++ if conf.CHECK_CFLAGS(['-Wno-format-truncation'] + conf.env.WERROR_CFLAGS): + conf.define('HAVE_WNO_FORMAT_TRUNCATION', '1') + + if conf.CHECK_CFLAGS('-Wno-unused-function'): +-- +2.37.1 + diff --git a/net/samba416/files/0010-Add-option-with-pkgconfigdir-to-specify-alternative-.patch b/net/samba416/files/0010-Add-option-with-pkgconfigdir-to-specify-alternative-.patch new file mode 100644 index 000000000000..966af1c790f1 --- /dev/null +++ b/net/samba416/files/0010-Add-option-with-pkgconfigdir-to-specify-alternative-.patch @@ -0,0 +1,54 @@ +From 5b0d17a5b7849f40f59fb0daedd62e8f5a1b0fba Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 03:16:37 +0200 +Subject: [PATCH 10/28] Add option --with-pkgconfigdir, to specify alternative + location. + +Override name of the config file. + +Remove code that doesn't allow direct install into /usr + +Substitution: yes + +Signed-off-by: Timur I. Bakeyev +--- + dynconfig/wscript | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/dynconfig/wscript b/dynconfig/wscript +index c62afa25399..29cacf1b92c 100644 +--- a/dynconfig/wscript ++++ b/dynconfig/wscript +@@ -151,6 +151,8 @@ dynconfig = { + 'PKGCONFIGDIR' : { + 'STD-PATH': '${LIBDIR}/pkgconfig', + 'FHS-PATH': '${LIBDIR}/pkgconfig', ++ 'OPTION': '--with-pkgconfigdir', ++ 'HELPTEXT': 'Where to put .pc files', + }, + 'CODEPAGEDIR' : { + 'STD-PATH': '${DATADIR}/codepages', +@@ -257,8 +259,8 @@ dynconfig = { + 'DELAY': True, + }, + 'CONFIGFILE' : { +- 'STD-PATH': '${CONFIGDIR}/smb.conf', +- 'FHS-PATH': '${CONFIGDIR}/smb.conf', ++ 'STD-PATH': '${CONFIGDIR}/%%SAMBA4_CONFIG%%', ++ 'FHS-PATH': '${CONFIGDIR}/%%SAMBA4_CONFIG%%', + 'DELAY': True, + }, + 'LMHOSTSFILE' : { +@@ -317,9 +319,6 @@ def configure(conf): + flavor = 'FHS-PATH' + else: + flavor = 'STD-PATH' +- if conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local': +- Logs.error("Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)") +- raise Errors.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX)) + + explicit_set ={} + +-- +2.37.1 + diff --git a/net/samba416/files/0011-Use-provided-by-port-location-of-the-XML-catalog.patch b/net/samba416/files/0011-Use-provided-by-port-location-of-the-XML-catalog.patch new file mode 100644 index 000000000000..1db26059aa84 --- /dev/null +++ b/net/samba416/files/0011-Use-provided-by-port-location-of-the-XML-catalog.patch @@ -0,0 +1,28 @@ +From 6c68907dcd9abd82cc95c842380a8e817b8f0e7f Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 02:54:28 +0200 +Subject: [PATCH 11/28] Use provided by port location of the XML catalog. + +Substitution: yes + +Signed-off-by: Timur I. Bakeyev +--- + buildtools/wafsamba/wafsamba.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py +index 7885ee720be..c42a021bc01 100644 +--- a/buildtools/wafsamba/wafsamba.py ++++ b/buildtools/wafsamba/wafsamba.py +@@ -1174,7 +1174,7 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None): + bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl' + bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl' + bld.env.SAMBA_CATALOG = bld.bldnode.abspath() + '/docs-xml/build/catalog.xml' +- bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog file://' + bld.env.SAMBA_CATALOG ++ bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file://%%LOCALBASE%%/share/xml/catalog file://' + bld.env.SAMBA_CATALOG + + for m in manpages.split(): + source = [m + '.xml'] +-- +2.37.1 + diff --git a/net/samba416/files/0012-Create-shared-libraries-according-to-the-FreeBSD-spe.patch b/net/samba416/files/0012-Create-shared-libraries-according-to-the-FreeBSD-spe.patch new file mode 100644 index 000000000000..240db55406c6 --- /dev/null +++ b/net/samba416/files/0012-Create-shared-libraries-according-to-the-FreeBSD-spe.patch @@ -0,0 +1,29 @@ +From 9731cc810b50b6694ff931135df398a6772200ae Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sun, 30 May 2021 02:51:47 +0200 +Subject: [PATCH 12/28] Create shared libraries according to the + FreeBSD-specific naming schema, where only major.minor versions are used. + +https://docs.freebsd.org/en/books/developers-handbook/policies/#policies-shlib + +Signed-off-by: Timur I. Bakeyev +--- + buildtools/wafsamba/samba_install.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py +index 2957e16c3da..82abbf893e2 100644 +--- a/buildtools/wafsamba/samba_install.py ++++ b/buildtools/wafsamba/samba_install.py +@@ -115,7 +115,7 @@ def install_library(self): + inst_name = bld.make_libname(t.target) + elif self.vnum: + vnum_base = self.vnum.split('.')[0] +- install_name = bld.make_libname(target_name, version=self.vnum) ++ install_name = bld.make_libname(target_name, version=vnum_base) + install_link = bld.make_libname(target_name, version=vnum_base) + inst_name = bld.make_libname(t.target) + if not self.private_library or not t.env.SONAME_ST: +-- +2.37.1 + diff --git a/net/samba416/files/0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch b/net/samba416/files/0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch new file mode 100644 index 000000000000..0508ba5113dd --- /dev/null +++ b/net/samba416/files/0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch @@ -0,0 +1,70 @@ +From 6be12b41eb0f71cfc25b5df6659dd176bd681621 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Thu, 8 Sep 2022 00:25:05 +0200 +Subject: [PATCH 13/28] Pass additional msg parameter to CHECK_LIB(), so it can + be transited to the conf.check(), which allows us to specify `match` + parameter to opt.add_option(). + +Signed-off-by: Timur I. Bakeyev +--- + buildtools/wafsamba/samba_autoconf.py | 9 ++++++--- + buildtools/wafsamba/wscript | 9 +++++++-- + 2 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py +index cf87c8bb9ff..f6c72d99125 100644 +--- a/buildtools/wafsamba/samba_autoconf.py ++++ b/buildtools/wafsamba/samba_autoconf.py +@@ -593,7 +593,7 @@ def library_flags(self, libs): + + + @conf +-def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False): ++def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False, msg=None): + '''check if a set of libraries exist as system libraries + + returns the sublist of libs that do exist as a syslib or [] +@@ -613,11 +613,14 @@ int foo() + ret.append(lib) + continue + ++ if msg is None: ++ msg = 'Checking for library %s' % lib ++ + (ccflags, ldflags, cpppath) = library_flags(conf, lib) + if shlib: +- res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) ++ res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg) + else: +- res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) ++ res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg) + + if not res: + if mandatory: +diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript +index a4d6f3e5c49..c047e1e8b5a 100644 +--- a/buildtools/wafsamba/wscript ++++ b/buildtools/wafsamba/wscript +@@ -133,12 +133,17 @@ Currently the only tested value is 'smbtorture,smbd/smbd' for Samba'''), + help=("private library directory [PREFIX/lib/%s]" % Context.g_module.APPNAME), + action="store", dest='PRIVATELIBDIR', default=None) + ++ opt.add_option('--with-openldap', ++ help='additional directory to search for OpenLDAP libs', ++ action='store', dest='ldap_open', default=None, ++ match = ['Checking for library lber', 'Checking for library ldap']) ++ + opt.add_option('--with-libiconv', + help='additional directory to search for libiconv', +- action='store', dest='iconv_open', default='/usr/local', ++ action='store', dest='iconv_open', default=None, + match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h']) + opt.add_option('--without-gettext', +- help=("Disable use of gettext"), ++ help=("disable use of gettext"), + action="store_true", dest='disable_gettext', default=False) + + gr = opt.option_group('developer options') +-- +2.37.1 + diff --git a/net/samba416/files/0014-Add-option-to-disable-CTDB-tests-failing-on-FreeBSD-.patch b/net/samba416/files/0014-Add-option-to-disable-CTDB-tests-failing-on-FreeBSD-.patch new file mode 100644 index 000000000000..32b02176de6b --- /dev/null +++ b/net/samba416/files/0014-Add-option-to-disable-CTDB-tests-failing-on-FreeBSD-.patch @@ -0,0 +1,77 @@ +From 2f16c17b683655fe318a1e6d45aaad3857d1a512 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 00:35:36 +0200 +Subject: [PATCH 14/28] Add option to disable CTDB tests - failing on FreeBSD + right now in too many places. + +Signed-off-by: Timur I. Bakeyev +--- + ctdb/wscript | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) + +diff --git a/ctdb/wscript b/ctdb/wscript +index a9fef9241aa..c89c6decdd7 100644 +--- a/ctdb/wscript ++++ b/ctdb/wscript +@@ -106,6 +106,9 @@ def options(opt): + opt.add_option('--enable-ceph-reclock', + help=("Enable Ceph CTDB recovery lock helper (default=no)"), + action="store_true", dest='ctdb_ceph_reclock', default=False) ++ opt.add_option('--disable-ctdb-tests', ++ help=("Disable CTDB tests (default=no)"), ++ action="store_true", dest='ctdb_no_tests', default=False) + + opt.add_option('--with-logdir', + help=("Path to log directory"), +@@ -278,7 +281,7 @@ def configure(conf): + + if Options.options.ctdb_ceph_reclock: + if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and +- conf.CHECK_LIB('rados', shlib=True)): ++ conf.CHECK_LIB('rados', shlib=True)): + Logs.info('Building with Ceph librados recovery lock support') + conf.define('HAVE_LIBRADOS', 1) + else: +@@ -317,8 +320,14 @@ def configure(conf): + conf.env.CTDB_VARDIR, + conf.env.CTDB_RUNDIR)) + +- conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests') +- conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests') ++ if Options.options.ctdb_no_tests: ++ conf.env.ctdb_tests = False ++ else: ++ conf.env.ctdb_tests = True ++ ++ if conf.env.ctdb_tests: ++ conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests') ++ conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests') + + # Allow unified compilation and separate compilation of utilities + # to find includes +@@ -706,9 +715,9 @@ def build(bld): + if bld.env.HAVE_LIBRADOS: + bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper', + source='utils/ceph/ctdb_mutex_ceph_rados_helper.c', +- deps='talloc tevent rados', +- includes='include', +- install_path='${CTDB_HELPER_BINDIR}') ++ deps='talloc tevent rados', ++ includes='include', ++ install_path='${CTDB_HELPER_BINDIR}') + + sed_expr1 = 's|/usr/local/var/lib/ctdb|%s|g' % (bld.env.CTDB_VARDIR) + sed_expr2 = 's|/usr/local/etc/ctdb|%s|g' % (bld.env.CTDB_ETCDIR) +@@ -885,6 +894,9 @@ def build(bld): + for d in ['volatile', 'persistent', 'state']: + bld.INSTALL_DIR(os.path.join(bld.env.CTDB_VARDIR, d)) + ++ if not bld.env.ctdb_tests: ++ return ++ + # + # Test-only below this point + # +-- +2.37.1 + diff --git a/net/samba416/files/0015-Add-extra-debug-class-to-trck-down-DB-locking-code.patch b/net/samba416/files/0015-Add-extra-debug-class-to-trck-down-DB-locking-code.patch new file mode 100644 index 000000000000..30b6a7a34a6e --- /dev/null +++ b/net/samba416/files/0015-Add-extra-debug-class-to-trck-down-DB-locking-code.patch @@ -0,0 +1,132 @@ +From 08e648c899e5023f337d2fa56e4e758f62f31ec4 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 00:38:38 +0200 +Subject: [PATCH 15/28] Add extra debug class to trck down DB locking code. + +Signed-off-by: Timur I. Bakeyev +--- + lib/dbwrap/dbwrap.c | 3 +++ + lib/dbwrap/dbwrap_local_open.c | 3 +++ + lib/dbwrap/dbwrap_rbt.c | 3 +++ + lib/dbwrap/dbwrap_tdb.c | 3 +++ + lib/dbwrap/dbwrap_util.c | 3 +++ + source3/lib/dbwrap/dbwrap_ctdb.c | 3 +++ + source3/lib/dbwrap/dbwrap_open.c | 3 +++ + source3/lib/dbwrap/dbwrap_watch.c | 3 +++ + 8 files changed, 24 insertions(+) + +diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c +index 7555efaa3ab..51f58fea851 100644 +--- a/lib/dbwrap/dbwrap.c ++++ b/lib/dbwrap/dbwrap.c +@@ -28,6 +28,9 @@ + #include "lib/util/util_tdb.h" + #include "lib/util/tevent_ntstatus.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + /* + * Fall back using fetch if no genuine exists operation is provided + */ +diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c +index 20c5fa0e1d2..b834bbd0e41 100644 +--- a/lib/dbwrap/dbwrap_local_open.c ++++ b/lib/dbwrap/dbwrap_local_open.c +@@ -23,6 +23,9 @@ + #include "dbwrap/dbwrap_tdb.h" + #include "tdb.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx, + const char *name, + int hash_size, int tdb_flags, +diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c +index db456dfffba..483558a6dc7 100644 +--- a/lib/dbwrap/dbwrap_rbt.c ++++ b/lib/dbwrap/dbwrap_rbt.c +@@ -24,6 +24,9 @@ + #include "../lib/util/rbtree.h" + #include "../lib/util/dlinklist.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + #define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15) + + struct db_rbt_ctx { +diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c +index 6cd95fa25ad..4a75cd80256 100644 +--- a/lib/dbwrap/dbwrap_tdb.c ++++ b/lib/dbwrap/dbwrap_tdb.c +@@ -29,6 +29,9 @@ + #include "lib/param/param.h" + #include "libcli/util/error.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + struct db_tdb_ctx { + struct tdb_wrap *wtdb; + +diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c +index df6dea40097..465814f0952 100644 +--- a/lib/dbwrap/dbwrap_util.c ++++ b/lib/dbwrap/dbwrap_util.c +@@ -26,6 +26,9 @@ + #include "dbwrap.h" + #include "lib/util/util_tdb.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + struct dbwrap_fetch_int32_state { + NTSTATUS status; + int32_t result; +diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c +index 0907089164a..9fc771d1217 100644 +--- a/source3/lib/dbwrap/dbwrap_ctdb.c ++++ b/source3/lib/dbwrap/dbwrap_ctdb.c +@@ -38,6 +38,9 @@ + #include "lib/cluster_support.h" + #include "lib/util/tevent_ntstatus.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + struct db_ctdb_transaction_handle { + struct db_ctdb_ctx *ctx; + /* +diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c +index 52c8a94aeff..caefb579058 100644 +--- a/source3/lib/dbwrap/dbwrap_open.c ++++ b/source3/lib/dbwrap/dbwrap_open.c +@@ -31,6 +31,9 @@ + #include "ctdbd_conn.h" + #include "global_contexts.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + bool db_is_local(const char *name) + { + const char *sockname = lp_ctdbd_socket(); +diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c +index 17a52de37cc..77f7b178229 100644 +--- a/source3/lib/dbwrap/dbwrap_watch.c ++++ b/source3/lib/dbwrap/dbwrap_watch.c +@@ -28,6 +28,9 @@ + #include "server_id_watch.h" + #include "lib/dbwrap/dbwrap_private.h" + ++#undef DBGC_CLASS ++#define DBGC_CLASS DBGC_LOCKING ++ + struct dbwrap_watcher { + /* + * Process watching this record +-- +2.37.1 + diff --git a/net/samba416/files/0016-Make-ldb_schema_attribute_compare-a-stable-comparisi.patch b/net/samba416/files/0016-Make-ldb_schema_attribute_compare-a-stable-comparisi.patch new file mode 100644 index 000000000000..3449ab2d17d9 --- /dev/null +++ b/net/samba416/files/0016-Make-ldb_schema_attribute_compare-a-stable-comparisi.patch @@ -0,0 +1,29 @@ +From 2b3ee747cdf83b80d07aaf1b261956bc9894ff36 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Thu, 8 Sep 2022 00:06:37 +0200 +Subject: [PATCH 16/28] Make ldb_schema_attribute_compare() a stable + comparision function. + +Signed-off-by: Timur I. Bakeyev +--- + lib/ldb/ldb_key_value/ldb_kv_cache.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/ldb/ldb_key_value/ldb_kv_cache.c b/lib/ldb/ldb_key_value/ldb_kv_cache.c +index 4a3c9f29020..cb200aeb9ba 100644 +--- a/lib/ldb/ldb_key_value/ldb_kv_cache.c ++++ b/lib/ldb/ldb_key_value/ldb_kv_cache.c +@@ -92,7 +92,9 @@ static int ldb_schema_attribute_compare(const void *p1, const void *p2) + { + const struct ldb_schema_attribute *sa1 = (const struct ldb_schema_attribute *)p1; + const struct ldb_schema_attribute *sa2 = (const struct ldb_schema_attribute *)p2; +- return ldb_attr_cmp(sa1->name, sa2->name); ++ int res = ldb_attr_cmp(sa1->name, sa2->name); ++ ++ return (res) ? res : (sa1->flags > sa2->flags) ? 1 : (sa1->flags < sa2->flags) ? -1 : 0; + } + + /* +-- +2.37.1 + diff --git a/net/samba416/files/0017-Use-arc4random-when-available-to-generate-random-tal.patch b/net/samba416/files/0017-Use-arc4random-when-available-to-generate-random-tal.patch new file mode 100644 index 000000000000..a7e7c7d99dbe --- /dev/null +++ b/net/samba416/files/0017-Use-arc4random-when-available-to-generate-random-tal.patch @@ -0,0 +1,49 @@ +From 42c9490dd346ee2f4369cbed4c37cb43f06e5d19 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Wed, 7 Sep 2022 23:52:43 +0200 +Subject: [PATCH 17/28] Use arc4random() when available to generate random + talloc slab signature. + +Signed-off-by: Timur I. Bakeyev +--- + lib/talloc/talloc.c | 4 ++++ + lib/talloc/wscript | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c +index 29da190880a..79c76fd9e35 100644 +--- a/lib/talloc/talloc.c ++++ b/lib/talloc/talloc.c +@@ -397,6 +397,9 @@ void talloc_lib_init(void) CONSTRUCTOR; + void talloc_lib_init(void) + { + uint32_t random_value; ++#if defined(HAVE_ARC4RANDOM) ++ random_value = arc4random(); ++#else + #if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM) + uint8_t *p; + /* +@@ -430,6 +433,7 @@ void talloc_lib_init(void) + */ + random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF); + } ++#endif /* HAVE_ARC4RANDOM */ + talloc_magic = random_value & ~TALLOC_FLAG_MASK; + } + #else +diff --git a/lib/talloc/wscript b/lib/talloc/wscript +index f0c266a7878..c75ec0505df 100644 +--- a/lib/talloc/wscript ++++ b/lib/talloc/wscript +@@ -52,6 +52,7 @@ def configure(conf): + + conf.CHECK_HEADERS('sys/auxv.h') + conf.CHECK_FUNCS('getauxval') ++ conf.CHECK_FUNCS('arc4random') + + conf.SAMBA_CONFIG_H() + +-- +2.37.1 + diff --git a/net/samba416/files/0018-Add-configuration-option-that-allows-to-choose-alter.patch b/net/samba416/files/0018-Add-configuration-option-that-allows-to-choose-alter.patch new file mode 100644 index 000000000000..5f5aa4af3a96 --- /dev/null +++ b/net/samba416/files/0018-Add-configuration-option-that-allows-to-choose-alter.patch @@ -0,0 +1,65 @@ +From b81d399aa6d9e2bdbb9db0efa8109c41aad4d025 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 02:49:20 +0200 +Subject: [PATCH 18/28] Add configuration option that allows to choose + alternative mDNS implementation dns_sd library. + +Signed-off-by: Timur I. Bakeyev +--- + source3/wscript | 12 ++++++++++++ + source3/wscript_build | 2 ++ + 2 files changed, 14 insertions(+) + +diff --git a/source3/wscript b/source3/wscript +index 2121b8b6510..6209472c6c8 100644 +--- a/source3/wscript ++++ b/source3/wscript +@@ -70,6 +70,7 @@ def options(opt): + opt.samba_add_onoff_option('sendfile-support', default=None) + opt.samba_add_onoff_option('utmp') + opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable") ++ opt.samba_add_onoff_option('dnssd', with_name="enable", without_name="disable") + opt.samba_add_onoff_option('iconv') + opt.samba_add_onoff_option('acl-support') + opt.samba_add_onoff_option('syslog') +@@ -855,6 +856,17 @@ msg.msg_accrightslen = sizeof(fd); + conf.SET_TARGET_TYPE('avahi-common', 'EMPTY') + conf.SET_TARGET_TYPE('avahi-client', 'EMPTY') + ++ if Options.options.with_dnssd: ++ conf.env.with_dnssd = True ++ if not conf.CHECK_HEADERS('dns_sd.h'): ++ conf.env.with_dnssd = False ++ if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'): ++ conf.env.with_dnssd = False ++ if conf.env.with_dnssd: ++ conf.DEFINE('WITH_DNSSD_SUPPORT', 1) ++ else: ++ conf.SET_TARGET_TYPE('dns_sd', 'EMPTY') ++ + if Options.options.with_iconv: + conf.env.with_iconv = True + if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'): +diff --git a/source3/wscript_build b/source3/wscript_build +index 5cf965dc45d..edd7985e648 100644 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -709,6 +709,7 @@ bld.SAMBA3_LIBRARY('smbd_base', + samba3core + param_service + AVAHI ++ dns_sd + PROFILE + LOCKING + LIBADS_SERVER +@@ -1128,6 +1129,7 @@ bld.SAMBA3_BINARY('client/smbclient', + msrpc3 + RPC_NDR_SRVSVC + cli_smb_common ++ dns_sd + archive + ''') + +-- +2.37.1 + diff --git a/net/samba416/files/0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch b/net/samba416/files/0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch new file mode 100644 index 000000000000..551acb212f55 --- /dev/null +++ b/net/samba416/files/0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch @@ -0,0 +1,544 @@ +From 5aabf82dfaf325bf682db85d80476224e7005a41 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 00:46:16 +0200 +Subject: [PATCH 19/28] From 923bc7a1afeb0b920e60e14846987ae1d2d7dca4 Mon Sep + 17 00:00:00 2001 From: John Hixson Date: Thu, 7 Dec 2017 + 09:36:32 -0500 Subject: [PATCH] Freenas/master mdns fixes (#22) + +* mDNS fixes for Samba (work in progress). +* Fix mDNS - Can advertise on individual interfaces +* Fix mDNS browsing in smbclient + +Signed-off-by: Timur I. Bakeyev +Signed-off-by: Timur I. Bakeyev +--- + source3/client/dnsbrowse.c | 19 +- + source3/smbd/dnsregister.c | 354 ++++++++++++++++++++++++++++++------- + 2 files changed, 299 insertions(+), 74 deletions(-) + +diff --git a/source3/client/dnsbrowse.c b/source3/client/dnsbrowse.c +index be6eb881cf1..83aef966d2a 100644 +--- a/source3/client/dnsbrowse.c ++++ b/source3/client/dnsbrowse.c +@@ -39,6 +39,7 @@ struct mdns_smbsrv_result + struct mdns_browse_state + { + struct mdns_smbsrv_result *listhead; /* Browse result list head */ ++ TALLOC_CTX * ctx; + int browseDone; + + }; +@@ -64,7 +65,7 @@ static void do_smb_resolve(struct mdns_smbsrv_result *browsesrv) + struct timeval tv; + DNSServiceErrorType err; + +- TALLOC_CTX * ctx = talloc_tos(); ++ TALLOC_CTX * ctx = talloc_new(NULL); + + err = DNSServiceResolve(&mdns_conn_sdref, 0 /* flags */, + browsesrv->ifIndex, +@@ -91,7 +92,7 @@ static void do_smb_resolve(struct mdns_smbsrv_result *browsesrv) + } + } + +- TALLOC_FREE(fdset); ++ TALLOC_FREE(ctx); + DNSServiceRefDeallocate(mdns_conn_sdref); + } + +@@ -124,18 +125,19 @@ do_smb_browse_reply(DNSServiceRef sdRef, DNSServiceFlags flags, + return; + } + +- bresult = talloc_array(talloc_tos(), struct mdns_smbsrv_result, 1); ++ bresult = talloc_array(bstatep->ctx, struct mdns_smbsrv_result, 1); + if (bresult == NULL) { + return; + } + ++ bresult->nextResult = NULL; + if (bstatep->listhead != NULL) { + bresult->nextResult = bstatep->listhead; + } + +- bresult->serviceName = talloc_strdup(talloc_tos(), serviceName); +- bresult->regType = talloc_strdup(talloc_tos(), regtype); +- bresult->domain = talloc_strdup(talloc_tos(), replyDomain); ++ bresult->serviceName = talloc_strdup(bstatep->ctx, serviceName); ++ bresult->regType = talloc_strdup(bstatep->ctx, regtype); ++ bresult->domain = talloc_strdup(bstatep->ctx, replyDomain); + bresult->ifIndex = interfaceIndex; + bstatep->listhead = bresult; + } +@@ -151,10 +153,13 @@ int do_smb_browse(void) + DNSServiceRef mdns_conn_sdref = NULL; + DNSServiceErrorType err; + +- TALLOC_CTX * ctx = talloc_stackframe(); ++ TALLOC_CTX * ctx = talloc_new(NULL); + + ZERO_STRUCT(bstate); + ++ bstate.ctx = ctx; ++ bstate.listhead = NULL; ++ + err = DNSServiceBrowse(&mdns_conn_sdref, 0, 0, "_smb._tcp", "", + do_smb_browse_reply, &bstate); + +diff --git a/source3/smbd/dnsregister.c b/source3/smbd/dnsregister.c +index df189001a09..389a4278f64 100644 +--- a/source3/smbd/dnsregister.c ++++ b/source3/smbd/dnsregister.c +@@ -29,6 +29,29 @@ + * browse for advertised SMB services. + */ + ++/* ++ * Time Machine Errata: ++ * sys=adVF=0x100 -- this is required when ._adisk._tcp is present on device. When it is ++ * set, the MacOS client will send a NetShareEnumAll IOCTL and shares will be visible. ++ * Otherwise, Finder will only see the Time Machine share. In the absence of ._adisk._tcp ++ * MacOS will _always_ send NetShareEnumAll IOCTL. ++ * ++ * waMa=0 -- MacOS server uses waMa=0, while embedded devices have it set to their Mac Address. ++ * Speculation in Samba-Technical indicates that this stands for "Wireless AirDisk Mac Address". ++ * ++ * adVU -- AirDisk Volume UUID. Mac OS servers generate a UUID. Time machine over SMB works without one ++ * set. Netatalk generates a UUID and stores it persistently in afp_voluuid.conf. This can be ++ * set by adding the share parameter "fruit:volume_uuid = " ++ * ++ * dk(n)=adVF= ++ * 0xa1, 0x81 - AFP support ++ * 0xa2, 0x82 - SMB support ++ * 0xa3, 0x83 - AFP and SMB support ++ * ++ * adVN -- AirDisk Volume Name. We set this to the share name. ++ * ++ */ ++ + #define DNS_REG_RETRY_INTERVAL (5*60) /* in seconds */ + + #ifdef WITH_DNSSD_SUPPORT +@@ -36,85 +59,177 @@ + #include + + struct dns_reg_state { +- struct tevent_context *event_ctx; +- uint16_t port; +- DNSServiceRef srv_ref; +- struct tevent_timer *te; +- int fd; +- struct tevent_fd *fde; ++ int count; ++ struct reg_state { ++ DNSServiceRef srv_ref; ++ TALLOC_CTX *mem_ctx; ++ struct tevent_context *event_ctx; ++ struct tevent_timer *te; ++ struct tevent_fd *fde; ++ uint16_t port; ++ int if_index; ++ int fd; ++ } *drs; + }; + +-static int dns_reg_state_destructor(struct dns_reg_state *dns_state) ++static void dns_register_smbd_retry(struct tevent_context *ctx, ++ struct tevent_timer *te, ++ struct timeval now, ++ void *private_data); ++static void dns_register_smbd_fde_handler(struct tevent_context *ev, ++ struct tevent_fd *fde, ++ uint16_t flags, ++ void *private_data); ++ ++ ++static int reg_state_destructor(struct reg_state *state) + { +- if (dns_state->srv_ref != NULL) { ++ if (state == NULL) { ++ return -1; ++ } ++ ++ if (state->srv_ref != NULL) { + /* Close connection to the mDNS daemon */ +- DNSServiceRefDeallocate(dns_state->srv_ref); +- dns_state->srv_ref = NULL; ++ DNSServiceRefDeallocate(state->srv_ref); ++ state->srv_ref = NULL; + } + + /* Clear event handler */ +- TALLOC_FREE(dns_state->te); +- TALLOC_FREE(dns_state->fde); +- dns_state->fd = -1; ++ TALLOC_FREE(state->te); ++ TALLOC_FREE(state->fde); ++ state->fd = -1; + + return 0; + } + +-static void dns_register_smbd_retry(struct tevent_context *ctx, +- struct tevent_timer *te, +- struct timeval now, +- void *private_data); +-static void dns_register_smbd_fde_handler(struct tevent_context *ev, +- struct tevent_fd *fde, +- uint16_t flags, +- void *private_data); ++int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... ) ++{ ++ int ret = 0; ++ char *str; ++ va_list ap; ++ va_start( ap, fmt ); ++ ++ if( 0 > vasprintf(&str, fmt, ap ) ) { ++ va_end(ap); ++ return -1; ++ } ++ va_end(ap); ++ ++ if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) { ++ ret = -1; ++ } ++ ++ free(str); ++ return ret; ++} ++ ++int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...) ++{ ++ int ret = 0; ++ char *key = NULL, *str = NULL; ++ va_list ap; ++ ++ if( 0 > asprintf(&key, key_fmt, key_var)) { ++ DEBUG(1, ("Failed in asprintf\n")); ++ return -1; ++ } + +-static bool dns_register_smbd_schedule(struct dns_reg_state *dns_state, ++ va_start( ap, fmt ); ++ if( 0 > vasprintf(&str, fmt, ap )) { ++ va_end(ap); ++ DEBUG(1, ("Failed in vasprintf\n")); ++ ret = -1; ++ goto exit; ++ } ++ va_end(ap); ++ ++ if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) { ++ DEBUG(1, ("Failed in TXTRecordSetValuen")); ++ ret = -1; ++ goto exit; ++ } ++ ++ exit: ++ if (str) ++ free(str); ++ if (key) ++ free(key); ++ return ret; ++} ++ ++ ++static bool dns_register_smbd_schedule(struct reg_state *state, + struct timeval tval) + { +- dns_reg_state_destructor(dns_state); ++ reg_state_destructor(state); + +- dns_state->te = tevent_add_timer(dns_state->event_ctx, +- dns_state, ++ state->te = tevent_add_timer(state->event_ctx, ++ state->mem_ctx, + tval, + dns_register_smbd_retry, +- dns_state); +- if (!dns_state->te) { ++ state); ++ if (!state->te) { + return false; + } + + return true; + } + ++static void dns_register_smbd_callback(DNSServiceRef service, ++ DNSServiceFlags flags, ++ DNSServiceErrorType errorCode, ++ const char *name, ++ const char *type, ++ const char *domain, ++ void *context) ++{ ++ if (errorCode != kDNSServiceErr_NoError) { ++ DEBUG(6, ("error=%d\n", errorCode)); ++ } else { ++ DEBUG(6, ("%-15s %s.%s%s\n", "REGISTER", name, type, domain)); ++ } ++} ++ + static void dns_register_smbd_retry(struct tevent_context *ctx, + struct tevent_timer *te, + struct timeval now, + void *private_data) + { +- struct dns_reg_state *dns_state = talloc_get_type_abort(private_data, +- struct dns_reg_state); ++ struct reg_state *state = (struct reg_state *)private_data; + DNSServiceErrorType err; ++ int snum; ++ size_t dk = 0; ++ bool sys_txt_created = false; ++ TXTRecordRef txt_adisk; ++ TXTRecordRef txt_devinfo; ++ char *servname; ++ char *v_uuid; ++ int num_services = lp_numservices(); ++ ++ reg_state_destructor(state); + +- dns_reg_state_destructor(dns_state); ++ TXTRecordCreate(&txt_adisk, 0, NULL); + +- DEBUG(6, ("registering _smb._tcp service on port %d\n", +- dns_state->port)); ++ DEBUG(6, ("registering _smb._tcp service on port %d index %d\n", ++ state->port, state->if_index)); + + /* Register service with DNS. Connects with the mDNS + * daemon running on the local system to perform DNS + * service registration. + */ +- err = DNSServiceRegister(&dns_state->srv_ref, 0 /* flags */, +- kDNSServiceInterfaceIndexAny, +- NULL /* service name */, +- "_smb._tcp" /* service type */, +- NULL /* domain */, +- "" /* SRV target host name */, +- htons(dns_state->port), +- 0 /* TXT record len */, +- NULL /* TXT record data */, +- NULL /* callback func */, +- NULL /* callback context */); ++ err = DNSServiceRegister(&state->srv_ref, ++ 0 /* flags */, ++ state->if_index /* interface index */, ++ NULL /* service name */, ++ "_smb._tcp" /* service type */, ++ NULL /* domain */, ++ "" /* SRV target host name */, ++ htons(state->port) /* port */, ++ 0 /* TXT record len */, ++ NULL /* TXT record data */, ++ dns_register_smbd_callback /* callback func */, ++ NULL /* callback context */); ++ + + if (err != kDNSServiceErr_NoError) { + /* Failed to register service. Schedule a re-try attempt. +@@ -123,24 +238,96 @@ static void dns_register_smbd_retry(struct tevent_context *ctx, + goto retry; + } + +- dns_state->fd = DNSServiceRefSockFD(dns_state->srv_ref); +- if (dns_state->fd == -1) { ++ /* ++ * Check for services that are configured as Time Machine targets ++ * ++ */ ++ for (snum = 0; snum < num_services; snum++) { ++ if (lp_snum_ok(snum) && lp_parm_bool(snum, "fruit", "time machine", false)) ++ { ++ if (!sys_txt_created) { ++ if( 0 > TXTRecordPrintf(&txt_adisk, "sys", "adVF=0x100") ) { ++ DEBUG(1, ("Failed to create Zeroconf TXTRecord for sys") ); ++ goto retry; ++ } ++ else ++ { ++ sys_txt_created = true; ++ } ++ } ++ ++ v_uuid = lp_parm_const_string(snum, "fruit", "volume_uuid", NULL); ++ servname = lp_const_servicename(snum); ++ DEBUG(1, ("Registering volume %s for TimeMachine\n", servname)); ++ if (v_uuid) { ++ if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82,adVU=%s", ++ servname, v_uuid) ) { ++ DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk)); ++ goto retry; ++ } ++ DEBUG(1, ("Registering TimeMachine with the following TXT parameters: " ++ "dk%zu,adVN=%s,adVF=0x82,adVU=%s\n", dk, servname, v_uuid) ); ++ } ++ else { ++ if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82", ++ servname) ) { ++ DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk)); ++ goto retry; ++ } ++ DEBUG(1, ("Registering TimeMachine with the following TXT parameters: " ++ "dk%zu,adVN=%s,adVF=0x82\n", dk, servname) ); ++ } ++ } ++ } ++ ++ if (dk) { ++ err = DNSServiceRegister(&state->srv_ref, ++ 0 /* flags */, ++ state->if_index /* interface index */, ++ NULL /* service name */, ++ "_adisk._tcp" /* service type */, ++ NULL /* domain */, ++ "" /* SRV target host name */, ++ /* ++ * We would probably use port 0 zero, but we can't, from man DNSServiceRegister: ++ * "A value of 0 for a port is passed to register placeholder services. ++ * Place holder services are not found when browsing, but other ++ * clients cannot register with the same name as the placeholder service." ++ * We therefor use port 9 which is used by the adisk service type. ++ */ ++ htons(9) /* port */, ++ TXTRecordGetLength(&txt_adisk) /* TXT record len */, ++ TXTRecordGetBytesPtr(&txt_adisk) /* TXT record data */, ++ dns_register_smbd_callback /* callback func */, ++ NULL /* callback context */); ++ ++ ++ if (err != kDNSServiceErr_NoError) { ++ /* Failed to register service. Schedule a re-try attempt. ++ */ ++ DEBUG(1, ("unable to register with mDNS (err %d)\n", err)); ++ goto retry; ++ } ++ } ++ ++ state->fd = DNSServiceRefSockFD(state->srv_ref); ++ if (state->fd == -1) { + goto retry; + } + +- dns_state->fde = tevent_add_fd(dns_state->event_ctx, +- dns_state, +- dns_state->fd, +- TEVENT_FD_READ, +- dns_register_smbd_fde_handler, +- dns_state); +- if (!dns_state->fde) { ++ state->fde = tevent_add_fd(state->event_ctx, ++ state->mem_ctx, ++ state->fd, ++ TEVENT_FD_READ, ++ dns_register_smbd_fde_handler, ++ state); ++ if (!state->fde) { + goto retry; + } + + return; + retry: +- dns_register_smbd_schedule(dns_state, ++ dns_register_smbd_schedule(state, + timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0)); + } + +@@ -150,44 +337,77 @@ static void dns_register_smbd_fde_handler(struct tevent_context *ev, + uint16_t flags, + void *private_data) + { +- struct dns_reg_state *dns_state = talloc_get_type_abort(private_data, +- struct dns_reg_state); ++ struct reg_state *state = (struct reg_state *)private_data; + DNSServiceErrorType err; + +- err = DNSServiceProcessResult(dns_state->srv_ref); ++ err = DNSServiceProcessResult(state->srv_ref); + if (err != kDNSServiceErr_NoError) { +- DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n", +- err)); ++ DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n", err)); + goto retry; + } + +- talloc_free(dns_state); + return; + + retry: +- dns_register_smbd_schedule(dns_state, +- timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0)); ++ dns_register_smbd_schedule(state, timeval_zero()); + } + ++static int dns_reg_state_destructor(struct dns_reg_state *state) ++{ ++ if (state != NULL) { ++ talloc_free(state); ++ } ++ return 0; ++} ++ ++ + bool smbd_setup_mdns_registration(struct tevent_context *ev, + TALLOC_CTX *mem_ctx, + uint16_t port) + { + struct dns_reg_state *dns_state; ++ bool bind_all = true; ++ int i; + + dns_state = talloc_zero(mem_ctx, struct dns_reg_state); +- if (dns_state == NULL) { ++ if (dns_state == NULL) ++ return false; ++ ++ if (lp_interfaces() && lp_bind_interfaces_only()) ++ bind_all = false; ++ ++ dns_state->count = iface_count(); ++ if (dns_state->count <= 0 || bind_all == true) ++ dns_state->count = 1; ++ ++ dns_state->drs = talloc_array(mem_ctx, struct reg_state, dns_state->count); ++ if (dns_state->drs == NULL) { ++ talloc_free(dns_state); + return false; + } +- dns_state->event_ctx = ev; +- dns_state->port = port; +- dns_state->fd = -1; + +- talloc_set_destructor(dns_state, dns_reg_state_destructor); ++ for (i = 0; i < dns_state->count; i++) { ++ struct interface *iface = get_interface(i); ++ struct reg_state *state = &dns_state->drs[i]; ++ ++ state->mem_ctx = mem_ctx; ++ state->srv_ref = NULL; ++ state->event_ctx = ev; ++ state->te = NULL; ++ state->fde = NULL; ++ state->port = port; ++ state->fd = -1; + +- return dns_register_smbd_schedule(dns_state, timeval_zero()); ++ state->if_index = bind_all ? kDNSServiceInterfaceIndexAny : iface->if_index; ++ ++ dns_register_smbd_schedule(&dns_state->drs[i], timeval_zero()); ++ } ++ ++ talloc_set_destructor(dns_state, dns_reg_state_destructor); ++ return true; + } + ++ + #else /* WITH_DNSSD_SUPPORT */ + + bool smbd_setup_mdns_registration(struct tevent_context *ev, +-- +2.37.1 + diff --git a/net/samba416/files/0020-FreeBSD-12-between-r336017-and-r342928-wrongfuly-ret.patch b/net/samba416/files/0020-FreeBSD-12-between-r336017-and-r342928-wrongfuly-ret.patch new file mode 100644 index 000000000000..33661270ce25 --- /dev/null +++ b/net/samba416/files/0020-FreeBSD-12-between-r336017-and-r342928-wrongfuly-ret.patch @@ -0,0 +1,35 @@ +From 02b599cc740490fa6f433b0c455fe458fdc1db61 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 02:45:11 +0200 +Subject: [PATCH 20/28] FreeBSD 12 between r336017 and r342928 wrongfuly return + ENOENT for the not enabled qoutas on ZFS. Wrap relevant error code check with + the versioning ifdef's. + +Signed-off-by: Timur I. Bakeyev +--- + source3/lib/sysquotas_4B.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/source3/lib/sysquotas_4B.c b/source3/lib/sysquotas_4B.c +index d9beb924ad9..c41cac02e5f 100644 +--- a/source3/lib/sysquotas_4B.c ++++ b/source3/lib/sysquotas_4B.c +@@ -140,7 +140,14 @@ static int sys_quotactl_4B(const char * path, int cmd, + /* ENOTSUP means quota support is not compiled in. EINVAL + * means that quotas are not configured (commonly). + */ +- if (errno != ENOTSUP && errno != EINVAL) { ++ if (errno != ENOTSUP && errno != EINVAL ++/* ++ * FreeBSD 12 between r336017 and r342928 wrongfuly return ENOENT for the not enabled qoutas on ZFS. ++ */ ++#if defined(__FreeBSD__) && ((__FreeBSD_version >= 1102503 && __FreeBSD_version <= 1102506) || (__FreeBSD_version >= 1200072 && __FreeBSD_version <= 1200503) || (__FreeBSD_version >= 1300000 && __FreeBSD_version <= 1300009)) ++ && errno != ENOENT ++#endif ++ ) { + DEBUG(5, ("failed to %s quota for %s ID %u on %s: %s\n", + (cmd & QCMD(Q_GETQUOTA, 0)) ? "get" : "set", + (cmd & QCMD(0, GRPQUOTA)) ? "group" : "user", +-- +2.37.1 + diff --git a/net/samba416/files/0021-Fix-casting-warnings-in-the-nfs_quota-debug-message.patch b/net/samba416/files/0021-Fix-casting-warnings-in-the-nfs_quota-debug-message.patch new file mode 100644 index 000000000000..c364031b4603 --- /dev/null +++ b/net/samba416/files/0021-Fix-casting-warnings-in-the-nfs_quota-debug-message.patch @@ -0,0 +1,36 @@ +From 46f5b54aa5761541a16108d66764d662f37f04d2 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 02:41:48 +0200 +Subject: [PATCH 21/28] Fix casting warnings in the nfs_quota debug message. + +Initialize quota structure with zeros. + +Signed-off-by: Timur I. Bakeyev +--- + source3/smbd/quotas.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c +index 604631f81d6..c23fa49b3b0 100644 +--- a/source3/smbd/quotas.c ++++ b/source3/smbd/quotas.c +@@ -125,6 +125,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t + if (!cutstr) + return False; + ++ memset(&D, '\0', sizeof(D)); + memset(cutstr, '\0', len+1); + host = strncat(cutstr,mnttype, sizeof(char) * len ); + DEBUG(5,("nfs_quotas: looking for mount on \"%s\"\n", cutstr)); +@@ -133,7 +134,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t + args.gqa_pathp = testpath+1; + args.gqa_uid = uid; + +- DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%i\" rpcvers \"%i\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp")); ++ DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%lu\" rpcvers \"%lu\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp")); + + if ((clnt = clnt_create(host, RQUOTAPROG, RQUOTAVERS, "udp")) == NULL) { + ret = False; +-- +2.37.1 + diff --git a/net/samba416/files/0022-Clean-up-UTMP-handling-code-and-add-FreeBSD-support..patch b/net/samba416/files/0022-Clean-up-UTMP-handling-code-and-add-FreeBSD-support..patch new file mode 100644 index 000000000000..9c430425138f --- /dev/null +++ b/net/samba416/files/0022-Clean-up-UTMP-handling-code-and-add-FreeBSD-support..patch @@ -0,0 +1,340 @@ +From 5019ad026f106d51dc2bb4c410a05b2f63b56cd0 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 01:43:13 +0200 +Subject: [PATCH 22/28] Clean up UTMP handling code and add FreeBSD support. + Some really legacy platforms may have been dropped as a result. + +Signed-off-by: Timur I. Bakeyev +--- + source3/smbd/utmp.c | 156 ++++++++++++-------------------------------- + source3/wscript | 37 ++++++----- + 2 files changed, 63 insertions(+), 130 deletions(-) + +diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c +index 4327301e3b1..f4a8362dd56 100644 +--- a/source3/smbd/utmp.c ++++ b/source3/smbd/utmp.c +@@ -257,7 +257,7 @@ static char *uw_pathname(TALLOC_CTX *ctx, + Update utmp file directly. No subroutine interface: probably a BSD system. + ****************************************************************************/ + +-static void pututline_my(const char *uname, struct utmp *u, bool claim) ++static void pututline_my(const char *uname, STRUCT_UTMP *u, bool claim) + { + DEBUG(1,("pututline_my: not yet implemented\n")); + /* BSD implementor: may want to consider (or not) adjusting "lastlog" */ +@@ -271,7 +271,7 @@ static void pututline_my(const char *uname, struct utmp *u, bool claim) + Credit: Michail Vidiassov + ****************************************************************************/ + +-static void updwtmp_my(const char *wname, struct utmp *u, bool claim) ++static void updwtmp_my(const char *wname, STRUCT_UTMP *u, bool claim) + { + int fd; + struct stat buf; +@@ -303,7 +303,7 @@ static void updwtmp_my(const char *wname, struct utmp *u, bool claim) + if ((fd = open(wname, O_WRONLY|O_APPEND, 0)) < 0) + return; + if (fstat(fd, &buf) == 0) { +- if (write(fd, (char *)u, sizeof(struct utmp)) != sizeof(struct utmp)) ++ if (write(fd, (char *)u, sizeof(STRUCT_UTMP)) != sizeof(STRUCT_UTMP)) + (void) ftruncate(fd, buf.st_size); + } + (void) close(fd); +@@ -314,12 +314,12 @@ static void updwtmp_my(const char *wname, struct utmp *u, bool claim) + Update via utmp/wtmp (not utmpx/wtmpx). + ****************************************************************************/ + +-static void utmp_nox_update(struct utmp *u, bool claim) ++static void utmp_nox_update(STRUCT_UTMP *u, bool claim) + { + char *uname = NULL; + char *wname = NULL; + #if defined(PUTUTLINE_RETURNS_UTMP) +- struct utmp *urc; ++ STRUCT_UTMP *urc; + #endif /* PUTUTLINE_RETURNS_UTMP */ + + uname = uw_pathname(talloc_tos(), "utmp", ut_pathname); +@@ -376,127 +376,52 @@ static void utmp_nox_update(struct utmp *u, bool claim) + } + } + +-/**************************************************************************** +- Copy a string in the utmp structure. +-****************************************************************************/ + +-static void utmp_strcpy(char *dest, const char *src, size_t n) +-{ +- size_t len = 0; +- +- memset(dest, '\0', n); +- if (src) +- len = strlen(src); +- if (len >= n) { +- memcpy(dest, src, n); +- } else { +- if (len) +- memcpy(dest, src, len); +- } +-} ++ ++ + + /**************************************************************************** + Update via utmpx/wtmpx (preferred) or via utmp/wtmp. + ****************************************************************************/ + +-static void sys_utmp_update(struct utmp *u, const char *hostname, bool claim) ++static void sys_utmp_update(STRUCT_UTMP *u, const char *hostname, bool claim) + { +-#if !defined(HAVE_UTMPX_H) +- /* No utmpx stuff. Drop to non-x stuff */ +- utmp_nox_update(u, claim); +-#elif !defined(HAVE_PUTUTXLINE) +- /* Odd. Have utmpx.h but no "pututxline()". Drop to non-x stuff */ +- DEBUG(1,("utmp_update: have utmpx.h but no pututxline() function\n")); +- utmp_nox_update(u, claim); +-#elif !defined(HAVE_GETUTMPX) +- /* Odd. Have utmpx.h but no "getutmpx()". Drop to non-x stuff */ +- DEBUG(1,("utmp_update: have utmpx.h but no getutmpx() function\n")); +- utmp_nox_update(u, claim); +-#elif !defined(HAVE_UPDWTMPX) +- /* Have utmpx.h but no "updwtmpx()". Drop to non-x stuff */ +- DEBUG(1,("utmp_update: have utmpx.h but no updwtmpx() function\n")); +- utmp_nox_update(u, claim); +-#else +- char *uname = NULL; +- char *wname = NULL; +- struct utmpx ux, *uxrc; +- +- getutmpx(u, &ux); +- +-#if defined(HAVE_UX_UT_SYSLEN) +- if (hostname) +- ux.ut_syslen = strlen(hostname) + 1; /* include end NULL */ +- else +- ux.ut_syslen = 0; +-#endif +-#if defined(HAVE_UX_UT_HOST) +- utmp_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host)); +-#endif +- +- uname = uw_pathname(talloc_tos(), "utmpx", ux_pathname); +- wname = uw_pathname(talloc_tos(), "wtmpx", wx_pathname); +- if (uname && wname) { +- DEBUG(2,("utmp_update: uname:%s wname:%s\n", uname, wname)); +- } ++ STRUCT_UTMP *urc; + +- /* +- * Check for either uname or wname being empty. +- * Some systems, such as Redhat 6, have a "utmpx.h" which doesn't +- * define default filenames. +- * Also, our local installation has not provided an override. +- * Drop to non-x method. (E.g. RH6 has good defaults in "utmp.h".) +- */ +- if (!uname || !wname || (strlen(uname) == 0) || (strlen(wname) == 0)) { +- utmp_nox_update(u, claim); +- } else { +- utmpxname(uname); +- setutxent(); +- uxrc = pututxline(&ux); +- endutxent(); +- if (uxrc == NULL) { +- DEBUG(2,("utmp_update: pututxline() failed\n")); +- return; +- } +- updwtmpx(wname, &ux); ++ setutxent(); ++ urc = pututxline(u); ++ endutxent(); ++ if (urc == NULL) { ++ DEBUG(2,("utmp_update: pututxline() failed\n")); ++ return; + } +-#endif /* HAVE_UTMPX_H */ + } + + #if defined(HAVE_UT_UT_ID) + /**************************************************************************** + Encode the unique connection number into "ut_id". + ****************************************************************************/ +- +-static int ut_id_encode(int i, char *fourbyte) ++static void ut_id_encode(char *buf, int id, size_t buf_size) + { +- int nbase; +- const char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++ const char ut_id_encstr[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + +-/* +- * 'ut_id_encstr' is the character set on which modulo arithmetic is done. +- * Example: digits would produce the base-10 numbers from '001'. +- */ +- nbase = strlen(ut_id_encstr); +- +- fourbyte[0] = ut_id_encstr[i % nbase]; +- i /= nbase; +- fourbyte[1] = ut_id_encstr[i % nbase]; +- i /= nbase; +- fourbyte[3] = ut_id_encstr[i % nbase]; +- i /= nbase; +- fourbyte[2] = ut_id_encstr[i % nbase]; +- i /= nbase; +- +- /* we do not care about overflows as i is a random number */ +- return 0; ++ int nbase = sizeof(ut_id_encstr) - 1; ++ /* ++ * 'ut_id_encstr' is the character set on which modulo arithmetic is done. ++ * Example: digits would produce the base-10 numbers from '001'. ++ */ ++ ++ for(int i = 0; i < buf_size; i++) { ++ buf[i] = ut_id_encstr[id % nbase]; ++ id /= nbase; ++ } + } + #endif /* defined(HAVE_UT_UT_ID) */ + +- + /* + fill a system utmp structure given all the info we can gather + */ +-static bool sys_utmp_fill(struct utmp *u, ++static bool sys_utmp_fill(STRUCT_UTMP *u, + const char *username, const char *hostname, + const char *id_str, int id_num) + { +@@ -509,16 +434,16 @@ static bool sys_utmp_fill(struct utmp *u, + * rather than to try to detect and optimise. + */ + #if defined(HAVE_UT_UT_USER) +- utmp_strcpy(u->ut_user, username, sizeof(u->ut_user)); ++ strncpy(u->ut_user, username, sizeof(u->ut_user)); + #elif defined(HAVE_UT_UT_NAME) +- utmp_strcpy(u->ut_name, username, sizeof(u->ut_name)); ++ strncpy(u->ut_name, username, sizeof(u->ut_name)); + #endif + + /* + * ut_line: + * If size limit proves troublesome, then perhaps use "ut_id_encode()". + */ +- utmp_strcpy(u->ut_line, id_str, sizeof(u->ut_line)); ++ strncpy(u->ut_line, id_str, sizeof(u->ut_line)); + + #if defined(HAVE_UT_UT_PID) + u->ut_pid = getpid(); +@@ -535,20 +460,23 @@ static bool sys_utmp_fill(struct utmp *u, + u->ut_time = timeval.tv_sec; + #elif defined(HAVE_UT_UT_TV) + GetTimeOfDay(&timeval); +- u->ut_tv = timeval; ++ u->ut_tv.tv_sec = timeval.tv_sec; ++ u->ut_tv.tv_usec = timeval.tv_usec; + #else + #error "with-utmp must have UT_TIME or UT_TV" + #endif + + #if defined(HAVE_UT_UT_HOST) +- utmp_strcpy(u->ut_host, hostname, sizeof(u->ut_host)); ++ if(hostname != NULL) { ++ strncpy(u->ut_host, hostname, sizeof(u->ut_host)); ++#if defined(HAVE_UT_UT_SYSLEN) ++ u->ut_syslen = strlen(hostname) + 1; /* include trailing NULL */ ++#endif ++ } + #endif + + #if defined(HAVE_UT_UT_ID) +- if (ut_id_encode(id_num, u->ut_id) != 0) { +- DEBUG(1,("utmp_fill: cannot encode id %d\n", id_num)); +- return False; +- } ++ ut_id_encode(u->ut_id, id_num, sizeof(u->ut_id)); + #endif + + return True; +@@ -561,7 +489,7 @@ static bool sys_utmp_fill(struct utmp *u, + void sys_utmp_yield(const char *username, const char *hostname, + const char *id_str, int id_num) + { +- struct utmp u; ++ STRUCT_UTMP u; + + ZERO_STRUCT(u); + +@@ -587,7 +515,7 @@ void sys_utmp_yield(const char *username, const char *hostname, + void sys_utmp_claim(const char *username, const char *hostname, + const char *id_str, int id_num) + { +- struct utmp u; ++ STRUCT_UTMP u; + + ZERO_STRUCT(u); + +diff --git a/source3/wscript b/source3/wscript +index 6209472c6c8..65961851e17 100644 +--- a/source3/wscript ++++ b/source3/wscript +@@ -807,34 +807,39 @@ msg.msg_accrightslen = sizeof(fd); + + if Options.options.with_utmp: + conf.env.with_utmp = True +- if not conf.CHECK_HEADERS('utmp.h'): conf.env.with_utmp = False +- conf.CHECK_FUNCS('pututline pututxline updwtmp updwtmpx getutmpx getutxent') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_name', headers='utmp.h', ++ if not conf.CHECK_HEADERS('utmpx.h') and not conf.CHECK_HEADERS('utmp.h'): ++ conf.env.with_utmp = False ++ if conf.CONFIG_SET('HAVE_UTMPX_H'): ++ conf.DEFINE('STRUCT_UTMP', 'struct utmpx') ++ elif conf.CONFIG_SET('HAVE_UTMP_H'): ++ conf.DEFINE('STRUCT_UTMP', 'struct utmp') ++ conf.CHECK_FUNCS('pututxline getutxid getutxline updwtmpx getutmpx setutxent endutxent') ++ conf.CHECK_FUNCS('pututline getutid getutline updwtmp getutmp setutent endutent') ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_name', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_NAME') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_user', headers='utmp.h', ++ ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_user', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_USER') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_id', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_id', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_ID') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_host', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_host', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_HOST') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_time', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_time', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_TIME') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_tv', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_tv', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_TV') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_type', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_type', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_TYPE') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_pid', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_pid', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_PID') +- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_exit.e_exit', headers='utmp.h', ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_exit.e_exit', headers='utmpx.h utmp.h', + define='HAVE_UT_UT_EXIT') +- conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_syslen', headers='utmpx.h', +- define='HAVE_UX_UT_SYSLEN') +- conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_host', headers='utmpx.h', +- define='HAVE_UX_UT_HOST') ++ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_syslen', headers='utmpx.h utmp.h', ++ define='HAVE_UT_UT_SYSLEN') + conf.CHECK_CODE('struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);', + 'PUTUTLINE_RETURNS_UTMP', headers='utmp.h', + msg="Checking whether pututline returns pointer") +- conf.CHECK_SIZEOF(['((struct utmp *)NULL)->ut_line'], headers='utmp.h', ++ conf.CHECK_SIZEOF(['((STRUCT_UTMP *)NULL)->ut_line'], headers='utmpx.h utmp.h', + define='SIZEOF_UTMP_UT_LINE', critical=False) + if not conf.CONFIG_SET('SIZEOF_UTMP_UT_LINE'): + conf.env.with_utmp = False +-- +2.37.1 + diff --git a/net/samba416/files/0023-Add-cmd_get_quota-test-function-into-vfstest-to-test.patch b/net/samba416/files/0023-Add-cmd_get_quota-test-function-into-vfstest-to-test.patch new file mode 100644 index 000000000000..581da64f6747 --- /dev/null +++ b/net/samba416/files/0023-Add-cmd_get_quota-test-function-into-vfstest-to-test.patch @@ -0,0 +1,121 @@ +From 2e927425e04d65027db5348b3e89a69a5e447556 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 03:07:40 +0200 +Subject: [PATCH 23/28] Add `cmd_get_quota()` test function into vfstest, to + test disk quota interface. + +Signed-off-by: Timur I. Bakeyev +--- + source3/torture/cmd_vfs.c | 78 +++++++++++++++++++++++++++++++++++ + source3/torture/wscript_build | 2 +- + 2 files changed, 79 insertions(+), 1 deletion(-) + +diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c +index 38ce0dc4ff6..1bc4639d2a2 100644 +--- a/source3/torture/cmd_vfs.c ++++ b/source3/torture/cmd_vfs.c +@@ -145,6 +145,83 @@ static NTSTATUS cmd_disk_free(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar + return NT_STATUS_OK; + } + ++static NTSTATUS cmd_get_quota(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) ++{ ++ struct smb_filename *smb_fname = NULL; ++ uint64_t bsize, dfree, dsize; ++ enum SMB_QUOTA_TYPE qtype; ++ SMB_DISK_QUOTA D; ++ unid_t id; ++ int r; ++ ++ if (argc != 4) { ++ printf("Usage: get_quota [user|group] id\n"); ++ return NT_STATUS_OK; ++ } ++ ++ smb_fname = synthetic_smb_fname(talloc_tos(), ++ argv[1], ++ NULL, ++ NULL, ++ 0, ++ ssf_flags()); ++ if (smb_fname == NULL) { ++ return NT_STATUS_NO_MEMORY; ++ } ++ ++ if(strcmp(argv[2], "user") == 0) { ++ qtype = SMB_USER_FS_QUOTA_TYPE; ++ } ++ else if(strcmp(argv[2], "group") == 0) { ++ qtype = SMB_GROUP_FS_QUOTA_TYPE; ++ } ++ else { ++ printf("Usage: get_quota [user|group] id\n"); ++ return NT_STATUS_OK; ++ } ++ ++ id.uid = atoi(argv[3]); ++ ++ ZERO_STRUCT(D); ++ ++ r = SMB_VFS_GET_QUOTA(vfs->conn, smb_fname, qtype, id, &D); ++ ++ if (r == -1 && errno != ENOSYS) { ++ return NT_STATUS_UNSUCCESSFUL; ++ } ++ ++ if (r == 0 && (D.qflags & QUOTAS_DENY_DISK) == 0) { ++ return NT_STATUS_UNSUCCESSFUL; ++ } ++ ++ bsize = D.bsize; ++ /* Use softlimit to determine disk space, except when it has been exceeded */ ++ if ( ++ (D.softlimit && D.curblocks >= D.softlimit) || ++ (D.hardlimit && D.curblocks >= D.hardlimit) || ++ (D.isoftlimit && D.curinodes >= D.isoftlimit) || ++ (D.ihardlimit && D.curinodes>=D.ihardlimit) ++ ) { ++ dfree = 0; ++ dsize = D.curblocks; ++ } else if (D.softlimit==0 && D.hardlimit==0) { ++ return NT_STATUS_UNSUCCESSFUL; ++ } else { ++ if (D.softlimit == 0) { ++ D.softlimit = D.hardlimit; ++ } ++ dfree = D.softlimit - D.curblocks; ++ dsize = D.softlimit; ++ } ++ ++ printf("get_quota: bsize = %lu, dfree = %lu, dsize = %lu\n", ++ (unsigned long)bsize, ++ (unsigned long)dfree, ++ (unsigned long)dsize); ++ ++ return NT_STATUS_OK; ++} ++ + + static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) + { +@@ -2257,6 +2334,7 @@ struct cmd_set vfs_commands[] = { + { "connect", cmd_connect, "VFS connect()", "connect" }, + { "disconnect", cmd_disconnect, "VFS disconnect()", "disconnect" }, + { "disk_free", cmd_disk_free, "VFS disk_free()", "disk_free " }, ++ { "get_quota", cmd_get_quota, "VFS get_quota()", "get_quota [user|group] id" }, + { "opendir", cmd_opendir, "VFS opendir()", "opendir " }, + { "readdir", cmd_readdir, "VFS readdir()", "readdir" }, + { "mkdir", cmd_mkdir, "VFS mkdir()", "mkdir " }, +diff --git a/source3/torture/wscript_build b/source3/torture/wscript_build +index 0c4275de795..f75c4bfe2be 100644 +--- a/source3/torture/wscript_build ++++ b/source3/torture/wscript_build +@@ -124,4 +124,4 @@ bld.SAMBA3_BINARY('vfstest', + smbconf + SMBREADLINE + ''', +- for_selftest=True) ++ install=True) +-- +2.37.1 + diff --git a/net/samba416/files/0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch b/net/samba416/files/0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch new file mode 100644 index 000000000000..3746f0e479f6 --- /dev/null +++ b/net/samba416/files/0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch @@ -0,0 +1,367 @@ +From d3024a4a2ff8015932a26a9df08e8ea5ff12a959 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Thu, 4 Aug 2022 05:15:33 +0200 +Subject: [PATCH 24/28] Cherry-pick ZFS provisioning code by iXsystems Inc. + +* Check if sysvol is on filesystem with NFSv4 ACL's +(cherry picked from commit ca86f52b78a7b6e7537454a69cf93e7b96210cba) + +* Only check targetdir if it is defined (I had assumed it was) +(cherry picked from commit a29050cb2978ce23e3c04a859340dc2664c77a8a) + +* Kick samba a little bit into understanding NFSv4 ACL's +(cherry picked from commit 1c7542ff4904b729e311e17464ee76582760c219) + +Signed-off-by: Timur I. Bakeyev +--- + python/samba/provision/__init__.py | 22 +++- + source3/lib/sysacls.c | 10 ++ + source3/param/loadparm.c | 20 +++ + source3/smbd/pysmbd.c | 189 ++++++++++++++++++++++++++++- + 4 files changed, 235 insertions(+), 6 deletions(-) + +diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py +index ff9b8fac916..20e41a9ad3e 100644 +--- a/python/samba/provision/__init__.py ++++ b/python/samba/provision/__init__.py +@@ -1662,19 +1662,25 @@ def setsysvolacl(samdb, netlogon, sysvol, uid, gid, domainsid, dnsdomain, + s3conf = s3param.get_context() + s3conf.load(lp.configfile) + +- file = tempfile.NamedTemporaryFile(dir=os.path.abspath(sysvol)) ++ sysvol_dir = os.path.abspath(sysvol) ++ ++ set_simple_acl = smbd.set_simple_acl ++ if smbd.has_nfsv4_acls(sysvol_dir): ++ set_simple_acl = smbd.set_simple_nfsv4_acl ++ ++ file = tempfile.NamedTemporaryFile(dir=sysvol_dir) + try: + try: +- smbd.set_simple_acl(file.name, 0o755, system_session_unix(), gid) ++ set_simple_acl(file.name, 0o755, system_session_unix(), gid) + except OSError: +- if not smbd.have_posix_acls(): ++ if not smbd.have_posix_acls() and not smbd.have_nfsv4_acls(): + # This clue is only strictly correct for RPM and + # Debian-like Linux systems, but hopefully other users + # will get enough clue from it. +- raise ProvisioningError("Samba was compiled without the posix ACL support that s3fs requires. " ++ raise ProvisioningError("Samba was compiled without the ACL support that s3fs requires. " + "Try installing libacl1-dev or libacl-devel, then re-run configure and make.") + +- raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. " ++ raise ProvisioningError("Your filesystem or build does not support ACLs, which s3fs requires. " + "Try the mounting the filesystem with the 'acl' option.") + try: + smbd.chown(file.name, uid, gid, system_session_unix()) +@@ -1959,6 +1965,9 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths, + samdb.transaction_commit() + + if serverrole == "active directory domain controller": ++ if targetdir and smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(targetdir): ++ smbd.set_nfsv4_defaults() ++ + # Continue setting up sysvol for GPO. This appears to require being + # outside a transaction. + if not skip_sysvolacl: +@@ -2313,6 +2322,9 @@ def provision(logger, session_info, smbconf=None, + if not os.path.isdir(paths.netlogon): + os.makedirs(paths.netlogon, 0o755) + ++ if smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(paths.sysvol): ++ smbd.set_nfsv4_defaults() ++ + if adminpass is None: + adminpass = samba.generate_random_password(12, 32) + adminpass_generated = True +diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c +index 891fabea21e..d1357a47bd0 100644 +--- a/source3/lib/sysacls.c ++++ b/source3/lib/sysacls.c +@@ -38,6 +38,16 @@ + #include "modules/vfs_aixacl.h" + #endif + ++/* ++ * NFSv4 ACL's should be understood and a first class citizen. Work ++ * needs to be done in librpc/idl/smb_acl.idl for this to occur. ++ */ ++#if defined(HAVE_LIBSUNACL) && defined(FREEBSD) ++#if 0 ++#include "modules/nfs4_acls.h" ++#endif ++#endif ++ + #undef DBGC_CLASS + #define DBGC_CLASS DBGC_ACLS + +diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c +index 21e061939e3..4e23fdaaf6d 100644 +--- a/source3/param/loadparm.c ++++ b/source3/param/loadparm.c +@@ -2830,9 +2830,29 @@ static void init_locals(void) + } else { + if (lp_parm_const_string(-1, "xattr_tdb", "file", NULL)) { + lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr xattr_tdb"); ++ /* ++ * By default, the samba sysvol is located in the statedir. Provisioning will fail in setntacl ++ * unless we have zfacl enabled. Unfortunately, at this point the smb.conf has not been generated. ++ * This workaround is freebsd-specific. ++ */ ++#if defined(_PC_ACL_EXTENDED) ++ } else if (pathconf(lp_state_directory(), _PC_ACL_EXTENDED) == 1) { ++ lp_do_parameter(-1, "vfs objects", "dfs_samba4 freebsd"); ++#endif ++#if defined(_PC_ACL_NFS4) ++ } else if (pathconf(lp_state_directory(), _PC_ACL_NFS4) == 1) { ++ lp_do_parameter(-1, "vfs objects", "dfs_samba4 zfsacl"); ++#endif + } else if (lp_parm_const_string(-1, "posix", "eadb", NULL)) { + lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr posix_eadb"); + } else { ++ /* ++ * This should only set dfs_samba4 and leave acl_xattr ++ * to be set later (or zfsacl). The only reason the decision ++ * can't be made here to load acl_xattr or zfsacl is ++ * that we don't have access to what the target ++ * directory is. ++ */ + lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr"); + } + } +diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c +index 88cbf62a680..867010ea6cd 100644 +--- a/source3/smbd/pysmbd.c ++++ b/source3/smbd/pysmbd.c +@@ -485,6 +485,20 @@ static SMB_ACL_T make_simple_acl(TALLOC_CTX *mem_ctx, + return acl; + } + ++static SMB_ACL_T make_simple_nfsv4_acl(TALLOC_CTX *mem_ctx, ++ gid_t gid, ++ mode_t chmod_mode) ++{ ++ /* ++ * This function needs to create an NFSv4 ACL. Currently, the only way ++ * to do so is to use the operating system interface, or to use the ++ * functions in source3/modules/nfs4_acls.c. These seems ugly and ++ * hacky. NFSv4 ACL's should be a first class citizen and ++ * librpc/idl/smb_acl.idl should be modified accordingly. ++ */ ++ return NULL; ++} ++ + /* + set a simple ACL on a file, as a test + */ +@@ -557,6 +571,84 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self, PyObject *args, PyObject + Py_RETURN_NONE; + } + ++ ++/* ++ set a simple NFSv4 ACL on a file, as a test ++ */ ++static PyObject *py_smbd_set_simple_nfsv4_acl(PyObject *self, PyObject *args, PyObject *kwargs) ++{ ++ const char * const kwnames[] = { ++ "fname", ++ "mode", ++ "session_info", ++ "gid", ++ "service", ++ NULL ++ }; ++ char *fname, *service = NULL; ++ PyObject *py_session = Py_None; ++ struct auth_session_info *session_info = NULL; ++ int ret; ++ int mode, gid = -1; ++ SMB_ACL_T acl; ++ TALLOC_CTX *frame; ++ connection_struct *conn; ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "siO|iz", ++ discard_const_p(char *, kwnames), ++ &fname, ++ &mode, ++ &py_session, ++ &gid, ++ &service)) ++ return NULL; ++ ++ if (!py_check_dcerpc_type(py_session, ++ "samba.dcerpc.auth", ++ "session_info")) { ++ return NULL; ++ } ++ session_info = pytalloc_get_type(py_session, ++ struct auth_session_info); ++ if (session_info == NULL) { ++ PyErr_Format(PyExc_TypeError, ++ "Expected auth_session_info for session_info argument got %s", ++ pytalloc_get_name(py_session)); ++ return NULL; ++ } ++ ++ frame = talloc_stackframe(); ++ ++ acl = make_simple_nfsv4_acl(frame, gid, mode); ++ if (acl == NULL) { ++ TALLOC_FREE(frame); ++ Py_RETURN_NONE; ++ } ++ ++ conn = get_conn_tos(service, session_info); ++ if (!conn) { ++ TALLOC_FREE(frame); ++ Py_RETURN_NONE; ++ } ++ ++ /* ++ * SMB_ACL_TYPE_ACCESS -> ACL_TYPE_ACCESS -> Not valid for NFSv4 ACL ++ */ ++ ret = 0; ++ ++ /* ret = set_sys_acl_conn(fname, SMB_ACL_TYPE_ACCESS, acl, conn); */ ++ ++ if (ret != 0) { ++ TALLOC_FREE(frame); ++ errno = ret; ++ return PyErr_SetFromErrno(PyExc_OSError); ++ } ++ ++ TALLOC_FREE(frame); ++ ++ Py_RETURN_NONE; ++} ++ + /* + chown a file + */ +@@ -744,7 +836,7 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObject *args, PyObject *kwargs + } + + /* +- check if we have ACL support ++ check if we have POSIX.1e ACL support + */ + static PyObject *py_smbd_have_posix_acls(PyObject *self, + PyObject *Py_UNUSED(ignored)) +@@ -756,6 +848,83 @@ static PyObject *py_smbd_have_posix_acls(PyObject *self, + #endif + } + ++static PyObject *py_smbd_has_posix_acls(PyObject *self, PyObject *args, PyObject *kwargs) ++{ ++ const char * const kwnames[] = { "path", NULL }; ++ char *path = NULL; ++ TALLOC_CTX *frame; ++ struct statfs fs; ++ int ret = false; ++ ++ frame = talloc_stackframe(); ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z", ++ discard_const_p(char *, kwnames), &path)) { ++ TALLOC_FREE(frame); ++ return NULL; ++ } ++ ++ if (statfs(path, &fs) != 0) { ++ TALLOC_FREE(frame); ++ return NULL; ++ } ++ ++ if (fs.f_flags & MNT_ACLS) ++ ret = true; ++ ++ TALLOC_FREE(frame); ++ return PyBool_FromLong(ret); ++} ++ ++/* ++ check if we have NFSv4 ACL support ++ */ ++static PyObject *py_smbd_have_nfsv4_acls(PyObject *self) ++{ ++#ifdef HAVE_LIBSUNACL ++ return PyBool_FromLong(true); ++#else ++ return PyBool_FromLong(false); ++#endif ++} ++ ++static PyObject *py_smbd_has_nfsv4_acls(PyObject *self, PyObject *args, PyObject *kwargs) ++{ ++ const char * const kwnames[] = { "path", NULL }; ++ char *path = NULL; ++ TALLOC_CTX *frame; ++ struct statfs fs; ++ int ret = false; ++ ++ frame = talloc_stackframe(); ++ ++ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z", ++ discard_const_p(char *, kwnames), &path)) { ++ TALLOC_FREE(frame); ++ return NULL; ++ } ++ ++ if (statfs(path, &fs) != 0) { ++ TALLOC_FREE(frame); ++ return NULL; ++ } ++ ++ if (fs.f_flags & MNT_NFS4ACLS) ++ ret = true; ++ ++ TALLOC_FREE(frame); ++ return PyBool_FromLong(ret); ++} ++ ++ ++static PyObject *py_smbd_set_nfsv4_defaults(PyObject *self) ++{ ++ /* ++ * It is really be done in source3/param/loadparm.c ++ */ ++ Py_RETURN_NONE; ++} ++ + /* + set the NT ACL on a file + */ +@@ -1242,10 +1411,28 @@ static PyMethodDef py_smbd_methods[] = { + { "have_posix_acls", + (PyCFunction)py_smbd_have_posix_acls, METH_NOARGS, + NULL }, ++ { "has_posix_acls", ++ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_posix_acls), ++ METH_VARARGS|METH_KEYWORDS, ++ NULL }, ++ { "have_nfsv4_acls", ++ (PyCFunction)py_smbd_have_nfsv4_acls, METH_NOARGS, ++ NULL }, ++ { "has_nfsv4_acls", ++ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_nfsv4_acls), ++ METH_VARARGS|METH_KEYWORDS, ++ NULL }, ++ { "set_nfsv4_defaults", ++ (PyCFunction)py_smbd_set_nfsv4_defaults, METH_NOARGS, ++ NULL }, + { "set_simple_acl", + PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_acl), + METH_VARARGS|METH_KEYWORDS, + NULL }, ++ { "set_simple_nfsv4_acl", ++ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_nfsv4_acl), ++ METH_VARARGS|METH_KEYWORDS, ++ NULL }, + { "set_nt_acl", + PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_nt_acl), + METH_VARARGS|METH_KEYWORDS, +-- +2.37.1 + diff --git a/net/samba416/files/0025-From-d9b748869a8f4018ebee302aae8246bf29f60309-Mon-Se.patch b/net/samba416/files/0025-From-d9b748869a8f4018ebee302aae8246bf29f60309-Mon-Se.patch new file mode 100644 index 000000000000..b66e24b27910 --- /dev/null +++ b/net/samba416/files/0025-From-d9b748869a8f4018ebee302aae8246bf29f60309-Mon-Se.patch @@ -0,0 +1,101 @@ +From 6e79023af14210a6435ab18ada8097253b8b16b6 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Mon, 31 May 2021 01:38:49 +0200 +Subject: [PATCH 25/28] From d9b748869a8f4018ebee302aae8246bf29f60309 Mon Sep + 17 00:00:00 2001 From: "Timur I. Bakeyev" Date: Fri, 1 + Jun 2018 01:35:08 +0800 Subject: [PATCH] vfs_fruit: allow broken + AFP_Signature where the first byte is 0 + +FreeBSD bug ... caused the first byte of the AFP_AfpInfo xattr to be 0 +instead of 'A'. This hack allows such broken AFP_AfpInfo blobs to be +parsed by afpinfo_unpack(). + +FreeBSD Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228462 + +Signed-off-by: Ralph Boehme +Signed-off-by: Timur I. Bakeyev +--- + source3/lib/adouble.c | 20 ++++++++++++++++---- + source3/modules/vfs_fruit.c | 19 ++++++++++++++++++- + 2 files changed, 34 insertions(+), 5 deletions(-) + +diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c +index aa78007dadd..ca99dcff193 100644 +--- a/source3/lib/adouble.c ++++ b/source3/lib/adouble.c +@@ -2830,6 +2830,8 @@ ssize_t afpinfo_pack(const AfpInfo *ai, char *buf) + return AFP_INFO_SIZE; + } + ++#define BROKEN_FREEBSD_AFP_Signature 0x00465000 ++ + /** + * Unpack a buffer into a AfpInfo structure + * +@@ -2847,12 +2849,22 @@ AfpInfo *afpinfo_unpack(TALLOC_CTX *ctx, const void *data) + ai->afpi_Version = RIVAL(data, 4); + ai->afpi_BackupTime = RIVAL(data, 12); + memcpy(ai->afpi_FinderInfo, (const char *)data + 16, +- sizeof(ai->afpi_FinderInfo)); ++ sizeof(ai->afpi_FinderInfo)); ++ ++ if (ai->afpi_Signature != AFP_Signature) { ++ DBG_WARNING("Bad AFP signature [%x]\n", ai->afpi_Signature); ++ ++ if (ai->afpi_Signature != BROKEN_FREEBSD_AFP_Signature) { ++ DBG_ERR("Bad AfpInfo signature\n"); ++ TALLOC_FREE(ai); ++ return NULL; ++ } ++ } + +- if (ai->afpi_Signature != AFP_Signature +- || ai->afpi_Version != AFP_Version) { +- DEBUG(1, ("Bad AfpInfo signature or version\n")); ++ if (ai->afpi_Version != AFP_Version) { ++ DBG_ERR("Bad AfpInfo version\n"); + TALLOC_FREE(ai); ++ return NULL; + } + + return ai; +diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c +index 303df41258e..428f95fd7d9 100644 +--- a/source3/modules/vfs_fruit.c ++++ b/source3/modules/vfs_fruit.c +@@ -2300,6 +2300,7 @@ static ssize_t fruit_pread_meta_stream(vfs_handle_struct *handle, + size_t n, off_t offset) + { + struct fio *fio = fruit_get_complete_fio(handle, fsp); ++ char *p = (char *)data; + ssize_t nread; + int ret; + +@@ -2308,7 +2309,23 @@ static ssize_t fruit_pread_meta_stream(vfs_handle_struct *handle, + } + + nread = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset); +- if (nread == -1 || nread == n) { ++ if (nread <= 0) { ++ /* ++ * fruit_meta_open_stream() removes O_CREAT flag ++ * from xattr open. This results in vfs_streams_xattr ++ * not generating an FSP extension for the files_struct ++ * and causes subsequent pread() of stream to return ++ * nread=0 if pread() occurs before pwrite(). ++ */ ++ return nread; ++ } ++ ++ if (nread == n) { ++ if (offset == 0 && nread > 3 && p[0] == 0 && p[1] == 'F' && p[2] == 'P') { ++ DBG_NOTICE("Fixing AFP_Info of [%s]\n", ++ fsp_str_dbg(fsp)); ++ p[0] = 'A'; ++ } + return nread; + } + +-- +2.37.1 + diff --git a/net/samba416/files/0026-vfs-add-a-compatibility-option-to-the-vfs_streams_xa.patch b/net/samba416/files/0026-vfs-add-a-compatibility-option-to-the-vfs_streams_xa.patch new file mode 100644 index 000000000000..550098b64104 --- /dev/null +++ b/net/samba416/files/0026-vfs-add-a-compatibility-option-to-the-vfs_streams_xa.patch @@ -0,0 +1,336 @@ +From 2d73ccb27ffcdf419d569260fcca6e9ee3b9538a Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Thu, 29 Sep 2022 03:24:26 +0200 +Subject: [PATCH 26/28] vfs: add a compatibility option to the + vfs_streams_xattr + +When enabled, the module does not append a trailing 0 +byte to the end of the extended attribute data. + +This is primarily a consideration when the administrator +wishes to expose extended attributes that have been written +by another application as alternate data streams via +Samba. + +An example where this parameter may be required is when +migrating a netatalk share to Samba. See manpage for +vfs_fruit for additional considerations regarding +Netatalk and Samba compatibility. + +Signed-off-by: Timur I. Bakeyev +--- + docs-xml/manpages/vfs_streams_xattr.8.xml | 25 ++++++ + source3/modules/vfs_streams_xattr.c | 95 +++++++++++++++++------ + 2 files changed, 97 insertions(+), 23 deletions(-) + +diff --git a/docs-xml/manpages/vfs_streams_xattr.8.xml b/docs-xml/manpages/vfs_streams_xattr.8.xml +index 6645928c016..0f38d510a82 100644 +--- a/docs-xml/manpages/vfs_streams_xattr.8.xml ++++ b/docs-xml/manpages/vfs_streams_xattr.8.xml +@@ -71,6 +71,31 @@ + + + ++ ++ streams_xattr:xattr_compat = [yes|no] ++ ++ When enabled, the module does not append a trailing 0 ++ byte to the end of the extended attribute data. This parameter ++ must not be changed once data has been written to the share ++ since it may result in dropping the last byte from xattr data. ++ ++ This is primarily a consideration when the administrator ++ wishes to expose extended attributes that have been written ++ by another application as alternate data streams via ++ Samba. ++ ++ An example where this parameter may be required is when ++ migrating a netatalk share to Samba. See manpage for ++ vfs_fruit for additional considerations regarding ++ Netatalk and Samba compatibility. ++ ++ WARNING: this parameter must not be changed on existing ++ Samba shares or new shares that export paths currently ++ or previously have been shared by Samba. ++ The default is yes. ++ ++ ++ + + + +diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c +index b69a4f342f5..070111e3ee9 100644 +--- a/source3/modules/vfs_streams_xattr.c ++++ b/source3/modules/vfs_streams_xattr.c +@@ -35,6 +35,7 @@ struct streams_xattr_config { + const char *prefix; + size_t prefix_len; + bool store_stream_type; ++ int xattr_compat_bytes; + }; + + struct stream_io { +@@ -45,22 +46,28 @@ struct stream_io { + vfs_handle_struct *handle; + }; + +-static ssize_t get_xattr_size_fsp(struct files_struct *fsp, ++static ssize_t get_xattr_size_fsp(vfs_handle_struct *handle, ++ struct files_struct *fsp, + const char *xattr_name) + { + NTSTATUS status; + struct ea_struct ea; + ssize_t result; ++ struct streams_xattr_config *config = NULL; ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config, ++ return -1); + + status = get_ea_value_fsp(talloc_tos(), + fsp, + xattr_name, + &ea); ++ + if (!NT_STATUS_IS_OK(status)) { + return -1; + } + +- result = ea.value.length-1; ++ result = ea.value.length - config->xattr_compat_bytes; + TALLOC_FREE(ea.value.data); + return result; + } +@@ -197,7 +204,8 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp, + return -1; + } + +- sbuf->st_ex_size = get_xattr_size_fsp(fsp->base_fsp, ++ sbuf->st_ex_size = get_xattr_size_fsp(handle, ++ fsp->base_fsp, + io->xattr_name); + if (sbuf->st_ex_size == -1) { + SET_STAT_INVALID(*sbuf); +@@ -273,7 +281,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle, + fsp = fsp->base_fsp; + } + +- smb_fname->st.st_ex_size = get_xattr_size_fsp(fsp, ++ smb_fname->st.st_ex_size = get_xattr_size_fsp(handle, fsp, + xattr_name); + if (smb_fname->st.st_ex_size == -1) { + TALLOC_FREE(xattr_name); +@@ -308,6 +316,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle, + errno = ENOENT; + return -1; + } ++ + return SMB_VFS_NEXT_LSTAT(handle, smb_fname); + } + +@@ -346,6 +355,11 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, + /* + * For now assert this, so the below SMB_VFS_SETXATTR() works. + */ ++#ifdef O_EMPTY_PATH ++ if (flags & O_EMPTY_PATH) { ++ return vfs_fake_fd(); ++ } ++#endif + SMB_ASSERT(fsp_get_pathref_fd(dirfsp) == AT_FDCWD); + + status = streams_xattr_get_name(handle, talloc_tos(), +@@ -355,6 +369,8 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, + goto fail; + } + ++ fsp->fsp_flags.have_proc_fds = fsp->conn->have_proc_fds; ++ + status = get_ea_value_fsp(talloc_tos(), + fsp->base_fsp, + xattr_name, +@@ -393,7 +409,8 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, + */ + + /* +- * Darn, xattrs need at least 1 byte ++ * If xattr_compat_bytes is set we need to ++ * provide one extra trailing byte + */ + char null = '\0'; + +@@ -402,7 +419,8 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, + + ret = SMB_VFS_FSETXATTR(fsp->base_fsp, + xattr_name, +- &null, sizeof(null), ++ (config->xattr_compat_bytes) ? &null : NULL, ++ (config->xattr_compat_bytes) ? sizeof(null) : 0, + flags & O_EXCL ? XATTR_CREATE : 0); + if (ret != 0) { + goto fail; +@@ -411,13 +429,13 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, + + fakefd = vfs_fake_fd(); + +- sio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct stream_io, NULL); +- if (sio == NULL) { +- errno = ENOMEM; +- goto fail; +- } ++ sio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct stream_io, NULL); ++ if (sio == NULL) { ++ errno = ENOMEM; ++ goto fail; ++ } + +- sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp), ++ sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp), + xattr_name); + if (sio->xattr_name == NULL) { + errno = ENOMEM; +@@ -823,12 +841,16 @@ static bool collect_one_stream(struct ea_struct *ea, void *private_data) + { + struct streaminfo_state *state = + (struct streaminfo_state *)private_data; ++ struct streams_xattr_config *config = NULL; ++ ++ SMB_VFS_HANDLE_GET_DATA(state->handle, config, struct streams_xattr_config, ++ return false); + + if (!add_one_stream(state->mem_ctx, + &state->num_streams, &state->streams, +- ea->name, ea->value.length-1, ++ ea->name, ea->value.length - config->xattr_compat_bytes, + smb_roundup(state->handle->conn, +- ea->value.length-1))) { ++ ea->value.length - config->xattr_compat_bytes))) { + state->status = NT_STATUS_NO_MEMORY; + return false; + } +@@ -890,6 +912,7 @@ static int streams_xattr_connect(vfs_handle_struct *handle, + const char *default_prefix = SAMBA_XATTR_DOSSTREAM_PREFIX; + const char *prefix; + int rc; ++ bool xattr_compat; + + rc = SMB_VFS_NEXT_CONNECT(handle, service, user); + if (rc != 0) { +@@ -920,6 +943,13 @@ static int streams_xattr_connect(vfs_handle_struct *handle, + "store_stream_type", + true); + ++ xattr_compat = lp_parm_bool(SNUM(handle->conn), ++ "streams_xattr", ++ "xattr_compat", ++ true); ++ ++ config->xattr_compat_bytes = xattr_compat ? 0 : 1; ++ + SMB_VFS_HANDLE_SET_DATA(handle, config, + NULL, struct stream_xattr_config, + return -1); +@@ -936,6 +966,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, + struct ea_struct ea; + NTSTATUS status; + int ret; ++ struct streams_xattr_config *config = NULL; + + DEBUG(10, ("streams_xattr_pwrite called for %d bytes\n", (int)n)); + +@@ -947,6 +978,9 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, + return -1; + } + ++ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config, ++ return -1); ++ + if ((offset + n) >= lp_smbd_max_xattr_size(SNUM(handle->conn))) { + /* + * Requested write is beyond what can be read based on +@@ -976,11 +1010,11 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, + return -1; + } + +- if ((offset + n) > ea.value.length-1) { ++ if ((offset + n) > ea.value.length - config->xattr_compat_bytes) { + uint8_t *tmp; + + tmp = talloc_realloc(talloc_tos(), ea.value.data, uint8_t, +- offset + n + 1); ++ offset + n + config->xattr_compat_bytes); + + if (tmp == NULL) { + TALLOC_FREE(ea.value.data); +@@ -988,8 +1022,10 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, + return -1; + } + ea.value.data = tmp; +- ea.value.length = offset + n + 1; +- ea.value.data[offset+n] = 0; ++ ea.value.length = offset + n + config->xattr_compat_bytes; ++ if (config->xattr_compat_bytes) { ++ ea.value.data[offset+n] = 0; ++ } + } + + memcpy(ea.value.data + offset, data, n); +@@ -1017,6 +1053,11 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle, + struct ea_struct ea; + NTSTATUS status; + size_t length, overlap; ++ struct smb_filename *smb_fname_base = NULL; ++ struct streams_xattr_config *config = NULL; ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config, ++ return -1); + + DEBUG(10, ("streams_xattr_pread: offset=%d, size=%d\n", + (int)offset, (int)n)); +@@ -1037,7 +1078,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle, + return -1; + } + +- length = ea.value.length-1; ++ length = ea.value.length - config->xattr_compat_bytes; + + DBG_DEBUG("get_ea_value_fsp returned %d bytes\n", + (int)length); +@@ -1225,6 +1266,12 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle, + struct stream_io *sio = + (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp); + ++ struct smb_filename *smb_fname_base = NULL; ++ struct streams_xattr_config *config = NULL; ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config, ++ return -1); ++ + DEBUG(10, ("streams_xattr_ftruncate called for file %s offset %.0f\n", + fsp_str_dbg(fsp), (double)offset)); + +@@ -1254,14 +1301,16 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle, + } + + /* Did we expand ? */ +- if (ea.value.length < offset + 1) { ++ if (ea.value.length < offset + config->xattr_compat_bytes) { + memset(&tmp[ea.value.length], '\0', +- offset + 1 - ea.value.length); ++ offset + config->xattr_compat_bytes - ea.value.length); + } + + ea.value.data = tmp; +- ea.value.length = offset + 1; +- ea.value.data[offset] = 0; ++ ea.value.length = offset + config->xattr_compat_bytes; ++ if (config->xattr_compat_bytes) { ++ ea.value.data[offset] = 0; ++ } + + ret = SMB_VFS_FSETXATTR(fsp->base_fsp, + sio->xattr_name, +-- +2.37.1 + diff --git a/net/samba416/files/0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch b/net/samba416/files/0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch new file mode 100644 index 000000000000..109b3eb82c79 --- /dev/null +++ b/net/samba416/files/0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch @@ -0,0 +1,932 @@ +From f07e384150e53b18c3ea298f9a1ea588fb89e19b Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sat, 29 May 2021 03:58:01 +0200 +Subject: [PATCH 27/28] Add VFS module vfs_freebsd that implements FreeBSD + specific wrappers to some VFS functions. + +At the moment that is configurable mapping between Linux xattrs and +FreeBSD extended attributes. + +Signed-off-by: Timur I. Bakeyev +--- + docs-xml/manpages/vfs_freebsd.8.xml | 169 +++++++ + docs-xml/wscript_build | 1 + + source3/modules/vfs_freebsd.c | 699 ++++++++++++++++++++++++++++ + source3/modules/wscript_build | 7 + + 4 files changed, 876 insertions(+) + create mode 100644 docs-xml/manpages/vfs_freebsd.8.xml + create mode 100644 source3/modules/vfs_freebsd.c + +diff --git a/docs-xml/manpages/vfs_freebsd.8.xml b/docs-xml/manpages/vfs_freebsd.8.xml +new file mode 100644 +index 00000000000..6640a1c51f7 +--- /dev/null ++++ b/docs-xml/manpages/vfs_freebsd.8.xml +@@ -0,0 +1,169 @@ ++ ++ ++ ++ ++ ++ vfs_freebsd ++ 8 ++ Samba ++ System Administration tools ++ &doc.version; ++ ++ ++ ++ vfs_freebsd ++ FreeBSD-specific VFS functions ++ ++ ++ ++ ++ vfs objects = freebsd ++ ++ ++ ++ ++ DESCRIPTION ++ ++ This VFS module is part of the samba ++ 7 suite. ++ ++ The vfs_freebsd module implements some of the FreeBSD-specific VFS functions. ++ ++ This module is stackable. ++ ++ ++ ++ ++ OPTIONS ++ ++ ++ ++ ++ freebsd:extattr mode=[legacy|compat|secure] ++ ++ This parameter defines how the emulation of the Linux attr(5) extended attributes ++ is performed through the FreeBSD native extattr(9) system calls. ++ ++ Currently the security, system, ++ trusted and user extended attribute(xattr) ++ classes are defined in Linux. Contrary FreeBSD has only USER ++ and SYSTEM extended attribute(extattr) namespaces, so mapping ++ of one set into another isn't straightforward and can be done in different ways. ++ ++ Historically the Samba(7) built-in xattr mapping implementation simply converted ++ system and user xattr into corresponding ++ SYSTEM and USER extattr namespaces, dropping ++ the class prefix name with the separating dot and using attribute name only within the ++ mapped namespace. It also rejected any other xattr classes, like security ++ and trusted as invalid. Such behavior in particular broke AD ++ provisioning on UFS2 file systems as essential security.NTACL ++ xattr was rejected as invalid. ++ ++ This module tries to address this problem and provide secure, where it's possible, ++ way to map Linux xattr into FreeBSD's extattr. ++ ++ When mode is set to the legacy (default) ++ then modified version of built-in mapping is used, where system xattr ++ is mapped into SYSTEM namespace, while secure, trusted ++ and user xattr are all mapped into the USER namespace, dropping class ++ prefixes and mix them all together. This is the way how Samba FreeBSD ports were patched ++ up to the 4.9 version and that created multiple potential security issues. This mode is aimed for ++ the compatibility with the legacy installations only and should be avoided in new setups. ++ ++ The compat mode is mostly designed for the jailed environments, ++ where it's not possible to write extattrs into the secure SYSTEM namespace, so all four ++ classes are mapped into the USER namespace. To preserve information about origin of the ++ extended attribute it is stored together with the class preffix in the class.attribute ++ format. ++ ++ The secure mode is meant for storing extended attributes in a secure ++ manner, so that security, system and trusted ++ are stored in the SYSTEM namespace, which can be modified only by root. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Attributes mapping ++ ++ ++ ++ ++ built-in ++ legacy ++ compat/jail ++ secure ++ ++ ++ ++ ++ user ++ USER; attribute ++ USER; attribute ++ USER; user.attribute ++ USER; user.attribute ++ ++ ++ system ++ SYSTEM; attribute ++ SYSTEM; attribute ++ USER; system.attribute ++ SYSTEM; system.attribute ++ ++ ++ trusted ++ FAIL ++ USER; attribute ++ USER; trusted.attribute ++ SYSTEM; trusted.attribute ++ ++ ++ security ++ FAIL ++ USER; attribute ++ USER; security.attribute ++ SYSTEM; security.attribute ++ ++ ++ ++
++
++ ++ ++ EXAMPLES ++ ++ Use secure method of setting extended attributes on the share: ++ ++ ++ ++ freebsd ++ secure ++ ++ ++ ++ ++ ++ VERSION ++ ++ This man page is part of version &doc.version; of the Samba suite. ++ ++ ++ ++ ++ AUTHOR ++ ++ The original Samba software and related utilities ++ were created by Andrew Tridgell. Samba is now developed ++ by the Samba Team as an Open Source project similar ++ to the way the Linux kernel is developed. ++ ++ This module was written by Timur I. Bakeyev ++ ++ ++ ++
+diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build +index c8c4b68e514..4dc4b34ca40 100644 +--- a/docs-xml/wscript_build ++++ b/docs-xml/wscript_build +@@ -86,6 +86,7 @@ vfs_module_manpages = ['vfs_acl_tdb', + 'vfs_extd_audit', + 'vfs_fake_perms', + 'vfs_fileid', ++ 'vfs_freebsd', + 'vfs_fruit', + 'vfs_full_audit', + 'vfs_glusterfs', +diff --git a/source3/modules/vfs_freebsd.c b/source3/modules/vfs_freebsd.c +new file mode 100644 +index 00000000000..07d26d9c516 +--- /dev/null ++++ b/source3/modules/vfs_freebsd.c +@@ -0,0 +1,699 @@ ++/* ++ * This module implements VFS calls specific to FreeBSD ++ * ++ * Copyright (C) Timur I. Bakeyev, 2018 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, see . ++ */ ++ ++#include "includes.h" ++ ++#include "lib/util/tevent_unix.h" ++#include "lib/util/tevent_ntstatus.h" ++#include "system/filesys.h" ++#include "smbd/smbd.h" ++ ++#include ++ ++static int vfs_freebsd_debug_level = DBGC_VFS; ++ ++#undef DBGC_CLASS ++#define DBGC_CLASS vfs_freebsd_debug_level ++ ++#ifndef EXTATTR_MAXNAMELEN ++#define EXTATTR_MAXNAMELEN UINT8_MAX ++#endif ++ ++#define EXTATTR_NAMESPACE(NS) EXTATTR_NAMESPACE_ ## NS, \ ++ EXTATTR_NAMESPACE_ ## NS ## _STRING ".", \ ++ .data.len = (sizeof(EXTATTR_NAMESPACE_ ## NS ## _STRING ".") - 1) ++ ++#define EXTATTR_EMPTY 0x00 ++#define EXTATTR_USER 0x01 ++#define EXTATTR_SYSTEM 0x02 ++#define EXTATTR_SECURITY 0x03 ++#define EXTATTR_TRUSTED 0x04 ++ ++enum extattr_mode { ++ FREEBSD_EXTATTR_SECURE, ++ FREEBSD_EXTATTR_COMPAT, ++ FREEBSD_EXTATTR_LEGACY ++}; ++ ++struct freebsd_handle_data { ++ enum extattr_mode extattr_mode; ++}; ++ ++typedef struct { ++ int namespace; ++ char name[EXTATTR_MAXNAMELEN+1]; ++ union { ++ uint16_t len; ++ uint16_t flags; ++ } data; ++} extattr_attr; ++ ++static const struct enum_list extattr_mode_param[] = { ++ { FREEBSD_EXTATTR_SECURE, "secure" }, /* */ ++ { FREEBSD_EXTATTR_COMPAT, "compat" }, /* */ ++ { FREEBSD_EXTATTR_LEGACY, "legacy" }, /* */ ++ { -1, NULL } ++}; ++ ++/* XXX: This order doesn't match namespace ids order! */ ++static extattr_attr extattr[] = { ++ { EXTATTR_NAMESPACE(EMPTY) }, ++ { EXTATTR_NAMESPACE(SYSTEM) }, ++ { EXTATTR_NAMESPACE(USER) }, ++}; ++ ++ ++static bool freebsd_in_jail(void) { ++ int val = 0; ++ size_t val_len = sizeof(val); ++ ++ if((sysctlbyname("security.jail.jailed", &val, &val_len, NULL, 0) != -1) && val == 1) { ++ return true; ++ } ++ return false; ++} ++ ++ ++static uint16_t freebsd_map_attrname(const char *name) ++{ ++ if(name == NULL || name[0] == '\0') { ++ return EXTATTR_EMPTY; ++ } ++ ++ switch(name[0]) { ++ case 'u': ++ if(strncmp(name, "user.", 5) == 0) ++ return EXTATTR_USER; ++ break; ++ case 't': ++ if(strncmp(name, "trusted.", 8) == 0) ++ return EXTATTR_TRUSTED; ++ break; ++ case 's': ++ /* name[1] could be any character, including '\0' */ ++ switch(name[1]) { ++ case 'e': ++ if(strncmp(name, "security.", 9) == 0) ++ return EXTATTR_SECURITY; ++ break; ++ case 'y': ++ if(strncmp(name, "system.", 7) == 0) ++ return EXTATTR_SYSTEM; ++ break; ++ } ++ break; ++ } ++ return EXTATTR_USER; ++} ++ ++ ++/* security, system, trusted or user */ ++static extattr_attr* freebsd_map_xattr(enum extattr_mode extattr_mode, const char *name, extattr_attr *attr) ++{ ++ int attrnamespace = EXTATTR_NAMESPACE_EMPTY; ++ const char *p, *attrname = name; ++ ++ if(name == NULL || name[0] == '\0') { ++ return NULL; ++ } ++ ++ if(attr == NULL) { ++ return NULL; ++ } ++ ++ uint16_t flags = freebsd_map_attrname(name); ++ ++ switch(flags) { ++ case EXTATTR_SECURITY: ++ case EXTATTR_TRUSTED: ++ case EXTATTR_SYSTEM: ++ attrnamespace = (extattr_mode == FREEBSD_EXTATTR_SECURE) ? ++ EXTATTR_NAMESPACE_SYSTEM : ++ EXTATTR_NAMESPACE_USER; ++ break; ++ case EXTATTR_USER: ++ attrnamespace = EXTATTR_NAMESPACE_USER; ++ break; ++ default: ++ /* Default to "user" namespace if nothing else was specified */ ++ attrnamespace = EXTATTR_NAMESPACE_USER; ++ flags = EXTATTR_USER; ++ break; ++ } ++ ++ if (extattr_mode == FREEBSD_EXTATTR_LEGACY) { ++ switch(flags) { ++ case EXTATTR_SECURITY: ++ attrname = name + 9; ++ break; ++ case EXTATTR_TRUSTED: ++ attrname = name + 8; ++ break; ++ case EXTATTR_SYSTEM: ++ attrname = name + 7; ++ break; ++ case EXTATTR_USER: ++ attrname = name + 5; ++ break; ++ default: ++ attrname = ((p=strchr(name, '.')) != NULL) ? p + 1 : name; ++ break; ++ } ++ } ++ ++ attr->namespace = attrnamespace; ++ attr->data.flags = flags; ++ strlcpy(attr->name, attrname, EXTATTR_MAXNAMELEN + 1); ++ ++ return attr; ++} ++ ++ ++static ssize_t extattr_size(struct files_struct *fsp, extattr_attr *attr) ++{ ++ ssize_t result; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ int fd = fsp_get_pathref_fd(fsp); ++ ++ if (fsp->fsp_flags.is_pathref) { ++ const char *path = fsp->fsp_name->base_name; ++ if (fsp->fsp_flags.have_proc_fds) { ++ char buf[PATH_MAX]; ++ path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (path == NULL) { ++ return -1; ++ } ++ } ++ /* ++ * This is no longer a handle based call. ++ */ ++ return extattr_get_file(path, attr->namespace, attr->name, NULL, 0); ++ } ++ else { ++ return extattr_get_fd(fd, attr->namespace, attr->name, NULL, 0); ++ } ++} ++ ++/* ++ * The list of names is returned as an unordered array of NULL-terminated ++ * character strings (attribute names are separated by NULL characters), ++ * like this: ++ * user.name1\0system.name1\0user.name2\0 ++ * ++ * Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using ++ * extended attributes, might return a list like this: ++ * system.posix_acl_access\0system.posix_acl_default\0 ++ */ ++/* ++ * The extattr_list_file() returns a list of attributes present in the ++ * requested namespace. Each list entry consists of a single byte containing ++ * the length of the attribute name, followed by the attribute name. The ++ * attribute name is not terminated by ASCII 0 (nul). ++*/ ++static ssize_t freebsd_extattr_list(struct files_struct *fsp, enum extattr_mode extattr_mode, char *list, size_t size) ++{ ++ ssize_t list_size, total_size = 0; ++ char *p, *q, *list_end; ++ int len; ++ /* ++ Ignore all but user namespace when we are not root or in jail ++ See: https://bugzilla.samba.org/show_bug.cgi?id=10247 ++ */ ++ bool as_root = (geteuid() == 0); ++ ++ int ns = (extattr_mode == FREEBSD_EXTATTR_SECURE && as_root) ? 1 : 2; ++ ++ int fd = fsp_get_pathref_fd(fsp); ++ ++ /* Iterate through extattr(2) namespaces */ ++ for(; ns < ARRAY_SIZE(extattr); ns++) { ++ list_size = -1; ++ ++ if (fsp->fsp_flags.is_pathref) { ++ const char *path = fsp->fsp_name->base_name; ++ if (fsp->fsp_flags.have_proc_fds) { ++ char buf[PATH_MAX]; ++ path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (path == NULL) { ++ return -1; ++ } ++ } ++ /* ++ * This is no longer a handle based call. ++ */ ++ list_size = extattr_list_file(path, extattr[ns].namespace, list, size); ++ } ++ else { ++ list_size = extattr_list_fd(fd, extattr[ns].namespace, list, size); ++ } ++ /* Some error happend. Errno should be set by the previous call */ ++ if(list_size < 0) ++ return -1; ++ /* No attributes in this namespace */ ++ if(list_size == 0) ++ continue; ++ /* ++ Call with an empty buffer may be used to calculate ++ necessary buffer size. ++ */ ++ if(list == NULL) { ++ /* ++ XXX: Unfortunately, we can't say, how many attributes were ++ returned, so here is the potential problem with the emulation. ++ */ ++ if(extattr_mode == FREEBSD_EXTATTR_LEGACY) { ++ /* ++ Take the worse case of one char attribute names - ++ two bytes per name plus one more for sanity. ++ */ ++ total_size += list_size + (list_size/2 + 1)*extattr[ns].data.len; ++ } ++ else { ++ total_size += list_size; ++ } ++ continue; ++ } ++ ++ if(extattr_mode == FREEBSD_EXTATTR_LEGACY) { ++ /* Count necessary offset to fit namespace prefixes */ ++ int extra_len = 0; ++ uint16_t flags; ++ list_end = list + list_size; ++ for(list_size = 0, p = q = list; p < list_end; p += len) { ++ len = p[0] + 1; ++ (void)strlcpy(q, p + 1, len); ++ flags = freebsd_map_attrname(q); ++ /* Skip secure attributes for non-root user */ ++ if(extattr_mode != FREEBSD_EXTATTR_SECURE && !as_root && flags > EXTATTR_USER) { ++ continue; ++ } ++ if(flags <= EXTATTR_USER) { ++ /* Don't count trailing '\0' */ ++ extra_len += extattr[ns].data.len; ++ } ++ list_size += len; ++ q += len; ++ } ++ total_size += list_size + extra_len; ++ /* Buffer is too small to fit the results */ ++ if(total_size > size) { ++ errno = ERANGE; ++ return -1; ++ } ++ /* Shift results backwards, so we can prepend prefixes */ ++ list_end = list + extra_len; ++ p = (char*)memmove(list_end, list, list_size); ++ /* ++ We enter the loop with `p` pointing to the shifted list and ++ `extra_len` having the total margin between `list` and `p` ++ */ ++ for(list_end += list_size; p < list_end; p += len) { ++ len = strlen(p) + 1; ++ flags = freebsd_map_attrname(p); ++ if(flags <= EXTATTR_USER) { ++ /* Add namespace prefix */ ++ (void)strncpy(list, extattr[ns].name, extattr[ns].data.len); ++ list += extattr[ns].data.len; ++ } ++ /* Append attribute name */ ++ (void)strlcpy(list, p, len); ++ list += len; ++ } ++ } ++ else { ++ /* Convert UCSD strings into nul-terminated strings */ ++ for(list_end = list + list_size; list < list_end; list += len) { ++ len = list[0] + 1; ++ (void)strlcpy(list, list + 1, len); ++ } ++ total_size += list_size; ++ } ++ } ++ return total_size; ++} ++ ++/* ++static ssize_t freebsd_fgetxattr_size(struct vfs_handle_struct *handle, ++ struct files_struct *fsp, ++ const char *name) ++{ ++ struct freebsd_handle_data *data; ++ extattr_attr attr; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, data, ++ struct freebsd_handle_data, ++ return -1); ++ ++ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) { ++ errno = ENOATTR; ++ return -1; ++ } ++ ++ return extattr_size(fsp, &attr); ++} ++*/ ++ ++/* VFS entries */ ++static ssize_t freebsd_fgetxattr(struct vfs_handle_struct *handle, ++ struct files_struct *fsp, ++ const char *name, ++ void *value, ++ size_t size) ++{ ++#if defined(HAVE_XATTR_EXTATTR) ++ struct freebsd_handle_data *data; ++ extattr_attr attr; ++ ssize_t res; ++ int fd; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, data, ++ struct freebsd_handle_data, ++ return -1); ++ ++ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* Filter out 'secure' entries */ ++ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) { ++ errno = ENOATTR; ++ return -1; ++ } ++ ++ /* ++ * The BSD implementation has a nasty habit of silently truncating ++ * the returned value to the size of the buffer, so we have to check ++ * that the buffer is large enough to fit the returned value. ++ */ ++ if((res=extattr_size(fsp, &attr)) < 0) { ++ return -1; ++ } ++ ++ if (size == 0) { ++ return res; ++ } ++ else if (res > size) { ++ errno = ERANGE; ++ return -1; ++ } ++ ++ fd = fsp_get_pathref_fd(fsp); ++ ++ if (fsp->fsp_flags.is_pathref) { ++ const char *path = fsp->fsp_name->base_name; ++ if (fsp->fsp_flags.have_proc_fds) { ++ char buf[PATH_MAX]; ++ path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (path == NULL) { ++ return -1; ++ } ++ } ++ /* ++ * This is no longer a handle based call. ++ */ ++ return extattr_get_file(path, attr.namespace, attr.name, value, size); ++ } ++ else { ++ return extattr_get_fd(fd, attr.namespace, attr.name, value, size); ++ } ++ return -1; ++#else ++ errno = ENOSYS; ++ return -1; ++#endif ++} ++ ++ ++static ssize_t freebsd_flistxattr(struct vfs_handle_struct *handle, ++ struct files_struct *fsp, ++ char *list, ++ size_t size) ++{ ++#if defined(HAVE_XATTR_EXTATTR) ++ struct freebsd_handle_data *data; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, data, ++ struct freebsd_handle_data, ++ return -1); ++ ++ return freebsd_extattr_list(fsp, data->extattr_mode, list, size); ++#else ++ errno = ENOSYS; ++ return -1; ++#endif ++} ++ ++ ++static int freebsd_fremovexattr(struct vfs_handle_struct *handle, ++ struct files_struct *fsp, ++ const char *name) ++{ ++#if defined(HAVE_XATTR_EXTATTR) ++ struct freebsd_handle_data *data; ++ extattr_attr attr; ++ int fd; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, data, ++ struct freebsd_handle_data, ++ return -1); ++ ++ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* Filter out 'secure' entries */ ++ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) { ++ errno = ENOATTR; ++ return -1; ++ } ++ ++ fd = fsp_get_pathref_fd(fsp); ++ ++ if (fsp->fsp_flags.is_pathref) { ++ const char *path = fsp->fsp_name->base_name; ++ if (fsp->fsp_flags.have_proc_fds) { ++ char buf[PATH_MAX]; ++ path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (path == NULL) { ++ return -1; ++ } ++ } ++ /* ++ * This is no longer a handle based call. ++ */ ++ return extattr_delete_file(path, attr.namespace, attr.name); ++ } ++ else { ++ return extattr_delete_fd(fd, attr.namespace, attr.name); ++ } ++ return -1; ++#else ++ errno = ENOSYS; ++ return -1; ++#endif ++} ++ ++ ++static int freebsd_fsetxattr(struct vfs_handle_struct *handle, ++ struct files_struct *fsp, ++ const char *name, ++ const void *value, ++ size_t size, ++ int flags) ++{ ++#if defined(HAVE_XATTR_EXTATTR) ++ struct freebsd_handle_data *data; ++ extattr_attr attr; ++ ssize_t res; ++ int fd; ++ ++ SMB_ASSERT(!fsp_is_alternate_stream(fsp)); ++ ++ SMB_VFS_HANDLE_GET_DATA(handle, data, ++ struct freebsd_handle_data, ++ return -1); ++ ++ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* Filter out 'secure' entries */ ++ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) { ++ errno = ENOATTR; ++ return -1; ++ } ++ ++ if (flags) { ++ /* Check attribute existence */ ++ res = extattr_size(fsp, &attr); ++ if (res < 0) { ++ /* REPLACE attribute, that doesn't exist */ ++ if ((flags & XATTR_REPLACE) && errno == ENOATTR) { ++ errno = ENOATTR; ++ return -1; ++ } ++ /* Ignore other errors */ ++ } ++ else { ++ /* CREATE attribute, that already exists */ ++ if (flags & XATTR_CREATE) { ++ errno = EEXIST; ++ return -1; ++ } ++ } ++ } ++ ++ fd = fsp_get_pathref_fd(fsp); ++ ++ if (fsp->fsp_flags.is_pathref) { ++ const char *path = fsp->fsp_name->base_name; ++ if (fsp->fsp_flags.have_proc_fds) { ++ char buf[PATH_MAX]; ++ path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (path == NULL) { ++ return -1; ++ } ++ } ++ /* ++ * This is no longer a handle based call. ++ */ ++ res = extattr_set_file(path, attr.namespace, attr.name, value, size); ++ } ++ else { ++ res = extattr_set_fd(fd, attr.namespace, attr.name, value, size); ++ } ++ return (res >= 0) ? 0 : -1; ++#else ++ errno = ENOSYS; ++ return -1; ++#endif ++} ++ ++ ++static int freebsd_connect(struct vfs_handle_struct *handle, ++ const char *service, ++ const char *user) ++{ ++ struct freebsd_handle_data *data; ++ int enumval, saved_errno; ++ ++ int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); ++ ++ if (ret < 0) { ++ return ret; ++ } ++ ++ data = talloc_zero(handle->conn, struct freebsd_handle_data); ++ if (!data) { ++ saved_errno = errno; ++ SMB_VFS_NEXT_DISCONNECT(handle); ++ DEBUG(0, ("talloc_zero() failed\n")); ++ errno = saved_errno; ++ return -1; ++ } ++ ++ enumval = lp_parm_enum(SNUM(handle->conn), "freebsd", ++ "extattr mode", extattr_mode_param, FREEBSD_EXTATTR_LEGACY); ++ if (enumval == -1) { ++ saved_errno = errno; ++ SMB_VFS_NEXT_DISCONNECT(handle); ++ DBG_DEBUG("value for freebsd: 'extattr mode' is unknown\n"); ++ errno = saved_errno; ++ return -1; ++ } ++ ++ if(freebsd_in_jail()) { ++ enumval = FREEBSD_EXTATTR_COMPAT; ++ DBG_WARNING("running in jail, enforcing 'compat' mode\n"); ++ } ++ ++ data->extattr_mode = (enum extattr_mode)enumval; ++ ++ SMB_VFS_HANDLE_SET_DATA(handle, data, NULL, ++ struct freebsd_handle_data, ++ return -1); ++ ++ DBG_DEBUG("connect to service[%s] with '%s' extattr mode\n", ++ service, extattr_mode_param[data->extattr_mode].name); ++ ++ return 0; ++} ++ ++ ++static void freebsd_disconnect(vfs_handle_struct *handle) ++{ ++ SMB_VFS_NEXT_DISCONNECT(handle); ++} ++ ++/* VFS operations structure */ ++ ++struct vfs_fn_pointers freebsd_fns = { ++ /* Disk operations */ ++ .connect_fn = freebsd_connect, ++ .disconnect_fn = freebsd_disconnect, ++ ++ /* EA operations. */ ++ .getxattrat_send_fn = vfs_not_implemented_getxattrat_send, ++ .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv, ++ .fgetxattr_fn = freebsd_fgetxattr, ++ .flistxattr_fn = freebsd_flistxattr, ++ .fremovexattr_fn = freebsd_fremovexattr, ++ .fsetxattr_fn = freebsd_fsetxattr, ++}; ++ ++static_decl_vfs; ++NTSTATUS vfs_freebsd_init(TALLOC_CTX *ctx) ++{ ++ NTSTATUS ret; ++ ++ ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "freebsd", ++ &freebsd_fns); ++ ++ if (!NT_STATUS_IS_OK(ret)) { ++ return ret; ++ } ++ ++ vfs_freebsd_debug_level = debug_add_class("freebsd"); ++ if (vfs_freebsd_debug_level == -1) { ++ vfs_freebsd_debug_level = DBGC_VFS; ++ DEBUG(0, ("vfs_freebsd: Couldn't register custom debugging class!\n")); ++ } else { ++ DEBUG(10, ("vfs_freebsd: Debug class number of 'fileid': %d\n", vfs_freebsd_debug_level)); ++ } ++ ++ return ret; ++} +diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build +index ff318c3fa06..f88d054d524 100644 +--- a/source3/modules/wscript_build ++++ b/source3/modules/wscript_build +@@ -636,6 +636,13 @@ bld.SAMBA3_MODULE('vfs_delay_inject', + enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_delay_inject'), + install=False) + ++bld.SAMBA3_MODULE('vfs_freebsd', ++ subsystem='vfs', ++ source='vfs_freebsd.c', ++ init_function='', ++ internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_freebsd'), ++ enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_freebsd')) ++ + bld.SAMBA3_MODULE('vfs_widelinks', + subsystem='vfs', + source='vfs_widelinks.c', +-- +2.37.1 + diff --git a/net/samba416/files/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch b/net/samba416/files/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch new file mode 100644 index 000000000000..3c0b7e2b5329 --- /dev/null +++ b/net/samba416/files/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch @@ -0,0 +1,149 @@ +From 584c69e77abb537a7345222648a397a9963c01b7 Mon Sep 17 00:00:00 2001 +From: "Timur I. Bakeyev" +Date: Sat, 15 Oct 2022 04:02:43 +0200 +Subject: [PATCH 28/28] s3:lib:system - add FreeBSD proc_fd_pattern + +Add support for FreeBSD equivalent of /proc/self/fd through a special +fdescfs mount with option "nodup". This filesystem should be mounted +either to the private $PIDDIR/fd/ directory or to /dev/fd in order to +provide security and performance characteristics similar to Linux. + +Signed-off-by: Timur I. Bakeyev +--- + source3/lib/system.c | 108 ++++++++++++++++++++++++++++++++++--------- + 1 file changed, 87 insertions(+), 21 deletions(-) + +diff --git a/source3/lib/system.c b/source3/lib/system.c +index 00d31692e00..d22ec08361c 100644 +--- a/source3/lib/system.c ++++ b/source3/lib/system.c +@@ -1094,39 +1094,105 @@ int sys_get_number_of_cores(void) + } + #endif + +-static struct proc_fd_pattern { +- const char *pattern; +- const char *test_path; +-} proc_fd_patterns[] = { +- /* Linux */ +- { "/proc/self/fd/%d", "/proc/self/fd/0" }, +- { NULL, NULL }, ++static bool freebsd_fdesc_check(const char *pattern) ++{ ++ char fdesc_path[PATH_MAX]; ++ int fd, fd2; ++ ++ fd = open(lp_pid_directory(), O_DIRECTORY); ++ if (fd == -1) { ++ DBG_ERR("%s: failed to open pid directory: %s\n", ++ lp_pid_directory(), strerror(errno)); ++ return false; ++ } ++ ++ snprintf(fdesc_path, sizeof(fdesc_path), pattern, fd); ++ ++ fd2 = open(fdesc_path, O_DIRECTORY); ++ if (fd2 == -1) { ++ /* ++ * Setting O_DIRECTORY on open of fdescfs mount ++ * without `nodup` option will fail with ENOTDIR. ++ */ ++ if (errno == ENOTDIR) { ++ DBG_ERR("%s: fdescfs filesystem is not mounted with " ++ "'nodup' option. This specific mount option is " ++ "required in order to enable race-free handling " ++ "of paths.\n" ++ "See documentation for Samba's New VFS' " ++ "for more details. The `nodup` mount option was " ++ "introduced in FreeBSD 13.\n", fdesc_path); ++ close(fd); ++ return false; ++ } ++ DBG_ERR("%s: failed to open fdescfs path: %s\n", ++ fdesc_path, strerror(errno)); ++ close(fd); ++ return false; ++ } ++ close(fd); ++ close(fd2); ++ ++ return true; ++} ++ ++static char* linux_pattern(char *buf, size_t bufsize) ++{ ++ char proc_fd_path[PATH_MAX]; ++ const char *pattern = "/proc/self/fd/%lu"; ++ struct stat sb; ++ ++ snprintf(proc_fd_path, sizeof(proc_fd_path), pattern, 0); ++ if(stat(proc_fd_path, &sb) == 0) { ++ snprintf(buf, bufsize, "%s", pattern); ++ return buf; ++ } ++ return NULL; ++} ++ ++static char* freebsd_pattern(char *buf, size_t bufsize) { ++ const char** base; ++ const char* base_dir[] = { ++ lp_pid_directory(), /* This is a preffered location */ ++ "/dev", ++ NULL ++ }; ++ ++ for(base = &base_dir[0]; *base != NULL; base++) { ++ snprintf(buf, bufsize, "%s/fd/%%lu", *base); ++ if(freebsd_fdesc_check(buf)) { ++ return buf; ++ } ++ } ++ return NULL; ++} ++ ++static char* (*proc_fd_patterns[])(char *, size_t) = { ++ linux_pattern, ++ freebsd_pattern, ++ NULL + }; + +-static const char *proc_fd_pattern; ++static char proc_fd_pattern_buf[PATH_MAX]; ++static const char *proc_fd_pattern = NULL; + + bool sys_have_proc_fds(void) + { +- static bool checked; +- static bool have_proc_fds; +- struct proc_fd_pattern *p = NULL; +- struct stat sb; +- int ret; ++ static bool checked = false; ++ static bool have_proc_fds = false; ++ char* (**pattern_func)(char *, size_t) = NULL; + + if (checked) { + return have_proc_fds; + } + +- for (p = &proc_fd_patterns[0]; p->test_path != NULL; p++) { +- ret = stat(p->test_path, &sb); +- if (ret != 0) { +- continue; ++ for (pattern_func = &proc_fd_patterns[0]; *pattern_func != NULL; pattern_func++) { ++ if((*pattern_func)(proc_fd_pattern_buf, sizeof(proc_fd_pattern_buf)) != NULL) { ++ have_proc_fds = true; ++ proc_fd_pattern = proc_fd_pattern_buf; ++ break; + } +- have_proc_fds = true; +- proc_fd_pattern = p->pattern; +- break; + } +- + checked = true; + return have_proc_fds; + } +-- +2.37.1 + diff --git a/net/samba416/files/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch b/net/samba416/files/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch new file mode 100644 index 000000000000..3a6dd4360434 --- /dev/null +++ b/net/samba416/files/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch @@ -0,0 +1,105 @@ +From 4d27a5990311fdd4c73918781f91a3c18196b24c Mon Sep 17 00:00:00 2001 +From: Andrew Walker +Date: Fri, 12 Nov 2021 14:48:25 -0500 +Subject: [PATCH] s3:modules:zfsacl - fix get/set ACL on FreeBSD 13+ + +FreeBSD 13 added support for O_PATH, which means +that fsp being used in get_nt_acl() and set_nt_acl() +will have O_PATH opens and we must use either the IO +fd or use a procfd path for this. + +Signed-off-by: Andrew Walker +--- + source3/modules/vfs_zfsacl.c | 62 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 62 insertions(+) + +diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c +index 69a1db59249..0472de23825 100644 +--- a/source3/modules/vfs_zfsacl.c ++++ b/source3/modules/vfs_zfsacl.c +@@ -235,12 +235,43 @@ static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp, + SMB_ASSERT(i == naces); + + /* store acl */ ++#ifdef O_PATH ++ if (fsp->fsp_flags.is_pathref) { ++ const char *proc_fd_path = NULL; ++ char buf[PATH_MAX]; ++ ++ if (!fsp->fsp_flags.have_proc_fds) { ++ DBG_ERR("fdescfs filesystem must be mounted with 'nodup' " ++ "option \n"); ++ errno = EBADF; ++ return -1; ++ } ++ ++ fd = fsp_get_pathref_fd(fsp); ++ proc_fd_path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (proc_fd_path == NULL) { ++ DBG_ERR("%s: failed to generate pathref fd for %d\n", ++ fsp_str_dbg(fsp), fd); ++ errno = EBADF; ++ return -1; ++ } ++ rv = acl(proc_fd_path, ACE_SETACL, naces, acebuf); ++ } else { ++ fd = fsp_get_io_fd(fsp); ++ if (fd == -1) { ++ errno = EBADF; ++ return false; ++ } ++ rv = facl(fd, ACE_SETACL, naces, acebuf); ++ } ++#else + fd = fsp_get_pathref_fd(fsp); + if (fd == -1) { + errno = EBADF; + return false; + } + rv = facl(fd, ACE_SETACL, naces, acebuf); ++#endif + if (rv != 0) { + if(errno == ENOSYS) { + DEBUG(9, ("acl(ACE_SETACL, %s): Operation is not " +@@ -321,7 +352,38 @@ static int fget_zfsacl(TALLOC_CTX *mem_ctx, + ace_t *acebuf = NULL; + int fd; + ++#ifdef O_PATH ++ if (fsp->fsp_flags.is_pathref) { ++ const char *proc_fd_path = NULL; ++ char buf[PATH_MAX]; ++ struct smb_filename smb_fname; ++ ++ if (!fsp->fsp_flags.have_proc_fds) { ++ DBG_ERR("fdescfs filesystem must be mounted with 'nodup' " ++ "option \n"); ++ errno = EBADF; ++ return -1; ++ } ++ ++ fd = fsp_get_pathref_fd(fsp); ++ proc_fd_path = sys_proc_fd_path(fd, buf, sizeof(buf)); ++ if (proc_fd_path == NULL) { ++ DBG_ERR("%s: failed to generate pathref fd for %d\n", ++ fsp_str_dbg(fsp), fd); ++ errno = EBADF; ++ return -1; ++ } ++ ++ smb_fname = (struct smb_filename) { ++ .base_name = discard_const_p(char, proc_fd_path) ++ }; ++ ++ return get_zfsacl(mem_ctx, &smb_fname, outbuf); ++ } ++ fd = fsp_get_io_fd(fsp); ++#else + fd = fsp_get_pathref_fd(fsp); ++#endif + if (fd == -1) { + errno = EBADF; + return -1; +-- +2.37.1 + diff --git a/net/samba416/files/0099-s4-mitkdc-Add-support-for-MIT-Kerberos-1.20.patch b/net/samba416/files/0099-s4-mitkdc-Add-support-for-MIT-Kerberos-1.20.patch new file mode 100644 index 000000000000..e38cf5214696 --- /dev/null +++ b/net/samba416/files/0099-s4-mitkdc-Add-support-for-MIT-Kerberos-1.20.patch @@ -0,0 +1,947 @@ +From 74f71d2e97bc15350b05967e6cff590a6b287a21 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Mon, 4 Oct 2021 11:53:55 +0200 +Subject: [PATCH] s4:mitkdc: Add support for MIT Kerberos 1.20 + +This also addresses CVE-2020-17049. + +MIT Kerberos 1.20 is in pre-release state at the time writing this commit. It +will be released in autumn 2022. We need to support MIT Kerberos 1.19 till +enough distributions have been released with MIT Kerberos 1.20. + +Pair-Programmed-With: Robbie Harwood +Signed-off-by: Andreas Schneider +Signed-off-by: Robbie Harwood +Reviewed-by: Stefan Metzmacher +--- + .../samba/tests/krb5/compatability_tests.py | 9 +- + selftest/knownfail_mit_kdc | 25 +- + selftest/knownfail_mit_kdc_1_20 | 9 + + selftest/wscript | 6 + + source4/kdc/mit-kdb/kdb_samba.c | 7 +- + source4/kdc/mit-kdb/kdb_samba.h | 10 + + source4/kdc/mit-kdb/kdb_samba_policies.c | 125 ++++- + source4/kdc/mit_samba.c | 481 +++++++++++++++++- + source4/kdc/mit_samba.h | 11 +- + source4/selftest/tests.py | 7 +- + wscript_configure_system_mitkrb5 | 4 + + 11 files changed, 661 insertions(+), 33 deletions(-) + create mode 100644 selftest/knownfail_mit_kdc_1_20 + +diff --git a/python/samba/tests/krb5/compatability_tests.py b/python/samba/tests/krb5/compatability_tests.py +index 44c2afd41dc..b862f381bc5 100755 +--- a/python/samba/tests/krb5/compatability_tests.py ++++ b/python/samba/tests/krb5/compatability_tests.py +@@ -120,7 +120,12 @@ class SimpleKerberosTests(KDCBaseTest): + self.fail( + "(Heimdal) Salt populated for ARCFOUR_HMAC_MD5 encryption") + +- def test_heimdal_ticket_signature(self): ++ # This tests also passes again Samba AD built with MIT Kerberos 1.20 which ++ # is not released yet. ++ # ++ # FIXME: Should be moved to to a new kdc_tgt_tests.py once MIT KRB5 1.20 ++ # is released. ++ def test_ticket_signature(self): + # Ensure that a DC correctly issues tickets signed with its krbtgt key. + user_creds = self.get_client_creds() + target_creds = self.get_service_creds() +@@ -141,7 +146,7 @@ class SimpleKerberosTests(KDCBaseTest): + self.verify_ticket(service_ticket, key, service_ticket=True, + expect_ticket_checksum=True) + +- def test_mit_ticket_signature(self): ++ def test_mit_pre_1_20_ticket_signature(self): + # Ensure that a DC does not issue tickets signed with its krbtgt key. + user_creds = self.get_client_creds() + target_creds = self.get_service_creds() +diff --git a/selftest/knownfail_mit_kdc b/selftest/knownfail_mit_kdc +index 6d07ca4efb6..f9d5c4b0b46 100644 +--- a/selftest/knownfail_mit_kdc ++++ b/selftest/knownfail_mit_kdc +@@ -294,8 +294,6 @@ samba.tests.krb5.as_canonicalization_tests.samba.tests.krb5.as_canonicalization_ + # + # KDC TGS PAC tests + # +-^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_client_no_auth_data_required\(ad_dc\) +-^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_no_pac_client_no_auth_data_required\(ad_dc\) + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_no_pac_service_no_auth_data_required\(ad_dc\) + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_remove_pac\(ad_dc\) + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_remove_pac_client_no_auth_data_required\(ad_dc\) +@@ -321,7 +319,10 @@ samba.tests.krb5.as_canonicalization_tests.samba.tests.krb5.as_canonicalization_ + # + ^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_enc_timestamp_spn(?!_) + ^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_enc_timestamp_spn_realm +- ++^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_enc_timestamp_aes128_rc4.*fl2003dc ++^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_enc_timestamp_mac_aes128_rc4.*fl2003dc ++^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_no_preauth.*aes.*rc4.*fl2003dc ++^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_as_req_no_preauth.*rc4.*aes.*fl2003dc + # Differences in our KDC compared to windows + # + ^samba4.krb5.kdc .*.as-req-pac-request # We should reply to a request for a PAC over UDP with KRB5KRB_ERR_RESPONSE_TOO_BIG unconditionally +@@ -373,30 +374,14 @@ samba.tests.krb5.as_canonicalization_tests.samba.tests.krb5.as_canonicalization_ + ^samba4.blackbox.pkinit_pac.netr-mem-arcfour.s4u2proxy-arcfour.ad_dc_ntvfs:local + ^samba4.blackbox.pkinit_pac.netr-mem-arcfour.verify-sig-arcfour.ad_dc:local + ^samba4.blackbox.pkinit_pac.netr-mem-arcfour.verify-sig-arcfour.ad_dc_ntvfs:local +-^samba4.rpc.pac on ncacn_np.netr-bdc-aes.verify-sig-aes.fl2000dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-aes.verify-sig-aes.fl2003dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-aes.verify-sig-aes.fl2008dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-aes.verify-sig-aes.fl2008r2dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-arcfour.verify-sig-arcfour.fl2000dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-arcfour.verify-sig-arcfour.fl2003dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-arcfour.verify-sig-arcfour.fl2008dc +-^samba4.rpc.pac on ncacn_np.netr-bdc-arcfour.verify-sig-arcfour.fl2008r2dc + ^samba4.rpc.pac on ncacn_np.netr-mem-aes.s4u2proxy-aes.fl2000dc + ^samba4.rpc.pac on ncacn_np.netr-mem-aes.s4u2proxy-aes.fl2003dc + ^samba4.rpc.pac on ncacn_np.netr-mem-aes.s4u2proxy-aes.fl2008dc + ^samba4.rpc.pac on ncacn_np.netr-mem-aes.s4u2proxy-aes.fl2008r2dc +-^samba4.rpc.pac on ncacn_np.netr-mem-aes.verify-sig-aes.fl2000dc +-^samba4.rpc.pac on ncacn_np.netr-mem-aes.verify-sig-aes.fl2003dc +-^samba4.rpc.pac on ncacn_np.netr-mem-aes.verify-sig-aes.fl2008dc +-^samba4.rpc.pac on ncacn_np.netr-mem-aes.verify-sig-aes.fl2008r2dc + ^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.s4u2proxy-arcfour.fl2000dc + ^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.s4u2proxy-arcfour.fl2003dc + ^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.s4u2proxy-arcfour.fl2008dc + ^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.s4u2proxy-arcfour.fl2008r2dc +-^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.verify-sig-arcfour.fl2000dc +-^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.verify-sig-arcfour.fl2003dc +-^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.verify-sig-arcfour.fl2008dc +-^samba4.rpc.pac on ncacn_np.netr-mem-arcfour.verify-sig-arcfour.fl2008r2dc + # + # Alias tests + # +@@ -444,8 +429,6 @@ samba.tests.krb5.as_canonicalization_tests.samba.tests.krb5.as_canonicalization_ + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_rodc_validate_pac_request_false + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_rodc_validate_pac_request_none + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_rodc_validate_pac_request_true +-^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_s4u2self_authdata_no_pac +-^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_s4u2self_no_pac + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_s4u2self_req(?!_invalid) + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_s4u2self_rodc_allowed_denied + ^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_s4u2self_rodc_denied +diff --git a/selftest/knownfail_mit_kdc_1_20 b/selftest/knownfail_mit_kdc_1_20 +new file mode 100644 +index 00000000000..4a47ab974ae +--- /dev/null ++++ b/selftest/knownfail_mit_kdc_1_20 +@@ -0,0 +1,9 @@ ++^samba.tests.krb5.compatability_tests.samba.tests.krb5.compatability_tests.SimpleKerberosTests.test_mit_pre_1_20_ticket_signature ++# ++# FAST tests ++# https://github.com/krb5/krb5/pull/1225#issuecomment-996418770 ++# ++^samba.tests.krb5.fast_tests.samba.tests.krb5.fast_tests.FAST_Tests.test_fast_encrypted_challenge_as_req_self\( ++^samba.tests.krb5.fast_tests.samba.tests.krb5.fast_tests.FAST_Tests.test_simple_as_req_self\( ++^samba.tests.krb5.fast_tests.samba.tests.krb5.fast_tests.FAST_Tests.test_simple_as_req_self_pac_request_none\( ++^samba.tests.krb5.fast_tests.samba.tests.krb5.fast_tests.FAST_Tests.test_simple_as_req_self_pac_request_true\( +diff --git a/selftest/wscript b/selftest/wscript +index e207b87eeb8..c92b37bd5e1 100644 +--- a/selftest/wscript ++++ b/selftest/wscript +@@ -260,6 +260,12 @@ def cmd_testonly(opt): + env.OPTIONS += " --mitkrb5 --exclude=${srcdir}/selftest/skip_mit_kdc" + env.FILTER_XFAIL += " --expected-failures=${srcdir}/selftest/"\ + "knownfail_mit_kdc" ++ ++ if CONFIG_GET(opt, 'HAVE_MIT_KRB5_PRE_1_20'): ++ env.FILTER_XFAIL += ' --expected-failures=${srcdir}/selftest/knownfail_mit_kdc_pre_1_20' ++ ++ if CONFIG_GET(opt, 'HAVE_MIT_KRB5_1_20'): ++ env.FILTER_XFAIL += ' --expected-failures=${srcdir}/selftest/knownfail_mit_kdc_1_20' + else: + env.FILTER_XFAIL += " --expected-failures=${srcdir}/selftest/"\ + "knownfail_heimdal_kdc" +diff --git a/source4/kdc/mit-kdb/kdb_samba.c b/source4/kdc/mit-kdb/kdb_samba.c +index 02bbdca9f54..f5092f75873 100644 +--- a/source4/kdc/mit-kdb/kdb_samba.c ++++ b/source4/kdc/mit-kdb/kdb_samba.c +@@ -166,10 +166,15 @@ kdb_vftabl kdb_function_table = { + .decrypt_key_data = kdb_samba_dbekd_decrypt_key_data, + .encrypt_key_data = kdb_samba_dbekd_encrypt_key_data, + +- .sign_authdata = kdb_samba_db_sign_auth_data, + .check_policy_as = kdb_samba_db_check_policy_as, + .audit_as_req = kdb_samba_db_audit_as_req, + .check_allowed_to_delegate = kdb_samba_db_check_allowed_to_delegate, + + .free_principal_e_data = kdb_samba_db_free_principal_e_data, ++ ++#if KRB5_KDB_DAL_MAJOR_VERSION >= 9 ++ .issue_pac = kdb_samba_db_issue_pac, ++#else ++ .sign_authdata = kdb_samba_db_sign_auth_data, ++#endif + }; +diff --git a/source4/kdc/mit-kdb/kdb_samba.h b/source4/kdc/mit-kdb/kdb_samba.h +index e9613e2fc7e..dd97061130c 100644 +--- a/source4/kdc/mit-kdb/kdb_samba.h ++++ b/source4/kdc/mit-kdb/kdb_samba.h +@@ -113,6 +113,16 @@ krb5_error_code kdb_samba_dbekd_encrypt_key_data(krb5_context context, + krb5_key_data *key_data); + + /* from kdb_samba_policies.c */ ++krb5_error_code kdb_samba_db_issue_pac(krb5_context context, ++ unsigned int flags, ++ krb5_db_entry *client, ++ krb5_keyblock *replaced_reply_key, ++ krb5_db_entry *server, ++ krb5_db_entry *signing_krbtgt, ++ krb5_timestamp authtime, ++ krb5_pac old_pac, ++ krb5_pac new_pac, ++ krb5_data ***auth_indicators); + + krb5_error_code kdb_samba_db_sign_auth_data(krb5_context context, + unsigned int flags, +diff --git a/source4/kdc/mit-kdb/kdb_samba_policies.c b/source4/kdc/mit-kdb/kdb_samba_policies.c +index 793fe366c35..cbc9bbb9dae 100644 +--- a/source4/kdc/mit-kdb/kdb_samba_policies.c ++++ b/source4/kdc/mit-kdb/kdb_samba_policies.c +@@ -190,6 +190,7 @@ static krb5_error_code ks_get_pac(krb5_context context, + return code; + } + ++#if KRB5_KDB_DAL_MAJOR_VERSION < 9 + static krb5_error_code ks_verify_pac(krb5_context context, + unsigned int flags, + krb5_const_principal client_princ, +@@ -557,6 +558,128 @@ done: + + return code; + } ++#else /* KRB5_KDB_DAL_MAJOR_VERSION >= 9 */ ++static krb5_error_code ks_update_pac(krb5_context context, ++ int flags, ++ krb5_db_entry *client, ++ krb5_db_entry *server, ++ krb5_db_entry *signing_krbtgt, ++ krb5_pac old_pac, ++ krb5_pac new_pac) ++{ ++ struct mit_samba_context *mit_ctx = NULL; ++ krb5_error_code code; ++ ++ mit_ctx = ks_get_context(context); ++ if (mit_ctx == NULL) { ++ return KRB5_KDB_DBNOTINITED; ++ } ++ ++ code = mit_samba_update_pac(mit_ctx, ++ context, ++ flags, ++ client, ++ server, ++ signing_krbtgt, ++ old_pac, ++ new_pac); ++ if (code != 0) { ++ return code; ++ } ++ ++ return code; ++} ++ ++krb5_error_code kdb_samba_db_issue_pac(krb5_context context, ++ unsigned int flags, ++ krb5_db_entry *client, ++ krb5_keyblock *replaced_reply_key, ++ krb5_db_entry *server, ++ krb5_db_entry *signing_krbtgt, ++ krb5_timestamp authtime, ++ krb5_pac old_pac, ++ krb5_pac new_pac, ++ krb5_data ***auth_indicators) ++{ ++ char *client_name = NULL; ++ char *server_name = NULL; ++ krb5_error_code code = EINVAL; ++ ++ /* The KDC handles both signing and verification for us. */ ++ ++ if (client != NULL) { ++ code = krb5_unparse_name(context, ++ client->princ, ++ &client_name); ++ if (code != 0) { ++ return code; ++ } ++ } ++ ++ if (server != NULL) { ++ code = krb5_unparse_name(context, ++ server->princ, ++ &server_name); ++ if (code != 0) { ++ SAFE_FREE(client_name); ++ return code; ++ } ++ } ++ ++ /* ++ * Get a new PAC for AS-REQ or S4U2Self for our realm. ++ * ++ * For a simple cross-realm S4U2Proxy there will be the following TGS ++ * requests after the client realm is identified: ++ * ++ * 1. server@SREALM to SREALM for krbtgt/CREALM@SREALM -- a regular TGS ++ * request with server's normal TGT and no S4U2Self padata. ++ * 2. server@SREALM to CREALM for server@SREALM (expressed as an ++ * enterprise principal), with the TGT from #1 as header ticket and ++ * S4U2Self padata identifying the client. ++ * 3. server@SREALM to SREALM for server@SREALM with S4U2Self padata, ++ * with the referral TGT from #2 as header ticket ++ * ++ * In request 2 the PROTOCOL_TRANSITION and CROSS_REALM flags are set, ++ * and the request is for a local client (so client != NULL) and we ++ * want to make a new PAC. ++ * ++ * In request 3 the PROTOCOL_TRANSITION and CROSS_REALM flags are also ++ * set, but the request is for a non-local client (so client == NULL) ++ * and we want to copy the subject PAC contained in the referral TGT. ++ */ ++ if (old_pac == NULL || ++ (client != NULL && (flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION))) { ++ DBG_NOTICE("Generate PAC for AS-REQ [client=%s, flags=%#08x]\n", ++ client_name != NULL ? client_name : "", ++ flags); ++ ++ code = ks_get_pac(context, ++ client, ++ server, ++ replaced_reply_key, ++ &new_pac); ++ } else { ++ DBG_NOTICE("Update PAC for TGS-REQ [client=%s, server=%s, " ++ "flags=%#08x]\n", ++ client_name != NULL ? client_name : "", ++ server_name != NULL ? server_name : "", ++ flags); ++ ++ code = ks_update_pac(context, ++ flags, ++ client, ++ server, ++ signing_krbtgt, ++ old_pac, ++ new_pac); ++ } ++ SAFE_FREE(client_name); ++ SAFE_FREE(server_name); ++ ++ return code; ++} ++#endif /* KRB5_KDB_DAL_MAJOR_VERSION */ + + krb5_error_code kdb_samba_db_check_allowed_to_delegate(krb5_context context, + krb5_const_principal client, +@@ -635,4 +758,4 @@ void kdb_samba_db_audit_as_req(krb5_context context, + samba_bad_password_count(client, error_code); + + /* TODO: perform proper audit logging for addresses */ +-} ++} +\ No newline at end of file +diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c +index cb72b5de294..d58bbea4a5d 100644 +--- a/source4/kdc/mit_samba.c ++++ b/source4/kdc/mit_samba.c +@@ -229,6 +229,27 @@ int mit_samba_get_principal(struct mit_samba_context *ctx, + sflags |= SDB_F_FORCE_CANON; + #endif + ++#if KRB5_KDB_DAL_MAJOR_VERSION >= 9 ++ if (kflags & KRB5_KDB_FLAG_REFERRAL_OK) { ++ sflags |= SDB_F_CANON; ++ } ++ ++ if (kflags & KRB5_KDB_FLAG_CLIENT) { ++ sflags |= SDB_F_GET_CLIENT; ++ ++ if (!(kflags & KRB5_KDB_FLAG_REFERRAL_OK)) { ++ sflags |= SDB_F_FOR_AS_REQ; ++ } ++ } else if (ks_is_tgs_principal(ctx, principal)) { ++ sflags |= SDB_F_GET_KRBTGT; ++ } else { ++ sflags |= SDB_F_GET_SERVER; ++ ++ if (!(kflags & KRB5_KDB_FLAG_REFERRAL_OK)) { ++ sflags |= SDB_F_FOR_TGS_REQ; ++ } ++ } ++#else /* KRB5_KDB_DAL_MAJOR_VERSION < 9 */ + if (kflags & KRB5_KDB_FLAG_CANONICALIZE) { + sflags |= SDB_F_CANON; + } +@@ -247,6 +268,7 @@ int mit_samba_get_principal(struct mit_samba_context *ctx, + } else { + sflags |= SDB_F_GET_SERVER|SDB_F_FOR_TGS_REQ; + } ++#endif /* KRB5_KDB_DAL_MAJOR_VERSION */ + + /* always set this or the created_by data will not be populated by samba's + * backend and we will fail to parse the entry later */ +@@ -434,7 +456,7 @@ int mit_samba_get_pac(struct mit_samba_context *smb_ctx, + krb5_context context, + krb5_db_entry *client, + krb5_db_entry *server, +- krb5_keyblock *client_key, ++ krb5_keyblock *replaced_reply_key, + krb5_pac *pac) + { + TALLOC_CTX *tmp_ctx; +@@ -461,12 +483,10 @@ int mit_samba_get_pac(struct mit_samba_context *smb_ctx, + return ENOMEM; + } + +-#if 0 /* TODO Find out if this is a pkinit_reply key */ + /* Check if we have a PREAUTH key */ +- if (client_key != NULL) { ++ if (replaced_reply_key != NULL) { + cred_ndr_ptr = &cred_ndr; + } +-#endif + + is_krbtgt = ks_is_tgs_principal(smb_ctx, server->princ); + +@@ -488,9 +508,9 @@ int mit_samba_get_pac(struct mit_samba_context *smb_ctx, + return EINVAL; + } + +- if (cred_ndr != NULL) { ++ if (replaced_reply_key != NULL && cred_ndr != NULL) { + code = samba_kdc_encrypt_pac_credentials(context, +- client_key, ++ replaced_reply_key, + cred_ndr, + tmp_ctx, + &cred_blob); +@@ -514,6 +534,7 @@ int mit_samba_get_pac(struct mit_samba_context *smb_ctx, + return code; + } + ++#if KRB5_KDB_DAL_MAJOR_VERSION < 9 + krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx, + krb5_context context, + int flags, +@@ -999,6 +1020,454 @@ done: + talloc_free(tmp_ctx); + return code; + } ++#else ++krb5_error_code mit_samba_update_pac(struct mit_samba_context *ctx, ++ krb5_context context, ++ int flags, ++ krb5_db_entry *client, ++ krb5_db_entry *server, ++ krb5_db_entry *krbtgt, ++ krb5_pac old_pac, ++ krb5_pac new_pac) ++{ ++ TALLOC_CTX *tmp_ctx = NULL; ++ krb5_error_code code; ++ NTSTATUS nt_status; ++ DATA_BLOB *pac_blob = NULL; ++ DATA_BLOB *upn_blob = NULL; ++ DATA_BLOB *requester_sid_blob = NULL; ++ struct samba_kdc_entry *client_skdc_entry = NULL; ++ struct samba_kdc_entry *server_skdc_entry = NULL; ++ struct samba_kdc_entry *krbtgt_skdc_entry = NULL; ++ bool is_in_db = false; ++ bool is_untrusted = false; ++ bool is_krbtgt = false; ++ size_t num_types = 0; ++ uint32_t *types = NULL; ++ size_t i = 0; ++ ssize_t logon_info_idx = -1; ++ ssize_t delegation_idx = -1; ++ ssize_t logon_name_idx = -1; ++ ssize_t upn_dns_info_idx = -1; ++ ssize_t srv_checksum_idx = -1; ++ ssize_t kdc_checksum_idx = -1; ++ ssize_t tkt_checksum_idx = -1; ++ ssize_t attrs_info_idx = -1; ++ ssize_t requester_sid_idx = -1; ++ ++ /* Create a memory context early so code can use talloc_stackframe() */ ++ tmp_ctx = talloc_named(ctx, 0, "mit_samba_update_pac context"); ++ if (tmp_ctx == NULL) { ++ return ENOMEM; ++ } ++ ++ if (client != NULL) { ++ client_skdc_entry = ++ talloc_get_type_abort(client->e_data, ++ struct samba_kdc_entry); ++ ++ /* ++ * Check the objectSID of the client and pac data are the same. ++ * Does a parse and SID check, but no crypto. ++ */ ++ code = samba_kdc_validate_pac_blob(context, ++ client_skdc_entry, ++ old_pac); ++ if (code != 0) { ++ goto done; ++ } ++ } ++ ++ if (krbtgt == NULL) { ++ code = EINVAL; ++ goto done; ++ } ++ krbtgt_skdc_entry = ++ talloc_get_type_abort(krbtgt->e_data, ++ struct samba_kdc_entry); ++ ++ /* ++ * If the krbtgt was generated by an RODC, and we are not that ++ * RODC, then we need to regenerate the PAC - we can't trust ++ * it, and confirm that the RODC was permitted to print this ticket ++ * ++ * Because of the samba_kdc_validate_pac_blob() step we can be ++ * sure that the record in 'client' or 'server' matches the SID in the ++ * original PAC. ++ */ ++ code = samba_krbtgt_is_in_db(krbtgt_skdc_entry, ++ &is_in_db, ++ &is_untrusted); ++ if (code != 0) { ++ goto done; ++ } ++ ++ if (is_untrusted) { ++ struct auth_user_info_dc *user_info_dc = NULL; ++ WERROR werr; ++ ++ if (client == NULL) { ++ code = KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN; ++ goto done; ++ } ++ ++ nt_status = samba_kdc_get_pac_blobs(tmp_ctx, ++ client_skdc_entry, ++ &pac_blob, ++ NULL, ++ &upn_blob, ++ NULL, ++ PAC_ATTRIBUTE_FLAG_PAC_WAS_GIVEN_IMPLICITLY, ++ &requester_sid_blob, ++ &user_info_dc); ++ if (!NT_STATUS_IS_OK(nt_status)) { ++ code = EINVAL; ++ goto done; ++ } ++ ++ /* ++ * Check if the SID list in the user_info_dc intersects ++ * correctly with the RODC allow/deny lists. ++ */ ++ werr = samba_rodc_confirm_user_is_allowed(user_info_dc->num_sids, ++ user_info_dc->sids, ++ krbtgt_skdc_entry, ++ client_skdc_entry); ++ if (!W_ERROR_IS_OK(werr)) { ++ code = KRB5KDC_ERR_TGT_REVOKED; ++ if (W_ERROR_EQUAL(werr, ++ WERR_DOMAIN_CONTROLLER_NOT_FOUND)) { ++ code = KRB5KDC_ERR_POLICY; ++ } ++ goto done; ++ } ++ } else { ++ pac_blob = talloc_zero(tmp_ctx, DATA_BLOB); ++ if (pac_blob == NULL) { ++ code = ENOMEM; ++ goto done; ++ } ++ ++ nt_status = samba_kdc_update_pac_blob(tmp_ctx, ++ context, ++ krbtgt_skdc_entry->kdc_db_ctx->samdb, ++ old_pac, ++ pac_blob, ++ NULL, ++ NULL); ++ if (!NT_STATUS_IS_OK(nt_status)) { ++ DEBUG(0, ("Update PAC blob failed: %s\n", ++ nt_errstr(nt_status))); ++ code = EINVAL; ++ goto done; ++ } ++ } ++ ++ /* Check the types of the given PAC */ ++ code = krb5_pac_get_types(context, old_pac, &num_types, &types); ++ if (code != 0) { ++ goto done; ++ } ++ ++ for (i = 0; i < num_types; i++) { ++ switch (types[i]) { ++ case PAC_TYPE_LOGON_INFO: ++ if (logon_info_idx != -1) { ++ DBG_WARNING("logon info type[%u] twice [%zd] and " ++ "[%zu]: \n", ++ types[i], ++ logon_info_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ logon_info_idx = i; ++ break; ++ case PAC_TYPE_CONSTRAINED_DELEGATION: ++ if (delegation_idx != -1) { ++ DBG_WARNING("constrained delegation type[%u] " ++ "twice [%zd] and [%zu]: \n", ++ types[i], ++ delegation_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ delegation_idx = i; ++ break; ++ case PAC_TYPE_LOGON_NAME: ++ if (logon_name_idx != -1) { ++ DBG_WARNING("logon name type[%u] twice [%zd] " ++ "and [%zu]: \n", ++ types[i], ++ logon_name_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ logon_name_idx = i; ++ break; ++ case PAC_TYPE_UPN_DNS_INFO: ++ if (upn_dns_info_idx != -1) { ++ DBG_WARNING("upn dns info type[%u] twice [%zd] " ++ "and [%zu]: \n", ++ types[i], ++ upn_dns_info_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ upn_dns_info_idx = i; ++ break; ++ case PAC_TYPE_SRV_CHECKSUM: ++ if (srv_checksum_idx != -1) { ++ DBG_WARNING("srv checksum type[%u] twice [%zd] " ++ "and [%zu]: \n", ++ types[i], ++ srv_checksum_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ srv_checksum_idx = i; ++ break; ++ case PAC_TYPE_KDC_CHECKSUM: ++ if (kdc_checksum_idx != -1) { ++ DBG_WARNING("kdc checksum type[%u] twice [%zd] " ++ "and [%zu]: \n", ++ types[i], ++ kdc_checksum_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ kdc_checksum_idx = i; ++ break; ++ case PAC_TYPE_TICKET_CHECKSUM: ++ if (tkt_checksum_idx != -1) { ++ DBG_WARNING("ticket checksum type[%u] twice " ++ "[%zd] and [%zu]: \n", ++ types[i], ++ tkt_checksum_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ tkt_checksum_idx = i; ++ break; ++ case PAC_TYPE_ATTRIBUTES_INFO: ++ if (attrs_info_idx != -1) { ++ DBG_WARNING("attributes info type[%u] twice " ++ "[%zd] and [%zu]: \n", ++ types[i], ++ attrs_info_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ attrs_info_idx = i; ++ break; ++ case PAC_TYPE_REQUESTER_SID: ++ if (requester_sid_idx != -1) { ++ DBG_WARNING("requester sid type[%u] twice" ++ "[%zd] and [%zu]: \n", ++ types[i], ++ requester_sid_idx, ++ i); ++ code = EINVAL; ++ goto done; ++ } ++ requester_sid_idx = i; ++ break; ++ default: ++ continue; ++ } ++ } ++ ++ if (logon_info_idx == -1) { ++ DBG_WARNING("PAC_TYPE_LOGON_INFO missing\n"); ++ code = EINVAL; ++ goto done; ++ } ++ if (logon_name_idx == -1) { ++ DBG_WARNING("PAC_TYPE_LOGON_NAME missing\n"); ++ code = EINVAL; ++ goto done; ++ } ++ if (srv_checksum_idx == -1) { ++ DBG_WARNING("PAC_TYPE_SRV_CHECKSUM missing\n"); ++ code = EINVAL; ++ goto done; ++ } ++ if (kdc_checksum_idx == -1) { ++ DBG_WARNING("PAC_TYPE_KDC_CHECKSUM missing\n"); ++ code = EINVAL; ++ goto done; ++ } ++ if (!(flags & KRB5_KDB_FLAG_CONSTRAINED_DELEGATION) && ++ requester_sid_idx == -1) { ++ DBG_WARNING("PAC_TYPE_REQUESTER_SID missing\n"); ++ code = KRB5KDC_ERR_TGT_REVOKED; ++ goto done; ++ } ++ ++ server_skdc_entry = talloc_get_type_abort(server->e_data, ++ struct samba_kdc_entry); ++ ++ /* ++ * The server account may be set not to want the PAC. ++ * ++ * While this is wasteful if the above cacluations were done ++ * and now thrown away, this is cleaner as we do any ticket ++ * signature checking etc always. ++ * ++ * UF_NO_AUTH_DATA_REQUIRED is the rare case and most of the ++ * time (eg not accepting a ticket from the RODC) we do not ++ * need to re-generate anything anyway. ++ */ ++ if (!samba_princ_needs_pac(server_skdc_entry)) { ++ code = 0; ++ goto done; ++ } ++ ++ is_krbtgt = ks_is_tgs_principal(ctx, server->princ); ++ ++ if (!is_untrusted && !is_krbtgt) { ++ /* ++ * The client may have requested no PAC when obtaining the ++ * TGT. ++ */ ++ bool requested_pac = false; ++ ++ code = samba_client_requested_pac(context, ++ &old_pac, ++ tmp_ctx, ++ &requested_pac); ++ if (code != 0 || !requested_pac) { ++ goto done; ++ } ++ } ++ ++#define MAX_PAC_BUFFERS 64 /* Avoid infinite loops */ ++ ++ for (i = 0; i < MAX_PAC_BUFFERS;) { ++ krb5_data type_data; ++ DATA_BLOB type_blob = data_blob_null; ++ uint32_t type; ++ ++ if (i < num_types) { ++ type = types[i]; ++ i++; ++ } else { ++ break; ++ } ++ ++ switch (type) { ++ case PAC_TYPE_LOGON_INFO: ++ type_blob = *pac_blob; ++ break; ++ case PAC_TYPE_CREDENTIAL_INFO: ++ /* ++ * Note that we copy the credential blob, ++ * as it's only usable with the PKINIT based ++ * AS-REP reply key, it's only available on the ++ * host which did the AS-REQ/AS-REP exchange. ++ * ++ * This matches Windows 2008R2... ++ */ ++ break; ++ case PAC_TYPE_LOGON_NAME: ++ /* ++ * This is generated in the main KDC code ++ */ ++ continue; ++ case PAC_TYPE_UPN_DNS_INFO: ++ /* ++ * Replace in the RODC case, otherwise ++ * upn_blob is NULL and we just copy. ++ */ ++ if (upn_blob != NULL) { ++ type_blob = *upn_blob; ++ } ++ break; ++ case PAC_TYPE_SRV_CHECKSUM: ++ /* ++ * This is generated in the main KDC code ++ */ ++ continue; ++ case PAC_TYPE_KDC_CHECKSUM: ++ /* ++ * This is generated in the main KDC code ++ */ ++ continue; ++ case PAC_TYPE_TICKET_CHECKSUM: ++ /* ++ * This is generated in the main KDC code ++ */ ++ continue; ++ case PAC_TYPE_CONSTRAINED_DELEGATION: ++ /* ++ * This is generated in the main KDC code ++ */ ++ continue; ++ case PAC_TYPE_ATTRIBUTES_INFO: ++ if (!is_untrusted && is_krbtgt) { ++ /* just copy... */ ++ break; ++ } else { ++ continue; ++ } ++ case PAC_TYPE_REQUESTER_SID: ++ if (is_krbtgt) { ++ /* ++ * Replace in the RODC case, otherwise ++ * requester_sid_blob is NULL and we just copy. ++ */ ++ if (requester_sid_blob != NULL) { ++ type_blob = *requester_sid_blob; ++ } ++ break; ++ } else { ++ continue; ++ } ++ default: ++ /* just copy... */ ++ break; ++ } ++ ++ if (type_blob.length != 0) { ++ code = smb_krb5_copy_data_contents(&type_data, ++ type_blob.data, ++ type_blob.length); ++ if (code != 0) { ++ goto done; ++ } ++ } else { ++ code = krb5_pac_get_buffer(context, ++ old_pac, ++ type, ++ &type_data); ++ if (code != 0) { ++ goto done; ++ } ++ } ++ ++ code = krb5_pac_add_buffer(context, ++ new_pac, ++ type, ++ &type_data); ++ smb_krb5_free_data_contents(context, &type_data); ++ if (code != 0) { ++ goto done; ++ } ++ } ++ ++done: ++ SAFE_FREE(types); ++ talloc_free(tmp_ctx); ++ return code; ++} ++#endif + + /* provide header, function is exported but there are no public headers */ + +diff --git a/source4/kdc/mit_samba.h b/source4/kdc/mit_samba.h +index 4431e82a1b2..f34fb1bbfd5 100644 +--- a/source4/kdc/mit_samba.h ++++ b/source4/kdc/mit_samba.h +@@ -51,7 +51,7 @@ int mit_samba_get_pac(struct mit_samba_context *smb_ctx, + krb5_context context, + krb5_db_entry *client, + krb5_db_entry *server, +- krb5_keyblock *client_key, ++ krb5_keyblock *replaced_reply_key, + krb5_pac *pac); + + krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx, +@@ -64,6 +64,15 @@ krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx, + krb5_keyblock *krbtgt_keyblock, + krb5_pac *pac); + ++krb5_error_code mit_samba_update_pac(struct mit_samba_context *ctx, ++ krb5_context context, ++ int flags, ++ krb5_db_entry *client, ++ krb5_db_entry *server, ++ krb5_db_entry *signing_krbtgt, ++ krb5_pac old_pac, ++ krb5_pac new_pac); ++ + int mit_samba_check_client_access(struct mit_samba_context *ctx, + krb5_db_entry *client, + const char *client_name, +diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py +index 3af8e92d7f2..f451ad1cec2 100755 +--- a/source4/selftest/tests.py ++++ b/source4/selftest/tests.py +@@ -963,7 +963,12 @@ for env in ['fileserver_smb1', 'nt4_member', 'clusteredmember', 'ktest', 'nt4_dc + have_fast_support = 1 + claims_support = 0 + compound_id_support = 0 +-tkt_sig_support = int('SAMBA4_USES_HEIMDAL' in config_hash) ++if ('SAMBA4_USES_HEIMDAL' in config_hash or ++ 'HAVE_MIT_KRB5_1_20' in config_hash): ++ tkt_sig_support = 1 ++else: ++ tkt_sig_support = 0 ++ + expect_pac = int('SAMBA4_USES_HEIMDAL' in config_hash) + extra_pac_buffers = int('SAMBA4_USES_HEIMDAL' in config_hash) + check_cname = int('SAMBA4_USES_HEIMDAL' in config_hash) +diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5 +index efdbced6e78..b0640654260 100644 +--- a/wscript_configure_system_mitkrb5 ++++ b/wscript_configure_system_mitkrb5 +@@ -98,6 +98,10 @@ if conf.env.KRB5_CONFIG: + else: + Logs.info('MIT Kerberos %s detected, MIT krb5 build can proceed' % (krb5_version)) + ++ if parse_version(krb5_version) < parse_version('1.20'): ++ conf.DEFINE('HAVE_MIT_KRB5_PRE_1_20', 1) ++ if parse_version(krb5_version) >= parse_version('1.20'): ++ conf.DEFINE('HAVE_MIT_KRB5_1_20', 1) + conf.define('USING_SYSTEM_MITKRB5', '"%s"' % krb5_version) + + conf.CHECK_HEADERS('krb5.h krb5/locate_plugin.h', lib='krb5') +-- +2.37.1 + diff --git a/net/samba416/files/README.FreeBSD.in b/net/samba416/files/README.FreeBSD.in new file mode 100644 index 000000000000..9ab4faaeef80 --- /dev/null +++ b/net/samba416/files/README.FreeBSD.in @@ -0,0 +1,94 @@ + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !!! Please read before runing any tools !!! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Documentation +============= + + o https://wiki.samba.org/index.php/Samba4/HOWTO + + o https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO + + o https://wiki.samba.org/index.php/Samba4/samba-tool/domain/classicupgrade/HOWTO + +FreeBSD specific information +============================ + +* Your configuration is in: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%% + +* All the logs are under: %%SAMBA4_LOGDIR%% + +* All the relevant databases are under: %%SAMBA4_LOCKDIR%% + +* Provisioning script is: %%PREFIX%%/bin/samba-tool + +Samba4 provisioning requires file system(s) with the ACLs support. On +UFS2 you need to enable POSIX ACLs by adding 'acls' option to the mount +flags, on ZFS you need to use NFSv4 ACLs and `zfsacl` VFS module to get +provisioning work. + +There is a hack in the code, that makes provisioning work on UFS2 and in +the jails on the price of using USER extattr(2) namespace, which is less +secure than SYSTEM namespace, as can be edited not only by root user, but +also by the owner of the file. + +For the provisioning on ZFS you need to use additional parameters to the +samba-tool, that would explicitly add `zfsacl` to the default `vfs objects`: + + # samba-tool domain provision --interactive \ + --option="vfs objects"="dfs_samba4 zfsacl" + +To run this port you need to perform the following steps: +--------------------------------------------------------- + +0. If you had Samba3 port installed before, please, *take backups* of +all the relevant files. That includes 'smb.conf' file and all the +content of the '/var/db/samba/' directory. + +1a. Create new '%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%' file by running: + + # samba-tool domain provision + +1b. Or upgrade from the Samba3 'smb.conf' file by running: + + # samba-tool domain classicupgrade + +%%AC_DC%%1c. You will need to specify location of the 'nsupdate' command in the +%%AC_DC%%'%%SAMBA4_CONFIG%%' file: +%%AC_DC%% +%%AC_DC%% nsupdate command = %%PREFIX%%/bin/samba-nsupdate -g +%%AC_DC%% +2. Put string 'samba_server_enable="YES"' into your /etc/rc.conf. + +3. Make sure that your server doesn't run Samba3, OpenLDAP and named. +Stop them, if necessary. + +4. Run '%%PREFIX%%/etc/rc.d/samba_server start' or reboot. + +Please, check archives of samba@lists.samba.org and ask there for help, +if necessary: + + https://lists.samba.org/archive/samba/ + +Port related bugs can be reported to the FreeBSD Bugzilla or directly to: + + https://gitlab.com/samba-freebsd/ports/-/issues + +In case you found a bug which is clearly not related to the port build +process itself, plese file a bug report at: + + https://bugzilla.samba.org/ + +And add me to CC list. + +You may find those tools helpful: +--------------------------------- + +Microsoft Remote Server Administration Tools (RSAT) for: + +* Vista: http://www.microsoft.com/en-us/download/details.aspx?id=21090 +* Windows 7: http://www.microsoft.com/en-us/download/details.aspx?id=7887 + + +FreeBSD Samba4 port maintainer: Timur I. Bakeyev diff --git a/net/samba416/files/man/ctdb-script.options.5 b/net/samba416/files/man/ctdb-script.options.5 new file mode 100644 index 000000000000..e58b2fd99163 --- /dev/null +++ b/net/samba416/files/man/ctdb-script.options.5 @@ -0,0 +1,558 @@ +'\" t +.\" Title: ctdb-script.options +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB\-SCRIPT\&.OPTIO" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb-script.options \- CTDB scripts configuration files +.SH "DESCRIPTION" +.PP +Each CTDB script has 2 possible locations for its configuration options: +.PP +/usr/local/etc/ctdb/script\&.options +.RS 4 +This is a catch\-all global file for general purpose scripts and for options that are used in multiple event scripts\&. +.RE +.PP +\fISCRIPT\fR\&.options +.RS 4 +That is, options for +\fISCRIPT\fR +are placed in a file alongside the script, with a "\&.script" suffix added\&. This style is usually recommended for event scripts\&. +.sp +Options in this script\-specific file override those in the global file\&. +.RE +.PP +These files should include simple shell\-style variable assignments and shell\-style comments\&. +.SH "NETWORK CONFIGURATION" +.SS "10\&.interface" +.PP +This event script handles monitoring of interfaces using by public IP addresses\&. +.PP +CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no +.RS 4 +Whether one or more offline interfaces should cause a monitor event to fail if there are other interfaces that are up\&. If this is "yes" and a node has some interfaces that are down then +\fBctdb status\fR +will display the node as "PARTIALLYONLINE"\&. +.sp +Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is not generally compatible with NAT gateway or LVS\&. NAT gateway relies on the interface configured by CTDB_NATGW_PUBLIC_IFACE to be up and LVS replies on CTDB_LVS_PUBLIC_IFACE to be up\&. CTDB does not check if these options are set in an incompatible way so care is needed to understand the interaction\&. +.sp +Default is "no"\&. +.RE +.SS "11\&.natgw" +.PP +Provides CTDB\*(Aqs NAT gateway functionality\&. +.PP +NAT gateway is used to configure fallback routing for nodes when they do not host any public IP addresses\&. For example, it allows unhealthy nodes to reliably communicate with external infrastructure\&. One node in a NAT gateway group will be designated as the NAT gateway master node and other (slave) nodes will be configured with fallback routes via the NAT gateway master node\&. For more information, see the +NAT GATEWAY +section in +\fBctdb\fR(7)\&. +.PP +CTDB_NATGW_DEFAULT_GATEWAY=\fIIPADDR\fR +.RS 4 +IPADDR is an alternate network gateway to use on the NAT gateway master node\&. If set, a fallback default route is added via this network gateway\&. +.sp +No default\&. Setting this variable is optional \- if not set that no route is created on the NAT gateway master node\&. +.RE +.PP +CTDB_NATGW_NODES=\fIFILENAME\fR +.RS 4 +FILENAME contains the list of nodes that belong to the same NAT gateway group\&. +.sp +File format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIIPADDR\fR [slave\-only] + +.fi +.if n \{\ +.RE +.\} +.sp +IPADDR is the private IP address of each node in the NAT gateway group\&. +.sp +If "slave\-only" is specified then the corresponding node can not be the NAT gateway master node\&. In this case +\fICTDB_NATGW_PUBLIC_IFACE\fR +and +\fICTDB_NATGW_PUBLIC_IP\fR +are optional and unused\&. +.sp +No default, usually +/usr/local/etc/ctdb/natgw_nodes +when enabled\&. +.RE +.PP +CTDB_NATGW_PRIVATE_NETWORK=\fIIPADDR/MASK\fR +.RS 4 +IPADDR/MASK is the private sub\-network that is internally routed via the NAT gateway master node\&. This is usually the private network that is used for node addresses\&. +.sp +No default\&. +.RE +.PP +CTDB_NATGW_PUBLIC_IFACE=\fIIFACE\fR +.RS 4 +IFACE is the network interface on which the CTDB_NATGW_PUBLIC_IP will be configured\&. +.sp +No default\&. +.RE +.PP +CTDB_NATGW_PUBLIC_IP=\fIIPADDR/MASK\fR +.RS 4 +IPADDR/MASK indicates the IP address that is used for outgoing traffic (originating from CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master node\&. This +\fImust not\fR +be a configured public IP address\&. +.sp +No default\&. +.RE +.PP +CTDB_NATGW_STATIC_ROUTES=\fIIPADDR/MASK[@GATEWAY]\fR \&.\&.\&. +.RS 4 +Each IPADDR/MASK identifies a network or host to which NATGW should create a fallback route, instead of creating a single default route\&. This can be used when there is already a default route, via an interface that can not reach required infrastructure, that overrides the NAT gateway default route\&. +.sp +If GATEWAY is specified then the corresponding route on the NATGW master node will be via GATEWAY\&. Such routes are created even if +\fICTDB_NATGW_DEFAULT_GATEWAY\fR +is not specified\&. If GATEWAY is not specified for some networks then routes are only created on the NATGW master node for those networks if +\fICTDB_NATGW_DEFAULT_GATEWAY\fR +is specified\&. +.sp +This should be used with care to avoid causing traffic to unnecessarily double\-hop through the NAT gateway master, even when a node is hosting public IP addresses\&. Each specified network or host should probably have a corresponding automatically created link route or static route to avoid this\&. +.sp +No default\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes +CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24 +CTDB_NATGW_DEFAULT_GATEWAY=10\&.0\&.0\&.1 +CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24 +CTDB_NATGW_PUBLIC_IFACE=eth0 + +.fi +.if n \{\ +.RE +.\} +.PP +A variation that ensures that infrastructure (ADS, DNS, \&.\&.\&.) directly attached to the public network (10\&.0\&.0\&.0/24) is always reachable would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes +CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24 +CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24 +CTDB_NATGW_PUBLIC_IFACE=eth0 +CTDB_NATGW_STATIC_ROUTES=10\&.0\&.0\&.0/24 + +.fi +.if n \{\ +.RE +.\} +.PP +Note that +\fICTDB_NATGW_DEFAULT_GATEWAY\fR +is not specified\&. +.RE +.SS "13\&.per_ip_routing" +.PP +Provides CTDB\*(Aqs policy routing functionality\&. +.PP +A node running CTDB may be a component of a complex network topology\&. In particular, public addresses may be spread across several different networks (or VLANs) and it may not be possible to route packets from these public addresses via the system\*(Aqs default route\&. Therefore, CTDB has support for policy routing via the +13\&.per_ip_routing +eventscript\&. This allows routing to be specified for packets sourced from each public address\&. The routes are added and removed as CTDB moves public addresses between nodes\&. +.PP +For more information, see the +POLICY ROUTING +section in +\fBctdb\fR(7)\&. +.PP +CTDB_PER_IP_ROUTING_CONF=\fIFILENAME\fR +.RS 4 +FILENAME contains elements for constructing the desired routes for each source address\&. +.sp +The special FILENAME value +\fB__auto_link_local__\fR +indicates that no configuration file is provided and that CTDB should generate reasonable link\-local routes for each public IP address\&. +.sp +File format: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \fIIPADDR\fR \fIDEST\-IPADDR/MASK\fR [\fIGATEWAY\-IPADDR\fR] + +.fi +.if n \{\ +.RE +.\} +.sp +No default, usually +/usr/local/etc/ctdb/policy_routing +when enabled\&. +.RE +.PP +CTDB_PER_IP_ROUTING_RULE_PREF=\fINUM\fR +.RS 4 +NUM sets the priority (or preference) for the routing rules that are added by CTDB\&. +.sp +This should be (strictly) greater than 0 and (strictly) less than 32766\&. A priority of 100 is recommended, unless this conflicts with a priority already in use on the system\&. See +\fBip\fR(8), for more details\&. +.RE +.PP +CTDB_PER_IP_ROUTING_TABLE_ID_LOW=\fILOW\-NUM\fR, CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=\fIHIGH\-NUM\fR +.RS 4 +CTDB determines a unique routing table number to use for the routing related to each public address\&. LOW\-NUM and HIGH\-NUM indicate the minimum and maximum routing table numbers that are used\&. +.sp +\fBip\fR(8) +uses some reserved routing table numbers below 255\&. Therefore, CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly) greater than 255\&. +.sp +CTDB uses the standard file +/etc/iproute2/rt_tables +to maintain a mapping between the routing table numbers and labels\&. The label for a public address +\fIADDR\fR +will look like ctdb\&.\fIaddr\fR\&. This means that the associated rules and routes are easy to read (and manipulate)\&. +.sp +No default, usually 1000 and 9000\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing +CTDB_PER_IP_ROUTING_RULE_PREF=100 +CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000 +CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "91\&.lvs" +.PP +Provides CTDB\*(Aqs LVS functionality\&. +.PP +For a general description see the +LVS +section in +\fBctdb\fR(7)\&. +.PP +CTDB_LVS_NODES=\fIFILENAME\fR +.RS 4 +FILENAME contains the list of nodes that belong to the same LVS group\&. +.sp +File format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIIPADDR\fR [slave\-only] + +.fi +.if n \{\ +.RE +.\} +.sp +IPADDR is the private IP address of each node in the LVS group\&. +.sp +If "slave\-only" is specified then the corresponding node can not be the LVS master node\&. In this case +\fICTDB_LVS_PUBLIC_IFACE\fR +and +\fICTDB_LVS_PUBLIC_IP\fR +are optional and unused\&. +.sp +No default, usually +/usr/local/etc/ctdb/lvs_nodes +when enabled\&. +.RE +.PP +CTDB_LVS_PUBLIC_IFACE=\fIINTERFACE\fR +.RS 4 +INTERFACE is the network interface that clients will use to connection to +\fICTDB_LVS_PUBLIC_IP\fR\&. This is optional for slave\-only nodes\&. No default\&. +.RE +.PP +CTDB_LVS_PUBLIC_IP=\fIIPADDR\fR +.RS 4 +CTDB_LVS_PUBLIC_IP is the LVS public address\&. No default\&. +.RE +.SH "SERVICE CONFIGURATION" +.PP +CTDB can be configured to manage and/or monitor various NAS (and other) services via its eventscripts\&. +.PP +In the simplest case CTDB will manage a service\&. This means the service will be started and stopped along with CTDB, CTDB will monitor the service and CTDB will do any required reconfiguration of the service when public IP addresses are failed over\&. +.SS "20\&.multipathd" +.PP +Provides CTDB\*(Aqs Linux multipathd service management\&. +.PP +It can monitor multipath devices to ensure that active paths are available\&. +.PP +CTDB_MONITOR_MPDEVICES=\fIMP\-DEVICE\-LIST\fR +.RS 4 +MP\-DEVICE\-LIST is a list of multipath devices for CTDB to monitor? +.sp +No default\&. +.RE +.SS "31\&.clamd" +.PP +This event script provide CTDB\*(Aqs ClamAV anti\-virus service management\&. +.PP +This eventscript is not enabled by default\&. Use +\fBctdb enablescript\fR +to enable it\&. +.PP +CTDB_CLAMD_SOCKET=\fIFILENAME\fR +.RS 4 +FILENAME is the socket to monitor ClamAV\&. +.sp +No default\&. +.RE +.SS "49\&.winbind" +.PP +Provides CTDB\*(Aqs Samba winbind service management\&. +.PP +CTDB_SERVICE_WINBIND=\fISERVICE\fR +.RS 4 +Distribution specific SERVICE for managing winbindd\&. +.sp +Default is "winbind"\&. +.RE +.SS "50\&.samba" +.PP +Provides the core of CTDB\*(Aqs Samba file service management\&. +.PP +CTDB_SAMBA_CHECK_PORTS=\fIPORT\-LIST\fR +.RS 4 +When monitoring Samba, check TCP ports in space\-separated PORT\-LIST\&. +.sp +Default is to monitor ports that Samba is configured to listen on\&. +.RE +.PP +CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no +.RS 4 +As part of monitoring, should CTDB skip the check for the existence of each directory configured as share in Samba\&. This may be desirable if there is a large number of shares\&. +.sp +Default is no\&. +.RE +.PP +CTDB_SERVICE_NMB=\fISERVICE\fR +.RS 4 +Distribution specific SERVICE for managing nmbd\&. +.sp +Default is distribution\-dependant\&. +.RE +.PP +CTDB_SERVICE_SMB=\fISERVICE\fR +.RS 4 +Distribution specific SERVICE for managing smbd\&. +.sp +Default is distribution\-dependant\&. +.RE +.SS "60\&.nfs" +.PP +This event script (along with 06\&.nfs) provides CTDB\*(Aqs NFS service management\&. +.PP +This includes parameters for the kernel NFS server\&. Alternative NFS subsystems (such as +\m[blue]\fBNFS\-Ganesha\fR\m[]\&\s-2\u[1]\d\s+2) can be integrated using +\fICTDB_NFS_CALLOUT\fR\&. +.PP +CTDB_NFS_CALLOUT=\fICOMMAND\fR +.RS 4 +COMMAND specifies the path to a callout to handle interactions with the configured NFS system, including startup, shutdown, monitoring\&. +.sp +Default is the included +\fBnfs\-linux\-kernel\-callout\fR\&. +.RE +.PP +CTDB_NFS_CHECKS_DIR=\fIDIRECTORY\fR +.RS 4 +Specifies the path to a DIRECTORY containing files that describe how to monitor the responsiveness of NFS RPC services\&. See the README file for this directory for an explanation of the contents of these "check" files\&. +.sp +CTDB_NFS_CHECKS_DIR can be used to point to different sets of checks for different NFS servers\&. +.sp +One way of using this is to have it point to, say, +/usr/local/etc/ctdb/nfs\-checks\-enabled\&.d +and populate it with symbolic links to the desired check files\&. This avoids duplication and is upgrade\-safe\&. +.sp +Default is +/usr/local/etc/ctdb/nfs\-checks\&.d, which contains NFS RPC checks suitable for Linux kernel NFS\&. +.RE +.PP +CTDB_NFS_SKIP_SHARE_CHECK=yes|no +.RS 4 +As part of monitoring, should CTDB skip the check for the existence of each directory exported via NFS\&. This may be desirable if there is a large number of exports\&. +.sp +Default is no\&. +.RE +.PP +CTDB_RPCINFO_LOCALHOST=\fIIPADDR\fR|\fIHOSTNAME\fR +.RS 4 +IPADDR or HOSTNAME indicates the address that +\fBrpcinfo\fR +should connect to when doing +\fBrpcinfo\fR +check on IPv4 RPC service during monitoring\&. Optimally this would be "localhost"\&. However, this can add some performance overheads\&. +.sp +Default is "127\&.0\&.0\&.1"\&. +.RE +.PP +CTDB_RPCINFO_LOCALHOST6=\fIIPADDR\fR|\fIHOSTNAME\fR +.RS 4 +IPADDR or HOSTNAME indicates the address that +\fBrpcinfo\fR +should connect to when doing +\fBrpcinfo\fR +check on IPv6 RPC service during monitoring\&. Optimally this would be "localhost6" (or similar)\&. However, this can add some performance overheads\&. +.sp +Default is "::1"\&. +.RE +.PP +CTDB_NFS_STATE_FS_TYPE=\fITYPE\fR +.RS 4 +The type of filesystem used for a clustered NFS\*(Aq shared state\&. No default\&. +.RE +.PP +CTDB_NFS_STATE_MNT=\fIDIR\fR +.RS 4 +The directory where a clustered NFS\*(Aq shared state will be located\&. No default\&. +.RE +.SS "70\&.iscsi" +.PP +Provides CTDB\*(Aqs Linux iSCSI tgtd service management\&. +.PP +CTDB_START_ISCSI_SCRIPTS=\fIDIRECTORY\fR +.RS 4 +DIRECTORY on shared storage containing scripts to start tgtd for each public IP address\&. +.sp +No default\&. +.RE +.SH "DATABASE SETUP" +.PP +CTDB checks the consistency of databases during startup\&. +.SS "00\&.ctdb" +.PP +CTDB_MAX_CORRUPT_DB_BACKUPS=\fINUM\fR +.RS 4 +NUM is the maximum number of volatile TDB database backups to be kept (for each database) when a corrupt database is found during startup\&. Volatile TDBs are zeroed during startup so backups are needed to debug any corruption that occurs before a restart\&. +.sp +Default is 10\&. +.RE +.SH "SYSTEM RESOURCE MONITORING" +.SS "05\&.system" +.PP +Provides CTDB\*(Aqs filesystem and memory usage monitoring\&. +.PP +CTDB can experience seemingly random (performance and other) issues if system resources become too constrained\&. Options in this section can be enabled to allow certain system resources to be checked\&. They allows warnings to be logged and nodes to be marked unhealthy when system resource usage reaches the configured thresholds\&. +.PP +Some checks are enabled by default\&. It is recommended that these checks remain enabled or are augmented by extra checks\&. There is no supported way of completely disabling the checks\&. +.PP +CTDB_MONITOR_FILESYSTEM_USAGE=\fIFS\-LIMIT\-LIST\fR +.RS 4 +FS\-LIMIT\-LIST is a space\-separated list of +\fIFILESYSTEM\fR:\fIWARN_LIMIT\fR[:\fIUNHEALTHY_LIMIT\fR] +triples indicating that warnings should be logged if the space used on FILESYSTEM reaches WARN_LIMIT%\&. If usage reaches UNHEALTHY_LIMIT then the node should be flagged unhealthy\&. Either WARN_LIMIT or UNHEALTHY_LIMIT may be left blank, meaning that check will be omitted\&. +.sp +Default is to warn for each filesystem containing a database directory (volatile\ \&database\ \&directory, +persistent\ \&database\ \&directory, +state\ \&database\ \&directory) with a threshold of 90%\&. +.RE +.PP +CTDB_MONITOR_MEMORY_USAGE=\fIMEM\-LIMITS\fR +.RS 4 +MEM\-LIMITS takes the form +\fIWARN_LIMIT\fR[:\fIUNHEALTHY_LIMIT\fR] +indicating that warnings should be logged if memory usage reaches WARN_LIMIT%\&. If usage reaches UNHEALTHY_LIMIT then the node should be flagged unhealthy\&. Either WARN_LIMIT or UNHEALTHY_LIMIT may be left blank, meaning that check will be omitted\&. +.sp +Default is 80, so warnings will be logged when memory usage reaches 80%\&. +.RE +.SH "EVENT SCRIPT DEBUGGING" +.SS "debug\-hung\-script\&.sh" +.PP +CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=\fIREGEXP\fR +.RS 4 +REGEXP specifies interesting processes for which stack traces should be logged when debugging hung eventscripts and those processes are matched in pstree output\&. REGEXP is an extended regexp so choices are separated by pipes (\*(Aq|\*(Aq)\&. However, REGEXP should not contain parentheses\&. See also the +\fBctdb.conf\fR(5) +[event] "debug\ \&script" option\&. +.sp +Default is "exportfs|rpcinfo"\&. +.RE +.SH "FILES" +.RS 4 +/usr/local/etc/ctdb/script\&.options +.RE +.SH "SEE ALSO" +.PP +\fBctdbd\fR(1), +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp +.SH "NOTES" +.IP " 1." 4 +NFS-Ganesha +.RS 4 +\%https://github.com/nfs-ganesha/nfs-ganesha/wiki +.RE diff --git a/net/samba416/files/man/ctdb-statistics.7 b/net/samba416/files/man/ctdb-statistics.7 new file mode 100644 index 000000000000..a70061f0298b --- /dev/null +++ b/net/samba416/files/man/ctdb-statistics.7 @@ -0,0 +1,550 @@ +'\" t +.\" Title: ctdb-statistics +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB\-STATISTICS" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb-statistics \- CTDB statistics output +.SH "OVERALL STATISTICS" +.PP +CTDB maintains information about various messages communicated and some of the important operations per node\&. See the +\fBctdb\fR(1) +commands +\fBstatistics\fR +and +\fBstatisticsreset\fR +for displaying statistics\&. +.SS "Example: ctdb statistics" +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB version 1 +Current time of statistics : Fri Sep 12 13:32:32 2014 +Statistics collected since : (000 01:49:20) Fri Sep 12 11:43:12 2014 + num_clients 6 + frozen 0 + recovering 0 + num_recoveries 2 + client_packets_sent 281293 + client_packets_recv 296317 + node_packets_sent 452387 + node_packets_recv 182394 + keepalive_packets_sent 3927 + keepalive_packets_recv 3928 + node + req_call 48605 + reply_call 1 + req_dmaster 23404 + reply_dmaster 24917 + reply_error 0 + req_message 958 + req_control 197513 + reply_control 153705 + client + req_call 130866 + req_message 770 + req_control 168921 + timeouts + call 0 + control 0 + traverse 0 + locks + num_calls 220 + num_current 0 + num_pending 0 + num_failed 0 + total_calls 130866 + pending_calls 0 + childwrite_calls 1 + pending_childwrite_calls 0 + memory_used 334490 + max_hop_count 18 + total_ro_delegations 2 + total_ro_revokes 2 + hop_count_buckets: 42816 5464 26 1 0 0 0 0 0 0 0 0 0 0 0 0 + lock_buckets: 9 165 14 15 7 2 2 0 0 0 0 0 0 0 0 0 + locks_latency MIN/AVG/MAX 0\&.000685/0\&.160302/6\&.369342 sec out of 214 + reclock_ctdbd MIN/AVG/MAX 0\&.004940/0\&.004969/0\&.004998 sec out of 2 + reclock_recd MIN/AVG/MAX 0\&.000000/0\&.000000/0\&.000000 sec out of 0 + call_latency MIN/AVG/MAX 0\&.000006/0\&.000719/4\&.562991 sec out of 126626 + childwrite_latency MIN/AVG/MAX 0\&.014527/0\&.014527/0\&.014527 sec out of 1 + +.fi +.if n \{\ +.RE +.\} +.SS "CTDB version" +.PP +Version of the ctdb protocol used by the node\&. +.SS "Current time of statistics" +.PP +Time when the statistics are generated\&. +.PP +This is useful when collecting statistics output periodically for post\-processing\&. +.SS "Statistics collected since" +.PP +Time when ctdb was started or the last time statistics was reset\&. The output shows the duration and the timestamp\&. +.SS "num_clients" +.PP +Number of processes currently connected to CTDB\*(Aqs unix socket\&. This includes recovery daemon, ctdb tool and samba processes (smbd, winbindd)\&. +.SS "frozen" +.PP +1 if the databases are currently frozen, 0 otherwise\&. +.SS "recovering" +.PP +1 if recovery is active, 0 otherwise\&. +.SS "num_recoveries" +.PP +Number of recoveries since the start of ctdb or since the last statistics reset\&. +.SS "client_packets_sent" +.PP +Number of packets sent to client processes via unix domain socket\&. +.SS "client_packets_recv" +.PP +Number of packets received from client processes via unix domain socket\&. +.SS "node_packets_sent" +.PP +Number of packets sent to the other nodes in the cluster via TCP\&. +.SS "node_packets_recv" +.PP +Number of packets received from the other nodes in the cluster via TCP\&. +.SS "keepalive_packets_sent" +.PP +Number of keepalive messages sent to other nodes\&. +.PP +CTDB periodically sends keepalive messages to other nodes\&. See +KeepaliveInterval +tunable in +\fBctdb-tunables\fR(7) +for more details\&. +.SS "keepalive_packets_recv" +.PP +Number of keepalive messages received from other nodes\&. +.SS "node" +.PP +This section lists various types of messages processed which originated from other nodes via TCP\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_call\fR +.RS 4 +.PP +Number of REQ_CALL messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreply_call\fR +.RS 4 +.PP +Number of REPLY_CALL messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_dmaster\fR +.RS 4 +.PP +Number of REQ_DMASTER messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreply_dmaster\fR +.RS 4 +.PP +Number of REPLY_DMASTER messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreply_error\fR +.RS 4 +.PP +Number of REPLY_ERROR messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_message\fR +.RS 4 +.PP +Number of REQ_MESSAGE messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_control\fR +.RS 4 +.PP +Number of REQ_CONTROL messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreply_control\fR +.RS 4 +.PP +Number of REPLY_CONTROL messages from the other nodes\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_tunnel\fR +.RS 4 +.PP +Number of REQ_TUNNEL messages from the other nodes\&. +.RE +.SS "client" +.PP +This section lists various types of messages processed which originated from clients via unix domain socket\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_call\fR +.RS 4 +.PP +Number of REQ_CALL messages from the clients\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_message\fR +.RS 4 +.PP +Number of REQ_MESSAGE messages from the clients\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_control\fR +.RS 4 +.PP +Number of REQ_CONTROL messages from the clients\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBreq_tunnel\fR +.RS 4 +.PP +Number of REQ_TUNNEL messages from the clients\&. +.RE +.SS "timeouts" +.PP +This section lists timeouts occurred when sending various messages\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBcall\fR +.RS 4 +.PP +Number of timeouts for REQ_CALL messages\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBcontrol\fR +.RS 4 +.PP +Number of timeouts for REQ_CONTROL messages\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBtraverse\fR +.RS 4 +.PP +Number of timeouts for database traverse operations\&. +.RE +.SS "locks" +.PP +This section lists locking statistics\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBnum_calls\fR +.RS 4 +.PP +Number of completed lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBnum_current\fR +.RS 4 +.PP +Number of scheduled lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBnum_pending\fR +.RS 4 +.PP +Number of queued lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBnum_failed\fR +.RS 4 +.PP +Number of failed lock calls\&. This includes database locks and record locks\&. +.RE +.SS "total_calls" +.PP +Number of req_call messages processed from clients\&. This number should be same as client \-\-> req_call\&. +.SS "pending_calls" +.PP +Number of req_call messages which are currently being processed\&. This number indicates the number of record migrations in flight\&. +.SS "childwrite_calls" +.PP +Number of record update calls\&. Record update calls are used to update a record under a transaction\&. +.SS "pending_childwrite_calls" +.PP +Number of record update calls currently active\&. +.SS "memory_used" +.PP +The amount of memory in bytes currently used by CTDB using talloc\&. This includes all the memory used for CTDB\*(Aqs internal data structures\&. This does not include the memory mapped TDB databases\&. +.SS "max_hop_count" +.PP +The maximum number of hops required for a record migration request to obtain the record\&. High numbers indicate record contention\&. +.SS "total_ro_delegations" +.PP +Number of readonly delegations created\&. +.SS "total_ro_revokes" +.PP +Number of readonly delegations that were revoked\&. The difference between total_ro_revokes and total_ro_delegations gives the number of currently active readonly delegations\&. +.SS "hop_count_buckets" +.PP +Distribution of migration requests based on hop counts values\&. Buckets are 0, <\ \&2, <\ \&4, <\ \&8, <\ \&16, <\ \&32, <\ \&64, <\ \&128, <\ \&256, <\ \&512, <\ \&1024, <\ \&2048, <\ \&4096, <\ \&8192, <\ \&16384, ≥\ \&16384\&. +.SS "lock_buckets" +.PP +Distribution of record lock requests based on time required to obtain locks\&. Buckets are <\ \&1ms, <\ \&10ms, <\ \&100ms, <\ \&1s, <\ \&2s, <\ \&4s, <\ \&8s, <\ \&16s, <\ \&32s, <\ \&64s, ≥\ \&64s\&. +.SS "locks_latency" +.PP +The minimum, the average and the maximum time (in seconds) required to obtain record locks\&. +.SS "reclock_ctdbd" +.PP +The minimum, the average and the maximum time (in seconds) required to check if recovery lock is still held by recovery daemon when recovery mode is changed\&. This check is done in ctdb daemon\&. +.SS "reclock_recd" +.PP +The minimum, the average and the maximum time (in seconds) required to check if recovery lock is still held by recovery daemon during recovery\&. This check is done in recovery daemon\&. +.SS "call_latency" +.PP +The minimum, the average and the maximum time (in seconds) required to process a REQ_CALL message from client\&. This includes the time required to migrate a record from remote node, if the record is not available on the local node\&. +.SS "childwrite_latency" +.PP +Default: 0 +.PP +The minimum, the average and the maximum time (in seconds) required to update records under a transaction\&. +.SH "DATABASE STATISTICS" +.PP +CTDB maintains per database statistics about important operations\&. See the +\fBctdb\fR(1) +command +\fBdbstatistics\fR +for displaying database statistics\&. +.SS "Example: ctdb dbstatistics notify_index\&.tdb" +.sp +.if n \{\ +.RS 4 +.\} +.nf +DB Statistics: notify_index\&.tdb + ro_delegations 0 + ro_revokes 0 + locks + total 131 + failed 0 + current 0 + pending 0 + hop_count_buckets: 9890 5454 26 1 0 0 0 0 0 0 0 0 0 0 0 0 + lock_buckets: 4 117 10 0 0 0 0 0 0 0 0 0 0 0 0 0 + locks_latency MIN/AVG/MAX 0\&.000683/0\&.004198/0\&.014730 sec out of 131 + Num Hot Keys: 3 + Count:7 Key:2f636c75737465726673 + Count:18 Key:2f636c757374657266732f64617461 + Count:7 Key:2f636c757374657266732f646174612f636c69656e7473 + +.fi +.if n \{\ +.RE +.\} +.SS "DB Statistics" +.PP +Name of the database\&. +.SS "ro_delegations" +.PP +Number of readonly delegations created in the database\&. +.SS "ro_revokes" +.PP +Number of readonly delegations revoked\&. The difference in ro_delegations and ro_revokes indicates the currently active readonly delegations\&. +.SS "locks" +.PP +This section lists locking statistics\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBtotal\fR +.RS 4 +.PP +Number of completed lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBfailed\fR +.RS 4 +.PP +Number of failed lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBcurrent\fR +.RS 4 +.PP +Number of scheduled lock calls\&. This includes database locks and record locks\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBpending\fR +.RS 4 +.PP +Number of queued lock calls\&. This includes database locks and record locks\&. +.RE +.SS "hop_count_buckets" +.PP +Distribution of migration requests based on hop counts values\&. Buckets are 0, <\ \&2, <\ \&4, <\ \&8, <\ \&16, <\ \&32, <\ \&64, <\ \&128, <\ \&256, <\ \&512, <\ \&1024, <\ \&2048, <\ \&4096, <\ \&8192, <\ \&16384, ≥\ \&16384\&. +.SS "lock_buckets" +.PP +Distribution of record lock requests based on time required to obtain locks\&. Buckets are <\ \&1ms, <\ \&10ms, <\ \&100ms, <\ \&1s, <\ \&2s, <\ \&4s, <\ \&8s, <\ \&16s, <\ \&32s, <\ \&64s, ≥\ \&64s\&. +.SS "locks_latency" +.PP +The minimum, the average and the maximum time (in seconds) required to obtain record locks\&. +.SS "Num Hot Keys" +.PP +Number of contended records determined by hop count\&. CTDB keeps track of top 10 hot records and the output shows hex encoded keys for the hot records\&. +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBctdbd\fR(1), +\fBctdb-tunables\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb-tunables.7 b/net/samba416/files/man/ctdb-tunables.7 new file mode 100644 index 000000000000..2de515b975c5 --- /dev/null +++ b/net/samba416/files/man/ctdb-tunables.7 @@ -0,0 +1,406 @@ +'\" t +.\" Title: ctdb-tunables +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB\-TUNABLES" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb-tunables \- CTDB tunable configuration variables +.SH "DESCRIPTION" +.PP +CTDB\*(Aqs behaviour can be configured by setting run\-time tunable variables\&. This lists and describes all tunables\&. See the +\fBctdb\fR(1) +\fBlistvars\fR, +\fBsetvar\fR +and +\fBgetvar\fR +commands for more details\&. +.PP +Unless otherwise stated, tunables should be set to the same value on all nodes\&. Setting tunables to different values across nodes may produce unexpected results\&. Future releases may set (some or most) tunables globally across the cluster but doing so is currently a manual process\&. +.PP +Tunables can be set at startup from the +/usr/local/etc/ctdb/ctdb\&.tunables +configuration file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fITUNABLE\fR=\fIVALUE\fR + +.fi +.if n \{\ +.RE +.\} +.PP +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +MonitorInterval=20 + +.fi +.if n \{\ +.RE +.\} +.PP +The available tunable variables are listed alphabetically below\&. +.SS "AllowClientDBAttach" +.PP +Default: 1 +.PP +When set to 0, clients are not allowed to attach to any databases\&. This can be used to temporarily block any new processes from attaching to and accessing the databases\&. This is mainly used for detaching a volatile database using \*(Aqctdb detach\*(Aq\&. +.SS "AllowMixedVersions" +.PP +Default: 0 +.PP +CTDB will not allow incompatible versions to co\-exist in a cluster\&. If a version mismatch is found, then losing CTDB will shutdown\&. To disable the incompatible version check, set this tunable to 1\&. +.PP +For version checking, CTDB uses major and minor version\&. For example, CTDB 4\&.6\&.1 and CTDB 4\&.6\&.2 are matching versions; CTDB 4\&.5\&.x and CTDB 4\&.6\&.y do not match\&. +.PP +CTDB with version check support will lose to CTDB without version check support\&. Between two different CTDB versions with version check support, one running for less time will lose\&. If the running time for both CTDB versions with version check support is equal (to seconds), then the older version will lose\&. The losing CTDB daemon will shutdown\&. +.SS "AllowUnhealthyDBRead" +.PP +Default: 0 +.PP +When set to 1, ctdb allows database traverses to read unhealthy databases\&. By default, ctdb does not allow reading records from unhealthy databases\&. +.SS "ControlTimeout" +.PP +Default: 60 +.PP +This is the default setting for timeout for when sending a control message to either the local or a remote ctdb daemon\&. +.SS "DatabaseHashSize" +.PP +Default: 100001 +.PP +Number of the hash chains for the local store of the tdbs that ctdb manages\&. +.SS "DatabaseMaxDead" +.PP +Default: 5 +.PP +Maximum number of dead records per hash chain for the tdb databses managed by ctdb\&. +.SS "DBRecordCountWarn" +.PP +Default: 100000 +.PP +When set to non\-zero, ctdb will log a warning during recovery if a database has more than this many records\&. This will produce a warning if a database grows uncontrollably with orphaned records\&. +.SS "DBRecordSizeWarn" +.PP +Default: 10000000 +.PP +When set to non\-zero, ctdb will log a warning during recovery if a single record is bigger than this size\&. This will produce a warning if a database record grows uncontrollably\&. +.SS "DBSizeWarn" +.PP +Default: 1000000000 +.PP +When set to non\-zero, ctdb will log a warning during recovery if a database size is bigger than this\&. This will produce a warning if a database grows uncontrollably\&. +.SS "DeferredAttachTO" +.PP +Default: 120 +.PP +When databases are frozen we do not allow clients to attach to the databases\&. Instead of returning an error immediately to the client, the attach request from the client is deferred until the database becomes available again at which stage we respond to the client\&. +.PP +This timeout controls how long we will defer the request from the client before timing it out and returning an error to the client\&. +.SS "ElectionTimeout" +.PP +Default: 3 +.PP +The number of seconds to wait for the election of recovery master to complete\&. If the election is not completed during this interval, then that round of election fails and ctdb starts a new election\&. +.SS "EnableBans" +.PP +Default: 1 +.PP +This parameter allows ctdb to ban a node if the node is misbehaving\&. +.PP +When set to 0, this disables banning completely in the cluster and thus nodes can not get banned, even it they break\&. Don\*(Aqt set to 0 unless you know what you are doing\&. +.SS "EventScriptTimeout" +.PP +Default: 30 +.PP +Maximum time in seconds to allow an event to run before timing out\&. This is the total time for all enabled scripts that are run for an event, not just a single event script\&. +.PP +Note that timeouts are ignored for some events ("takeip", "releaseip", "startrecovery", "recovered") and converted to success\&. The logic here is that the callers of these events implement their own additional timeout\&. +.SS "FetchCollapse" +.PP +Default: 1 +.PP +This parameter is used to avoid multiple migration requests for the same record from a single node\&. All the record requests for the same record are queued up and processed when the record is migrated to the current node\&. +.PP +When many clients across many nodes try to access the same record at the same time this can lead to a fetch storm where the record becomes very active and bounces between nodes very fast\&. This leads to high CPU utilization of the ctdbd daemon, trying to bounce that record around very fast, and poor performance\&. This can improve performance and reduce CPU utilization for certain workloads\&. +.SS "HopcountMakeSticky" +.PP +Default: 50 +.PP +For database(s) marked STICKY (using \*(Aqctdb setdbsticky\*(Aq), any record that is migrating so fast that hopcount exceeds this limit is marked as STICKY record for +\fIStickyDuration\fR +seconds\&. This means that after each migration the sticky record will be kept on the node +\fIStickyPindown\fRmilliseconds and prevented from being migrated off the node\&. +.PP +This will improve performance for certain workloads, such as locking\&.tdb if many clients are opening/closing the same file concurrently\&. +.SS "IPAllocAlgorithm" +.PP +Default: 2 +.PP +Selects the algorithm that CTDB should use when doing public IP address allocation\&. Meaningful values are: +.PP +0 +.RS 4 +Deterministic IP address allocation\&. +.sp +This is a simple and fast option\&. However, it can cause unnecessary address movement during fail\-over because each address has a "home" node\&. Works badly when some nodes do not have any addresses defined\&. Should be used with care when addresses are defined across multiple networks\&. +.RE +.PP +1 +.RS 4 +Non\-deterministic IP address allocation\&. +.sp +This is a relatively fast option that attempts to do a minimise unnecessary address movements\&. Addresses do not have a "home" node\&. Rebalancing is limited but it usually adequate\&. Works badly when addresses are defined across multiple networks\&. +.RE +.PP +2 +.RS 4 +LCP2 IP address allocation\&. +.sp +Uses a heuristic to assign addresses defined across multiple networks, usually balancing addresses on each network evenly across nodes\&. Addresses do not have a "home" node\&. Minimises unnecessary address movements\&. The algorithm is complex, so is slower than other choices for a large number of addresses\&. However, it can calculate an optimal assignment of 900 addresses in under 10 seconds on modern hardware\&. +.RE +.PP +If the specified value is not one of these then the default will be used\&. +.SS "KeepaliveInterval" +.PP +Default: 5 +.PP +How often in seconds should the nodes send keep\-alive packets to each other\&. +.SS "KeepaliveLimit" +.PP +Default: 5 +.PP +After how many keepalive intervals without any traffic should a node wait until marking the peer as DISCONNECTED\&. +.PP +If a node has hung, it can take +\fIKeepaliveInterval\fR +* (\fIKeepaliveLimit\fR ++ 1) seconds before ctdb determines that the node is DISCONNECTED and performs a recovery\&. This limit should not be set too high to enable early detection and avoid any application timeouts (e\&.g\&. SMB1) to kick in before the fail over is completed\&. +.SS "LockProcessesPerDB" +.PP +Default: 200 +.PP +This is the maximum number of lock helper processes ctdb will create for obtaining record locks\&. When ctdb cannot get a record lock without blocking, it creates a helper process that waits for the lock to be obtained\&. +.SS "LogLatencyMs" +.PP +Default: 0 +.PP +When set to non\-zero, ctdb will log if certains operations take longer than this value, in milliseconds, to complete\&. These operations include "process a record request from client", "take a record or database lock", "update a persistent database record" and "vacuum a database"\&. +.SS "MaxQueueDropMsg" +.PP +Default: 1000000 +.PP +This is the maximum number of messages to be queued up for a client before ctdb will treat the client as hung and will terminate the client connection\&. +.SS "MonitorInterval" +.PP +Default: 15 +.PP +How often should ctdb run the \*(Aqmonitor\*(Aq event in seconds to check for a node\*(Aqs health\&. +.SS "MonitorTimeoutCount" +.PP +Default: 20 +.PP +How many \*(Aqmonitor\*(Aq events in a row need to timeout before a node is flagged as UNHEALTHY\&. This setting is useful if scripts can not be written so that they do not hang for benign reasons\&. +.SS "NoIPFailback" +.PP +Default: 0 +.PP +When set to 1, ctdb will not perform failback of IP addresses when a node becomes healthy\&. When a node becomes UNHEALTHY, ctdb WILL perform failover of public IP addresses, but when the node becomes HEALTHY again, ctdb will not fail the addresses back\&. +.PP +Use with caution! Normally when a node becomes available to the cluster ctdb will try to reassign public IP addresses onto the new node as a way to distribute the workload evenly across the clusternode\&. Ctdb tries to make sure that all running nodes have approximately the same number of public addresses it hosts\&. +.PP +When you enable this tunable, ctdb will no longer attempt to rebalance the cluster by failing IP addresses back to the new nodes\&. An unbalanced cluster will therefore remain unbalanced until there is manual intervention from the administrator\&. When this parameter is set, you can manually fail public IP addresses over to the new node(s) using the \*(Aqctdb moveip\*(Aq command\&. +.SS "NoIPTakeover" +.PP +Default: 0 +.PP +When set to 1, ctdb will not allow IP addresses to be failed over to other nodes\&. Any IP addresses already hosted on healthy nodes will remain\&. Any IP addresses hosted on unhealthy nodes will be released by unhealthy nodes and will become un\-hosted\&. +.SS "PullDBPreallocation" +.PP +Default: 10*1024*1024 +.PP +This is the size of a record buffer to pre\-allocate for sending reply to PULLDB control\&. Usually record buffer starts with size of the first record and gets reallocated every time a new record is added to the record buffer\&. For a large number of records, this can be very inefficient to grow the record buffer one record at a time\&. +.SS "QueueBufferSize" +.PP +Default: 1024 +.PP +This is the maximum amount of data (in bytes) ctdb will read from a socket at a time\&. +.PP +For a busy setup, if ctdb is not able to process the TCP sockets fast enough (large amount of data in Recv\-Q for tcp sockets), then this tunable value should be increased\&. However, large values can keep ctdb busy processing packets and prevent ctdb from handling other events\&. +.SS "RecBufferSizeLimit" +.PP +Default: 1000000 +.PP +This is the limit on the size of the record buffer to be sent in various controls\&. This limit is used by new controls used for recovery and controls used in vacuuming\&. +.SS "RecdFailCount" +.PP +Default: 10 +.PP +If the recovery daemon has failed to ping the main daemon for this many consecutive intervals, the main daemon will consider the recovery daemon as hung and will try to restart it to recover\&. +.SS "RecdPingTimeout" +.PP +Default: 60 +.PP +If the main daemon has not heard a "ping" from the recovery daemon for this many seconds, the main daemon will log a message that the recovery daemon is potentially hung\&. This also increments a counter which is checked against +\fIRecdFailCount\fR +for detection of hung recovery daemon\&. +.SS "RecLockLatencyMs" +.PP +Default: 1000 +.PP +When using a reclock file for split brain prevention, if set to non\-zero this tunable will make the recovery daemon log a message if the fcntl() call to lock/testlock the recovery file takes longer than this number of milliseconds\&. +.SS "RecoverInterval" +.PP +Default: 1 +.PP +How frequently in seconds should the recovery daemon perform the consistency checks to determine if it should perform a recovery\&. +.SS "RecoverTimeout" +.PP +Default: 120 +.PP +This is the default setting for timeouts for controls when sent from the recovery daemon\&. We allow longer control timeouts from the recovery daemon than from normal use since the recovery daemon often use controls that can take a lot longer than normal controls\&. +.SS "RecoveryBanPeriod" +.PP +Default: 300 +.PP +The duration in seconds for which a node is banned if the node fails during recovery\&. After this time has elapsed the node will automatically get unbanned and will attempt to rejoin the cluster\&. +.PP +A node usually gets banned due to real problems with the node\&. Don\*(Aqt set this value too small\&. Otherwise, a problematic node will try to re\-join cluster too soon causing unnecessary recoveries\&. +.SS "RecoveryDropAllIPs" +.PP +Default: 120 +.PP +If a node is stuck in recovery, or stopped, or banned, for this many seconds, then ctdb will release all public addresses on that node\&. +.SS "RecoveryGracePeriod" +.PP +Default: 120 +.PP +During recoveries, if a node has not caused recovery failures during the last grace period in seconds, any records of transgressions that the node has caused recovery failures will be forgiven\&. This resets the ban\-counter back to zero for that node\&. +.SS "RepackLimit" +.PP +Default: 10000 +.PP +During vacuuming, if the number of freelist records are more than +\fIRepackLimit\fR, then the database is repacked to get rid of the freelist records to avoid fragmentation\&. +.SS "RerecoveryTimeout" +.PP +Default: 10 +.PP +Once a recovery has completed, no additional recoveries are permitted until this timeout in seconds has expired\&. +.SS "SeqnumInterval" +.PP +Default: 1000 +.PP +Some databases have seqnum tracking enabled, so that samba will be able to detect asynchronously when there has been updates to the database\&. Every time a database is updated its sequence number is increased\&. +.PP +This tunable is used to specify in milliseconds how frequently ctdb will send out updates to remote nodes to inform them that the sequence number is increased\&. +.SS "StatHistoryInterval" +.PP +Default: 1 +.PP +Granularity of the statistics collected in the statistics history\&. This is reported by \*(Aqctdb stats\*(Aq command\&. +.SS "StickyDuration" +.PP +Default: 600 +.PP +Once a record has been marked STICKY, this is the duration in seconds, the record will be flagged as a STICKY record\&. +.SS "StickyPindown" +.PP +Default: 200 +.PP +Once a STICKY record has been migrated onto a node, it will be pinned down on that node for this number of milliseconds\&. Any request from other nodes to migrate the record off the node will be deferred\&. +.SS "TakeoverTimeout" +.PP +Default: 9 +.PP +This is the duration in seconds in which ctdb tries to complete IP failover\&. +.SS "TickleUpdateInterval" +.PP +Default: 20 +.PP +Every +\fITickleUpdateInterval\fR +seconds, ctdb synchronizes the client connection information across nodes\&. +.SS "TraverseTimeout" +.PP +Default: 20 +.PP +This is the duration in seconds for which a database traverse is allowed to run\&. If the traverse does not complete during this interval, ctdb will abort the traverse\&. +.SS "VacuumFastPathCount" +.PP +Default: 60 +.PP +During a vacuuming run, ctdb usually processes only the records marked for deletion also called the fast path vacuuming\&. After finishing +\fIVacuumFastPathCount\fR +number of fast path vacuuming runs, ctdb will trigger a scan of complete database for any empty records that need to be deleted\&. +.SS "VacuumInterval" +.PP +Default: 10 +.PP +Periodic interval in seconds when vacuuming is triggered for volatile databases\&. +.SS "VacuumMaxRunTime" +.PP +Default: 120 +.PP +The maximum time in seconds for which the vacuuming process is allowed to run\&. If vacuuming process takes longer than this value, then the vacuuming process is terminated\&. +.SS "VerboseMemoryNames" +.PP +Default: 0 +.PP +When set to non\-zero, ctdb assigns verbose names for some of the talloc allocated memory objects\&. These names are visible in the talloc memory report generated by \*(Aqctdb dumpmemory\*(Aq\&. +.SH "FILES>" +.RS 4 +/usr/local/etc/ctdb/ctdb\&.tunables +.RE +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBctdbd\fR(1), +\fBctdb.conf\fR(5), +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb.1 b/net/samba416/files/man/ctdb.1 new file mode 100644 index 000000000000..ad254aa4404e --- /dev/null +++ b/net/samba416/files/man/ctdb.1 @@ -0,0 +1,1526 @@ +'\" t +.\" Title: ctdb +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb \- CTDB management utility +.SH "SYNOPSIS" +.HP \w'\fBctdb\fR\ 'u +\fBctdb\fR [\fIOPTION\fR...] {\fICOMMAND\fR} [\fICOMMAND\-ARGS\fR] +.SH "DESCRIPTION" +.PP +ctdb is a utility to view and manage a CTDB cluster\&. +.PP +The following terms are used when referring to nodes in a cluster: +.PP +PNN +.RS 4 +Physical Node Number\&. The physical node number is an integer that describes the node in the cluster\&. The first node has physical node number 0\&. in a cluster\&. +.RE +.PP +PNN\-LIST +.RS 4 +This is either a single PNN, a comma\-separate list of PNNs or "all"\&. +.RE +.PP +Commands that reference a database use the following terms: +.PP +DB +.RS 4 +This is either a database name, such as +locking\&.tdb +or a database ID such as "0x42fe72c5"\&. +.RE +.PP +DB\-LIST +.RS 4 +A space separated list of at least one +\fIDB\fR\&. +.RE +.SH "OPTIONS" +.PP +\-n \fIPNN\fR +.RS 4 +The node specified by PNN should be queried for the requested information\&. Default is to query the daemon running on the local host\&. +.RE +.PP +\-Y +.RS 4 +Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq:\*(Aq\&. Not all commands support this option\&. +.RE +.PP +\-x \fISEPARATOR\fR +.RS 4 +Use SEPARATOR to delimit fields in machine readable output\&. This implies \-Y\&. +.RE +.PP +\-X +.RS 4 +Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq|\*(Aq\&. Not all commands support this option\&. +.sp +This is equivalent to "\-x|" and avoids some shell quoting issues\&. +.RE +.PP +\-t \fITIMEOUT\fR +.RS 4 +Indicates that ctdb should wait up to TIMEOUT seconds for a response to most commands sent to the CTDB daemon\&. The default is 10 seconds\&. +.RE +.PP +\-T \fITIMELIMIT\fR +.RS 4 +Indicates that TIMELIMIT is the maximum run time (in seconds) for the ctdb command\&. When TIMELIMIT is exceeded the ctdb command will terminate with an error\&. The default is 120 seconds\&. +.RE +.PP +\-? \-\-help +.RS 4 +Print some help text to the screen\&. +.RE +.PP +\-\-usage +.RS 4 +Print usage information to the screen\&. +.RE +.PP +\-d \-\-debug=\fIDEBUGLEVEL\fR +.RS 4 +Change the debug level for the command\&. Default is NOTICE\&. +.RE +.SH "ADMINISTRATIVE COMMANDS" +.PP +These are commands used to monitor and administer a CTDB cluster\&. +.SS "pnn" +.PP +This command displays the PNN of the current node\&. +.SS "status" +.PP +This command shows the current status of all CTDB nodes based on information from the queried node\&. +.PP +Note: If the queried node is INACTIVE then the status might not be current\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNode status\fR +.RS 4 +.PP +This includes the number of physical nodes and the status of each node\&. See +\fBctdb\fR(7) +for information about node states\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBGeneration\fR +.RS 4 +.PP +The generation id is a number that indicates the current generation of a cluster instance\&. Each time a cluster goes through a reconfiguration or a recovery its generation id will be changed\&. +.PP +This number does not have any particular meaning other than to keep track of when a cluster has gone through a recovery\&. It is a random number that represents the current instance of a ctdb cluster and its databases\&. The CTDB daemon uses this number internally to be able to tell when commands to operate on the cluster and the databases was issued in a different generation of the cluster, to ensure that commands that operate on the databases will not survive across a cluster database recovery\&. After a recovery, all old outstanding commands will automatically become invalid\&. +.PP +Sometimes this number will be shown as "INVALID"\&. This only means that the ctdbd daemon has started but it has not yet merged with the cluster through a recovery\&. All nodes start with generation "INVALID" and are not assigned a real generation id until they have successfully been merged with a cluster through a recovery\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBVirtual Node Number (VNN) map\fR +.RS 4 +.PP +Consists of the number of virtual nodes and mapping from virtual node numbers to physical node numbers\&. Only nodes that are participating in the VNN map can become lmaster for database records\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBRecovery mode\fR +.RS 4 +.PP +This is the current recovery mode of the cluster\&. There are two possible modes: +.PP +NORMAL \- The cluster is fully operational\&. +.PP +RECOVERY \- The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete\&. A recovery process should finish within seconds\&. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated\&. +.PP +Once the recovery master detects an inconsistency, for example a node becomes disconnected/connected, the recovery daemon will trigger a cluster recovery process, where all databases are remerged across the cluster\&. When this process starts, the recovery master will first "freeze" all databases to prevent applications such as samba from accessing the databases and it will also mark the recovery mode as RECOVERY\&. +.PP +When the CTDB daemon starts up, it will start in RECOVERY mode\&. Once the node has been merged into a cluster and all databases have been recovered, the node mode will change into NORMAL mode and the databases will be "thawed", allowing samba to access the databases again\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBRecovery master\fR +.RS 4 +.PP +This is the cluster node that is currently designated as the recovery master\&. This node is responsible of monitoring the consistency of the cluster and to perform the actual recovery process when reqired\&. +.PP +Only one node at a time can be the designated recovery master\&. Which node is designated the recovery master is decided by an election process in the recovery daemons running on each node\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb status +Number of nodes:4 +pnn:0 192\&.168\&.2\&.200 OK (THIS NODE) +pnn:1 192\&.168\&.2\&.201 OK +pnn:2 192\&.168\&.2\&.202 OK +pnn:3 192\&.168\&.2\&.203 OK +Generation:1362079228 +Size:4 +hash:0 lmaster:0 +hash:1 lmaster:1 +hash:2 lmaster:2 +hash:3 lmaster:3 +Recovery mode:NORMAL (0) +Recovery master:0 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "nodestatus [\fIPNN\-LIST\fR]" +.PP +This command is similar to the +\fBstatus\fR +command\&. It displays the "node status" subset of output\&. The main differences are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The exit code is the bitwise\-OR of the flags for each specified node, while +\fBctdb status\fR +exits with 0 if it was able to retrieve status for all nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBctdb status\fR +provides status information for all nodes\&. +\fBctdb nodestatus\fR +defaults to providing status for only the current node\&. If PNN\-LIST is provided then status is given for the indicated node(s)\&. +.RE +.PP +A common invocation in scripts is +\fBctdb nodestatus all\fR +to check whether all nodes in a cluster are healthy\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb nodestatus +pnn:0 10\&.0\&.0\&.30 OK (THIS NODE) + +# ctdb nodestatus all +Number of nodes:2 +pnn:0 10\&.0\&.0\&.30 OK (THIS NODE) +pnn:1 10\&.0\&.0\&.31 OK + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "recmaster" +.PP +This command shows the pnn of the node which is currently the recmaster\&. +.PP +Note: If the queried node is INACTIVE then the status might not be current\&. +.SS "uptime" +.PP +This command shows the uptime for the ctdb daemon\&. When the last recovery or ip\-failover completed and how long it took\&. If the "duration" is shown as a negative number, this indicates that there is a recovery/failover in progress and it started that many seconds ago\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb uptime +Current time of node : Thu Oct 29 10:38:54 2009 +Ctdbd start time : (000 16:54:28) Wed Oct 28 17:44:26 2009 +Time of last recovery/failover: (000 16:53:31) Wed Oct 28 17:45:23 2009 +Duration of last recovery/failover: 2\&.248552 seconds + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "listnodes" +.PP +This command shows lists the ip addresses of all the nodes in the cluster\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb listnodes +192\&.168\&.2\&.200 +192\&.168\&.2\&.201 +192\&.168\&.2\&.202 +192\&.168\&.2\&.203 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "natgw {master|list|status}" +.PP +This command shows different aspects of NAT gateway status\&. For an overview of CTDB\*(Aqs NAT gateway functionality please see the +NAT GATEWAY +section in +\fBctdb\fR(7)\&. +.PP +master +.RS 4 +Show the PNN and private IP address of the current NAT gateway master node\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +1 192\&.168\&.2\&.201 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +list +.RS 4 +List the private IP addresses of nodes in the current NAT gateway group, annotating the master node\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +192\&.168\&.2\&.200 +192\&.168\&.2\&.201 MASTER +192\&.168\&.2\&.202 +192\&.168\&.2\&.203 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +status +.RS 4 +List the nodes in the current NAT gateway group and their status\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +pnn:0 192\&.168\&.2\&.200 UNHEALTHY (THIS NODE) +pnn:1 192\&.168\&.2\&.201 OK +pnn:2 192\&.168\&.2\&.202 OK +pnn:3 192\&.168\&.2\&.203 OK + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "ping" +.PP +This command will "ping" specified CTDB nodes in the cluster to verify that they are running\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb ping +response from 0 time=0\&.000054 sec (3 clients) + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "ifaces" +.PP +This command will display the list of network interfaces, which could host public addresses, along with their status\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb ifaces +Interfaces on node 0 +name:eth5 link:up references:2 +name:eth4 link:down references:0 +name:eth3 link:up references:1 +name:eth2 link:up references:1 + +# ctdb \-X ifaces +|Name|LinkStatus|References| +|eth5|1|2| +|eth4|0|0| +|eth3|1|1| +|eth2|1|1| + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "ip" +.PP +This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip\&. By default this command will ONLY show those public addresses that are known to the node itself\&. To see the full list of all public ips across the cluster you must use "ctdb ip all"\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb ip \-v +Public IPs on node 0 +172\&.31\&.91\&.82 node[1] active[] available[eth2,eth3] configured[eth2,eth3] +172\&.31\&.91\&.83 node[0] active[eth3] available[eth2,eth3] configured[eth2,eth3] +172\&.31\&.91\&.84 node[1] active[] available[eth2,eth3] configured[eth2,eth3] +172\&.31\&.91\&.85 node[0] active[eth2] available[eth2,eth3] configured[eth2,eth3] +172\&.31\&.92\&.82 node[1] active[] available[eth5] configured[eth4,eth5] +172\&.31\&.92\&.83 node[0] active[eth5] available[eth5] configured[eth4,eth5] +172\&.31\&.92\&.84 node[1] active[] available[eth5] configured[eth4,eth5] +172\&.31\&.92\&.85 node[0] active[eth5] available[eth5] configured[eth4,eth5] + +# ctdb \-X ip \-v +|Public IP|Node|ActiveInterface|AvailableInterfaces|ConfiguredInterfaces| +|172\&.31\&.91\&.82|1||eth2,eth3|eth2,eth3| +|172\&.31\&.91\&.83|0|eth3|eth2,eth3|eth2,eth3| +|172\&.31\&.91\&.84|1||eth2,eth3|eth2,eth3| +|172\&.31\&.91\&.85|0|eth2|eth2,eth3|eth2,eth3| +|172\&.31\&.92\&.82|1||eth5|eth4,eth5| +|172\&.31\&.92\&.83|0|eth5|eth5|eth4,eth5| +|172\&.31\&.92\&.84|1||eth5|eth4,eth5| +|172\&.31\&.92\&.85|0|eth5|eth5|eth4,eth5| + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "ipinfo \fIIP\fR" +.PP +This command will display details about the specified public addresses\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb ipinfo 172\&.31\&.92\&.85 +Public IP[172\&.31\&.92\&.85] info on node 0 +IP:172\&.31\&.92\&.85 +CurrentNode:0 +NumInterfaces:2 +Interface[1]: Name:eth4 Link:down References:0 +Interface[2]: Name:eth5 Link:up References:2 (active) + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "event run|status|script list|script enable|script disable" +.PP +This command is used to control event daemon and to inspect status of various events\&. +.PP +The commands below require a component to be specified\&. In the current version the only valid component is +legacy\&. +.PP +run \fITIMEOUT\fR \fICOMPONENT\fR \fIEVENT\fR [\fIARGUMENTS\fR] +.RS 4 +This command can be used to manually run specified EVENT in COMPONENT with optional ARGUMENTS\&. The event will be allowed to run a maximum of TIMEOUT seconds\&. If TIMEOUT is 0, then there is no time limit for running the event\&. +.RE +.PP +status \fICOMPONENT\fR \fIEVENT\fR +.RS 4 +This command displays the last execution status of the specified EVENT in COMPONENT\&. +.sp +The command will terminate with the exit status corresponding to the overall status of event that is displayed\&. +.sp +The output is the list of event scripts executed\&. Each line shows the name, status, duration and start time for each script\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +00\&.ctdb OK 0\&.014 Sat Dec 17 19:39:11 2016 +01\&.reclock OK 0\&.013 Sat Dec 17 19:39:11 2016 +05\&.system OK 0\&.029 Sat Dec 17 19:39:11 2016 +06\&.nfs OK 0\&.014 Sat Dec 17 19:39:11 2016 +10\&.interface OK 0\&.037 Sat Dec 17 19:39:11 2016 +11\&.natgw OK 0\&.011 Sat Dec 17 19:39:11 2016 +11\&.routing OK 0\&.007 Sat Dec 17 19:39:11 2016 +13\&.per_ip_routing OK 0\&.007 Sat Dec 17 19:39:11 2016 +20\&.multipathd OK 0\&.007 Sat Dec 17 19:39:11 2016 +31\&.clamd OK 0\&.007 Sat Dec 17 19:39:11 2016 +40\&.vsftpd OK 0\&.013 Sat Dec 17 19:39:11 2016 +41\&.httpd OK 0\&.018 Sat Dec 17 19:39:11 2016 +49\&.winbind OK 0\&.023 Sat Dec 17 19:39:11 2016 +50\&.samba OK 0\&.100 Sat Dec 17 19:39:12 2016 +60\&.nfs OK 0\&.376 Sat Dec 17 19:39:12 2016 +70\&.iscsi OK 0\&.009 Sat Dec 17 19:39:12 2016 +91\&.lvs OK 0\&.007 Sat Dec 17 19:39:12 2016 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +script list \fICOMPONENT\fR +.RS 4 +List the available event scripts in COMPONENT\&. Enabled scripts are flagged with a \*(Aq*\*(Aq\&. +.sp +Generally, event scripts are provided by CTDB\&. However, local or 3rd party event scripts may also be available\&. These are shown in a separate section after those provided by CTDB\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +* 00\&.ctdb +* 01\&.reclock +* 05\&.system +* 06\&.nfs +* 10\&.interface + 11\&.natgw + 11\&.routing + 13\&.per_ip_routing + 20\&.multipathd + 31\&.clamd + 40\&.vsftpd + 41\&.httpd +* 49\&.winbind +* 50\&.samba +* 60\&.nfs + 70\&.iscsi + 91\&.lvs + +* 02\&.local + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +script enable \fICOMPONENT\fR \fISCRIPT\fR +.RS 4 +Enable the specified event SCRIPT in COMPONENT\&. Only enabled scripts will be executed when running any event\&. +.RE +.PP +script disable \fICOMPONENT\fR \fISCRIPT\fR +.RS 4 +Disable the specified event SCRIPT in COMPONENT\&. This will prevent the script from executing when running any event\&. +.RE +.SS "scriptstatus" +.PP +This command displays which event scripts where run in the previous monitoring cycle and the result of each script\&. If a script failed with an error, causing the node to become unhealthy, the output from that script is also shown\&. +.PP +This command is deprecated\&. It\*(Aqs provided for backward compatibility\&. In place of +\fBctdb scriptstatus\fR, use +\fBctdb event status\fR\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb scriptstatus +00\&.ctdb OK 0\&.011 Sat Dec 17 19:40:46 2016 +01\&.reclock OK 0\&.010 Sat Dec 17 19:40:46 2016 +05\&.system OK 0\&.030 Sat Dec 17 19:40:46 2016 +06\&.nfs OK 0\&.014 Sat Dec 17 19:40:46 2016 +10\&.interface OK 0\&.041 Sat Dec 17 19:40:46 2016 +11\&.natgw OK 0\&.008 Sat Dec 17 19:40:46 2016 +11\&.routing OK 0\&.007 Sat Dec 17 19:40:46 2016 +13\&.per_ip_routing OK 0\&.007 Sat Dec 17 19:40:46 2016 +20\&.multipathd OK 0\&.007 Sat Dec 17 19:40:46 2016 +31\&.clamd OK 0\&.007 Sat Dec 17 19:40:46 2016 +40\&.vsftpd OK 0\&.013 Sat Dec 17 19:40:46 2016 +41\&.httpd OK 0\&.015 Sat Dec 17 19:40:46 2016 +49\&.winbind OK 0\&.022 Sat Dec 17 19:40:46 2016 +50\&.samba ERROR 0\&.077 Sat Dec 17 19:40:46 2016 + OUTPUT: ERROR: samba tcp port 445 is not responding + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "listvars" +.PP +List all tuneable variables, except the values of the obsolete tunables like VacuumMinInterval\&. The obsolete tunables can be retrieved only explicitly with the "ctdb getvar" command\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb listvars +SeqnumInterval = 1000 +ControlTimeout = 60 +TraverseTimeout = 20 +KeepaliveInterval = 5 +KeepaliveLimit = 5 +RecoverTimeout = 120 +RecoverInterval = 1 +ElectionTimeout = 3 +TakeoverTimeout = 9 +MonitorInterval = 15 +TickleUpdateInterval = 20 +EventScriptTimeout = 30 +MonitorTimeoutCount = 20 +RecoveryGracePeriod = 120 +RecoveryBanPeriod = 300 +DatabaseHashSize = 100001 +DatabaseMaxDead = 5 +RerecoveryTimeout = 10 +EnableBans = 1 +NoIPFailback = 0 +VerboseMemoryNames = 0 +RecdPingTimeout = 60 +RecdFailCount = 10 +LogLatencyMs = 0 +RecLockLatencyMs = 1000 +RecoveryDropAllIPs = 120 +VacuumInterval = 10 +VacuumMaxRunTime = 120 +RepackLimit = 10000 +VacuumFastPathCount = 60 +MaxQueueDropMsg = 1000000 +AllowUnhealthyDBRead = 0 +StatHistoryInterval = 1 +DeferredAttachTO = 120 +AllowClientDBAttach = 1 +RecoverPDBBySeqNum = 1 +DeferredRebalanceOnNodeAdd = 300 +FetchCollapse = 1 +HopcountMakeSticky = 50 +StickyDuration = 600 +StickyPindown = 200 +NoIPTakeover = 0 +DBRecordCountWarn = 100000 +DBRecordSizeWarn = 10000000 +DBSizeWarn = 100000000 +PullDBPreallocation = 10485760 +LockProcessesPerDB = 200 +RecBufferSizeLimit = 1000000 +QueueBufferSize = 1024 +IPAllocAlgorithm = 2 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "getvar \fINAME\fR" +.PP +Get the runtime value of a tuneable variable\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb getvar MonitorInterval +MonitorInterval = 15 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "setvar \fINAME\fR \fIVALUE\fR" +.PP +Set the runtime value of a tuneable variable\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb setvar MonitorInterval 20 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "lvs {master|list|status}" +.PP +This command shows different aspects of LVS status\&. For an overview of CTDB\*(Aqs LVS functionality please see the +LVS +section in +\fBctdb\fR(7)\&. +.PP +master +.RS 4 +Shows the PNN of the current LVS master node\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +2 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +list +.RS 4 +Lists the currently usable LVS nodes\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +2 10\&.0\&.0\&.13 +3 10\&.0\&.0\&.14 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +status +.RS 4 +List the nodes in the current LVS group and their status\&. +.sp +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +pnn:0 10\&.0\&.0\&.11 UNHEALTHY (THIS NODE) +pnn:1 10\&.0\&.0\&.12 UNHEALTHY +pnn:2 10\&.0\&.0\&.13 OK +pnn:3 10\&.0\&.0\&.14 OK + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "getcapabilities" +.PP +This command shows the capabilities of the current node\&. See the +CAPABILITIES +section in +\fBctdb\fR(7) +for more details\&. +.PP +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +RECMASTER: YES +LMASTER: YES + +.fi +.if n \{\ +.RE +.\} +.SS "statistics" +.PP +Collect statistics from the CTDB daemon about how many calls it has served\&. Information about various fields in statistics can be found in +\fBctdb-statistics\fR(7)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb statistics +CTDB version 1 +Current time of statistics : Tue Mar 8 15:18:51 2016 +Statistics collected since : (003 21:31:32) Fri Mar 4 17:47:19 2016 + num_clients 9 + frozen 0 + recovering 0 + num_recoveries 2 + client_packets_sent 8170534 + client_packets_recv 7166132 + node_packets_sent 16549998 + node_packets_recv 5244418 + keepalive_packets_sent 201969 + keepalive_packets_recv 201969 + node + req_call 26 + reply_call 0 + req_dmaster 9 + reply_dmaster 12 + reply_error 0 + req_message 1339231 + req_control 8177506 + reply_control 6831284 + client + req_call 15 + req_message 334809 + req_control 6831308 + timeouts + call 0 + control 0 + traverse 0 + locks + num_calls 8 + num_current 0 + num_pending 0 + num_failed 0 + total_calls 15 + pending_calls 0 + childwrite_calls 0 + pending_childwrite_calls 0 + memory_used 394879 + max_hop_count 1 + total_ro_delegations 0 + total_ro_revokes 0 + hop_count_buckets: 8 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + lock_buckets: 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 + locks_latency MIN/AVG/MAX 0\&.010005/0\&.010418/0\&.011010 sec out of 8 + reclock_ctdbd MIN/AVG/MAX 0\&.002538/0\&.002538/0\&.002538 sec out of 1 + reclock_recd MIN/AVG/MAX 0\&.000000/0\&.000000/0\&.000000 sec out of 0 + call_latency MIN/AVG/MAX 0\&.000044/0\&.002142/0\&.011702 sec out of 15 + childwrite_latency MIN/AVG/MAX 0\&.000000/0\&.000000/0\&.000000 sec out of 0 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "statisticsreset" +.PP +This command is used to clear all statistics counters in a node\&. +.PP +Example: ctdb statisticsreset +.SS "dbstatistics \fIDB\fR" +.PP +Display statistics about the database DB\&. Information about various fields in dbstatistics can be found in +\fBctdb-statistics\fR(7)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb dbstatistics locking\&.tdb +DB Statistics: locking\&.tdb + ro_delegations 0 + ro_revokes 0 + locks + total 14356 + failed 0 + current 0 + pending 0 + hop_count_buckets: 28087 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + lock_buckets: 0 14188 38 76 32 19 3 0 0 0 0 0 0 0 0 0 + locks_latency MIN/AVG/MAX 0\&.001066/0\&.012686/4\&.202292 sec out of 14356 + vacuum_latency MIN/AVG/MAX 0\&.000472/0\&.002207/15\&.243570 sec out of 224530 + Num Hot Keys: 1 + Count:8 Key:ff5bd7cb3ee3822edc1f0000000000000000000000000000 + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "getreclock" +.PP +Show details of the recovery lock, if any\&. +.PP +Example output: +.sp +.if n \{\ +.RS 4 +.\} +.nf + /clusterfs/\&.ctdb/recovery\&.lock + +.fi +.if n \{\ +.RE +.\} +.SS "getdebug" +.PP +Get the current debug level for the node\&. the debug level controls what information is written to the log file\&. +.PP +The debug levels are mapped to the corresponding syslog levels\&. When a debug level is set, only those messages at that level and higher levels will be printed\&. +.PP +The list of debug levels from highest to lowest are : +.PP +ERROR WARNING NOTICE INFO DEBUG +.SS "setdebug \fIDEBUGLEVEL\fR" +.PP +Set the debug level of a node\&. This controls what information will be logged\&. +.PP +The debuglevel is one of ERROR WARNING NOTICE INFO DEBUG +.SS "getpid" +.PP +This command will return the process id of the ctdb daemon\&. +.SS "disable" +.PP +This command is used to administratively disable a node in the cluster\&. A disabled node will still participate in the cluster and host clustered TDB records but its public ip address has been taken over by a different node and it no longer hosts any services\&. +.SS "enable" +.PP +Re\-enable a node that has been administratively disabled\&. +.SS "stop" +.PP +This command is used to administratively STOP a node in the cluster\&. A STOPPED node is connected to the cluster but will not host any public ip addresse, nor does it participate in the VNNMAP\&. The difference between a DISABLED node and a STOPPED node is that a STOPPED node does not host any parts of the database which means that a recovery is required to stop/continue nodes\&. +.SS "continue" +.PP +Re\-start a node that has been administratively stopped\&. +.SS "addip \fIIPADDR\fR/\fImask\fR \fIIFACE\fR" +.PP +This command is used to add a new public ip to a node during runtime\&. It should be followed by a +\fBctdb ipreallocate\fR\&. This allows public addresses to be added to a cluster without having to restart the ctdb daemons\&. +.PP +Note that this only updates the runtime instance of ctdb\&. Any changes will be lost next time ctdb is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&. +.SS "delip \fIIPADDR\fR" +.PP +This command flags IPADDR for deletion from a node at runtime\&. It should be followed by a +\fBctdb ipreallocate\fR\&. If IPADDR is currently hosted by the node it is being removed from, this ensures that the IP will first be failed over to another node, if possible, and that it is then actually removed\&. +.PP +Note that this only updates the runtime instance of CTDB\&. Any changes will be lost next time CTDB is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&. +.SS "moveip \fIIPADDR\fR \fIPNN\fR" +.PP +This command can be used to manually fail a public ip address to a specific node\&. +.PP +In order to manually override the "automatic" distribution of public ip addresses that ctdb normally provides, this command only works when you have changed the tunables for the daemon to: +.PP +IPAllocAlgorithm != 0 +.PP +NoIPFailback = 1 +.SS "shutdown" +.PP +This command will shutdown a specific CTDB daemon\&. +.SS "setlmasterrole on|off" +.PP +This command is used to enable/disable the LMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an LMASTER for records in the database\&. A node that does not have the LMASTER capability will not show up in the vnnmap\&. +.PP +Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&. +.PP +Once this setting has been enabled/disabled, you need to perform a recovery for it to take effect\&. +.PP +See also "ctdb getcapabilities" +.SS "setrecmasterrole on|off" +.PP +This command is used to enable/disable the RECMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an RECMASTER for the cluster\&. A node that does not have the RECMASTER capability can not win a recmaster election\&. A node that already is the recmaster for the cluster when the capability is stripped off the node will remain the recmaster until the next cluster election\&. +.PP +Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&. +.PP +See also "ctdb getcapabilities" +.SS "reloadnodes" +.PP +This command is used when adding new nodes, or removing existing nodes from an existing cluster\&. +.PP +Procedure to add nodes: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +To expand an existing cluster, first ensure with +\fBctdb status\fR +that all nodes are up and running and that they are all healthy\&. Do not try to expand a cluster unless it is completely healthy! +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +On all nodes, edit +/usr/local/etc/ctdb/nodes +and +\fIadd the new nodes at the end of this file\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +Verify that all the nodes have identical +/usr/local/etc/ctdb/nodes +files after adding the new nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +Run +\fBctdb reloadnodes\fR +to force all nodes to reload the nodes file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 5.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 5." 4.2 +.\} +Use +\fBctdb status\fR +on all nodes and verify that they now show the additional nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 6.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 6." 4.2 +.\} +Install and configure the new node and bring it online\&. +.RE +.PP +Procedure to remove nodes: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +To remove nodes from an existing cluster, first ensure with +\fBctdb status\fR +that all nodes, except the node to be deleted, are up and running and that they are all healthy\&. Do not try to remove nodes from a cluster unless the cluster is completely healthy! +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Shutdown and power off the node to be removed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +On all other nodes, edit the +/usr/local/etc/ctdb/nodes +file and +\fIcomment out\fR +the nodes to be removed\&. +\fIDo not delete the lines for the deleted nodes\fR, just comment them out by adding a \*(Aq#\*(Aq at the beginning of the lines\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +Run +\fBctdb reloadnodes\fR +to force all nodes to reload the nodes file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 5.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 5." 4.2 +.\} +Use +\fBctdb status\fR +on all nodes and verify that the deleted nodes are no longer listed\&. +.RE +.SS "reloadips [\fIPNN\-LIST\fR]" +.PP +This command reloads the public addresses configuration file on the specified nodes\&. When it completes addresses will be reconfigured and reassigned across the cluster as necessary\&. +.PP +This command is currently unable to make changes to the netmask or interfaces associated with existing addresses\&. Such changes must be made in 2 steps by deleting addresses in question and re\-adding then\&. Unfortunately this will disrupt connections to the changed addresses\&. +.SS "getdbmap" +.PP +This command lists all clustered TDB databases that the CTDB daemon has attached to\&. Some databases are flagged as PERSISTENT, this means that the database stores data persistently and the data will remain across reboots\&. One example of such a database is secrets\&.tdb where information about how the cluster was joined to the domain is stored\&. Some database are flagged as REPLICATED, this means that the data in that database is replicated across all the nodes\&. But the data will not remain across reboots\&. This type of database is used by CTDB to store it\*(Aqs internal state\&. +.PP +If a PERSISTENT database is not in a healthy state the database is flagged as UNHEALTHY\&. If there\*(Aqs at least one completely healthy node running in the cluster, it\*(Aqs possible that the content is restored by a recovery run automatically\&. Otherwise an administrator needs to analyze the problem\&. +.PP +See also "ctdb getdbstatus", "ctdb backupdb", "ctdb restoredb", "ctdb dumpbackup", "ctdb wipedb", "ctdb setvar AllowUnhealthyDBRead 1" and (if samba or tdb\-utils are installed) "tdbtool check"\&. +.PP +Most databases are not persistent and only store the state information that the currently running samba daemons need\&. These databases are always wiped when ctdb/samba starts and when a node is rebooted\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb getdbmap +Number of databases:10 +dbid:0x435d3410 name:notify\&.tdb path:/var/lib/ctdb/notify\&.tdb\&.0 +dbid:0x42fe72c5 name:locking\&.tdb path:/var/lib/ctdb/locking\&.tdb\&.0 +dbid:0x1421fb78 name:brlock\&.tdb path:/var/lib/ctdb/brlock\&.tdb\&.0 +dbid:0x17055d90 name:connections\&.tdb path:/var/lib/ctdb/connections\&.tdb\&.0 +dbid:0xc0bdde6a name:sessionid\&.tdb path:/var/lib/ctdb/sessionid\&.tdb\&.0 +dbid:0x122224da name:test\&.tdb path:/var/lib/ctdb/test\&.tdb\&.0 +dbid:0x2672a57f name:idmap2\&.tdb path:/var/lib/ctdb/persistent/idmap2\&.tdb\&.0 PERSISTENT +dbid:0xb775fff6 name:secrets\&.tdb path:/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT +dbid:0xe98e08b6 name:group_mapping\&.tdb path:/var/lib/ctdb/persistent/group_mapping\&.tdb\&.0 PERSISTENT +dbid:0x7bbbd26c name:passdb\&.tdb path:/var/lib/ctdb/persistent/passdb\&.tdb\&.0 PERSISTENT + +# ctdb getdbmap # example for unhealthy database +Number of databases:1 +dbid:0xb775fff6 name:secrets\&.tdb path:/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT UNHEALTHY + +# ctdb \-X getdbmap +|ID|Name|Path|Persistent|Unhealthy| +|0x7bbbd26c|passdb\&.tdb|/var/lib/ctdb/persistent/passdb\&.tdb\&.0|1|0| + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "backupdb \fIDB\fR \fIFILE\fR" +.PP +Copy the contents of database DB to FILE\&. FILE can later be read back using +\fBrestoredb\fR\&. This is mainly useful for backing up persistent databases such as +secrets\&.tdb +and similar\&. +.SS "restoredb \fIFILE\fR [\fIDB\fR]" +.PP +This command restores a persistent database that was previously backed up using backupdb\&. By default the data will be restored back into the same database as it was created from\&. By specifying dbname you can restore the data into a different database\&. +.SS "setdbreadonly \fIDB\fR" +.PP +This command will enable the read\-only record support for a database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&. +.SS "setdbsticky \fIDB\fR" +.PP +This command will enable the sticky record support for the specified database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&. +.SH "INTERNAL COMMANDS" +.PP +Internal commands are used by CTDB\*(Aqs scripts and are not required for managing a CTDB cluster\&. Their parameters and behaviour are subject to change\&. +.SS "gettickles \fIIPADDR\fR" +.PP +Show TCP connections that are registered with CTDB to be "tickled" if there is a failover\&. +.SS "gratarp \fIIPADDR\fR \fIINTERFACE\fR" +.PP +Send out a gratuitous ARP for the specified interface through the specified interface\&. This command is mainly used by the ctdb eventscripts\&. +.SS "pdelete \fIDB\fR \fIKEY\fR" +.PP +Delete KEY from DB\&. +.SS "pfetch \fIDB\fR \fIKEY\fR" +.PP +Print the value associated with KEY in DB\&. +.SS "pstore \fIDB\fR \fIKEY\fR \fIFILE\fR" +.PP +Store KEY in DB with contents of FILE as the associated value\&. +.SS "ptrans \fIDB\fR [\fIFILE\fR]" +.PP +Read a list of key\-value pairs, one per line from FILE, and store them in DB using a single transaction\&. An empty value is equivalent to deleting the given key\&. +.PP +The key and value should be separated by spaces or tabs\&. Each key/value should be a printable string enclosed in double\-quotes\&. +.SS "runstate [setup|first_recovery|startup|running]" +.PP +Print the runstate of the specified node\&. Runstates are used to serialise important state transitions in CTDB, particularly during startup\&. +.PP +If one or more optional runstate arguments are specified then the node must be in one of these runstates for the command to succeed\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb runstate +RUNNING + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "setifacelink \fIIFACE\fR up|down" +.PP +Set the internal state of network interface IFACE\&. This is typically used in the +10\&.interface +script in the "monitor" event\&. +.PP +Example: ctdb setifacelink eth0 up +.SS "tickle" +.PP +Read a list of TCP connections, one per line, from standard input and send a TCP tickle to the source host for each connection\&. A connection is specified as: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \fISRC\-IPADDR\fR:\fISRC\-PORT\fR \fIDST\-IPADDR\fR:\fIDST\-PORT\fR + +.fi +.if n \{\ +.RE +.\} +.PP +A single connection can be specified on the command\-line rather than on standard input\&. +.PP +A TCP tickle is a TCP ACK packet with an invalid sequence and acknowledge number and will when received by the source host result in it sending an immediate correct ACK back to the other end\&. +.PP +TCP tickles are useful to "tickle" clients after a IP failover has occurred since this will make the client immediately recognize the TCP connection has been disrupted and that the client will need to reestablish\&. This greatly speeds up the time it takes for a client to detect and reestablish after an IP failover in the ctdb cluster\&. +.SS "version" +.PP +Display the CTDB version\&. +.SH "DEBUGGING COMMANDS" +.PP +These commands are primarily used for CTDB development and testing and should not be used for normal administration\&. +.SS "OPTIONS" +.PP +\-\-print\-emptyrecords +.RS 4 +This enables printing of empty records when dumping databases with the catdb, cattbd and dumpdbbackup commands\&. Records with empty data segment are considered deleted by ctdb and cleaned by the vacuuming mechanism, so this switch can come in handy for debugging the vacuuming behaviour\&. +.RE +.PP +\-\-print\-datasize +.RS 4 +This lets database dumps (catdb, cattdb, dumpdbbackup) print the size of the record data instead of dumping the data contents\&. +.RE +.PP +\-\-print\-lmaster +.RS 4 +This lets catdb print the lmaster for each record\&. +.RE +.PP +\-\-print\-hash +.RS 4 +This lets database dumps (catdb, cattdb, dumpdbbackup) print the hash for each record\&. +.RE +.PP +\-\-print\-recordflags +.RS 4 +This lets catdb and dumpdbbackup print the record flags for each record\&. Note that cattdb always prints the flags\&. +.RE +.SS "process\-exists \fIPID\fR \fI[SRVID]\fR" +.PP +This command checks if a specific process exists on the CTDB host\&. This is mainly used by Samba to check if remote instances of samba are still running or not\&. When the optional SRVID argument is specified, the command check if a specific process exists on the CTDB host and has registered for specified SRVID\&. +.SS "getdbstatus \fIDB\fR" +.PP +This command displays more details about a database\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBExample\fR +.RS 4 +.sp +.if n \{\ +.RS 4 +.\} +.nf +# ctdb getdbstatus test\&.tdb\&.0 +dbid: 0x122224da +name: test\&.tdb +path: /var/lib/ctdb/test\&.tdb\&.0 +PERSISTENT: no +HEALTH: OK + +# ctdb getdbstatus registry\&.tdb # with a corrupted TDB +dbid: 0xf2a58948 +name: registry\&.tdb +path: /var/lib/ctdb/persistent/registry\&.tdb\&.0 +PERSISTENT: yes +HEALTH: NO\-HEALTHY\-NODES \- ERROR \- Backup of corrupted TDB in \*(Aq/var/lib/ctdb/persistent/registry\&.tdb\&.0\&.corrupted\&.20091208091949\&.0Z\*(Aq + +.fi +.if n \{\ +.RE +.\} +.RE +.SS "catdb \fIDB\fR" +.PP +Print a dump of the clustered TDB database DB\&. +.SS "cattdb \fIDB\fR" +.PP +Print a dump of the contents of the local TDB database DB\&. +.SS "dumpdbbackup \fIFILE\fR" +.PP +Print a dump of the contents from database backup FILE, similar to +\fBcatdb\fR\&. +.SS "wipedb \fIDB\fR" +.PP +Remove all contents of database DB\&. +.SS "recover" +.PP +This command will trigger the recovery daemon to do a cluster recovery\&. +.SS "ipreallocate, sync" +.PP +This command will force the recovery master to perform a full ip reallocation process and redistribute all ip addresses\&. This is useful to "reset" the allocations back to its default state if they have been changed using the "moveip" command\&. While a "recover" will also perform this reallocation, a recovery is much more hevyweight since it will also rebuild all the databases\&. +.SS "attach \fIDBNAME\fR [persistent|replicated]" +.PP +Create a new CTDB database called DBNAME and attach to it on all nodes\&. +.SS "detach \fIDB\-LIST\fR" +.PP +Detach specified non\-persistent database(s) from the cluster\&. This command will disconnect specified database(s) on all nodes in the cluster\&. This command should only be used when none of the specified database(s) are in use\&. +.PP +All nodes should be active and tunable AllowClientDBAccess should be disabled on all nodes before detaching databases\&. +.SS "dumpmemory" +.PP +This is a debugging command\&. This command will make the ctdb daemon to write a fill memory allocation map to standard output\&. +.SS "rddumpmemory" +.PP +This is a debugging command\&. This command will dump the talloc memory allocation tree for the recovery daemon to standard output\&. +.SS "ban \fIBANTIME\fR" +.PP +Administratively ban a node for BANTIME seconds\&. The node will be unbanned after BANTIME seconds have elapsed\&. +.PP +A banned node does not participate in the cluster\&. It does not host any records for the clustered TDB and does not host any public IP addresses\&. +.PP +Nodes are automatically banned if they misbehave\&. For example, a node may be banned if it causes too many cluster recoveries\&. +.PP +To administratively exclude a node from a cluster use the +\fBstop\fR +command\&. +.SS "unban" +.PP +This command is used to unban a node that has either been administratively banned using the ban command or has been automatically banned\&. +.SH "SEE ALSO" +.PP +\fBctdbd\fR(1), +\fBonnode\fR(1), +\fBctdb\fR(7), +\fBctdb-statistics\fR(7), +\fBctdb-tunables\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb.7 b/net/samba416/files/man/ctdb.7 new file mode 100644 index 000000000000..b0f2df9f960e --- /dev/null +++ b/net/samba416/files/man/ctdb.7 @@ -0,0 +1,783 @@ +'\" t +.\" Title: ctdb +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb \- Clustered TDB +.SH "DESCRIPTION" +.PP +CTDB is a clustered database component in clustered Samba that provides a high\-availability load\-sharing CIFS server cluster\&. +.PP +The main functions of CTDB are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Provide a clustered version of the TDB database with automatic rebuild/recovery of the databases upon node failures\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Monitor nodes in the cluster and services running on each node\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Manage a pool of public IP addresses that are used to provide services to clients\&. Alternatively, CTDB can be used with LVS\&. +.RE +.PP +Combined with a cluster filesystem CTDB provides a full high\-availablity (HA) environment for services such as clustered Samba, NFS and other services\&. +.SH "ANATOMY OF A CTDB CLUSTER" +.PP +A CTDB cluster is a collection of nodes with 2 or more network interfaces\&. All nodes provide network (usually file/NAS) services to clients\&. Data served by file services is stored on shared storage (usually a cluster filesystem) that is accessible by all nodes\&. +.PP +CTDB provides an "all active" cluster, where services are load balanced across all nodes\&. +.SH "RECOVERY LOCK" +.PP +CTDB uses a +\fIrecovery lock\fR +to avoid a +\fIsplit brain\fR, where a cluster becomes partitioned and each partition attempts to operate independently\&. Issues that can result from a split brain include file data corruption, because file locking metadata may not be tracked correctly\&. +.PP +CTDB uses a +\fIcluster leader and follower\fR +model of cluster management\&. All nodes in a cluster elect one node to be the leader\&. The leader node coordinates privileged operations such as database recovery and IP address failover\&. CTDB refers to the leader node as the +\fIrecovery master\fR\&. This node takes and holds the recovery lock to assert its privileged role in the cluster\&. +.PP +By default, the recovery lock is implemented using a file (specified by +\fIrecovery lock\fR +in the +[cluster] +section of +\fBctdb.conf\fR(5)) residing in shared storage (usually) on a cluster filesystem\&. To support a recovery lock the cluster filesystem must support lock coherence\&. See +\fBping_pong\fR(1) +for more details\&. +.PP +The recovery lock can also be implemented using an arbitrary cluster mutex call\-out by using an exclamation point (\*(Aq!\*(Aq) as the first character of +\fIrecovery lock\fR\&. For example, a value of +\fB!/usr/local/bin/myhelper recovery\fR +would run the given helper with the specified arguments\&. See the source code relating to cluster mutexes for clues about writing call\-outs\&. +.PP +If a cluster becomes partitioned (for example, due to a communication failure) and a different recovery master is elected by the nodes in each partition, then only one of these recovery masters will be able to take the recovery lock\&. The recovery master in the "losing" partition will not be able to take the recovery lock and will be excluded from the cluster\&. The nodes in the "losing" partition will elect each node in turn as their recovery master so eventually all the nodes in that partition will be excluded\&. +.PP +CTDB does sanity checks to ensure that the recovery lock is held as expected\&. +.PP +CTDB can run without a recovery lock but this is not recommended as there will be no protection from split brains\&. +.SH "PRIVATE VS PUBLIC ADDRESSES" +.PP +Each node in a CTDB cluster has multiple IP addresses assigned to it: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A single private IP address that is used for communication between nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +One or more public IP addresses that are used to provide NAS or other services\&. +.RE +.sp +.SS "Private address" +.PP +Each node is configured with a unique, permanently assigned private address\&. This address is configured by the operating system\&. This address uniquely identifies a physical node in the cluster and is the address that CTDB daemons will use to communicate with the CTDB daemons on other nodes\&. +.PP +Private addresses are listed in the file +/usr/local/etc/ctdb/nodes)\&. This file contains the list of private addresses for all nodes in the cluster, one per line\&. This file must be the same on all nodes in the cluster\&. +.PP +Some users like to put this configuration file in their cluster filesystem\&. A symbolic link should be used in this case\&. +.PP +Private addresses should not be used by clients to connect to services provided by the cluster\&. +.PP +It is strongly recommended that the private addresses are configured on a private network that is separate from client networks\&. This is because the CTDB protocol is both unauthenticated and unencrypted\&. If clients share the private network then steps need to be taken to stop injection of packets to relevant ports on the private addresses\&. It is also likely that CTDB protocol traffic between nodes could leak sensitive information if it can be intercepted\&. +.PP +Example +/usr/local/etc/ctdb/nodes +for a four node cluster: +.sp +.if n \{\ +.RS 4 +.\} +.nf +192\&.168\&.1\&.1 +192\&.168\&.1\&.2 +192\&.168\&.1\&.3 +192\&.168\&.1\&.4 + +.fi +.if n \{\ +.RE +.\} +.SS "Public addresses" +.PP +Public addresses are used to provide services to clients\&. Public addresses are not configured at the operating system level and are not permanently associated with a particular node\&. Instead, they are managed by CTDB and are assigned to interfaces on physical nodes at runtime\&. +.PP +The CTDB cluster will assign/reassign these public addresses across the available healthy nodes in the cluster\&. When one node fails, its public addresses will be taken over by one or more other nodes in the cluster\&. This ensures that services provided by all public addresses are always available to clients, as long as there are nodes available capable of hosting this address\&. +.PP +The public address configuration is stored in +/usr/local/etc/ctdb/public_addresses +on each node\&. This file contains a list of the public addresses that the node is capable of hosting, one per line\&. Each entry also contains the netmask and the interface to which the address should be assigned\&. If this file is missing then no public addresses are configured\&. +.PP +Some users who have the same public addresses on all nodes like to put this configuration file in their cluster filesystem\&. A symbolic link should be used in this case\&. +.PP +Example +/usr/local/etc/ctdb/public_addresses +for a node that can host 4 public addresses, on 2 different interfaces: +.sp +.if n \{\ +.RS 4 +.\} +.nf +10\&.1\&.1\&.1/24 eth1 +10\&.1\&.1\&.2/24 eth1 +10\&.1\&.2\&.1/24 eth2 +10\&.1\&.2\&.2/24 eth2 + +.fi +.if n \{\ +.RE +.\} +.PP +In many cases the public addresses file will be the same on all nodes\&. However, it is possible to use different public address configurations on different nodes\&. +.PP +Example: 4 nodes partitioned into two subgroups: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Node 0:/usr/local/etc/ctdb/public_addresses + 10\&.1\&.1\&.1/24 eth1 + 10\&.1\&.1\&.2/24 eth1 + +Node 1:/usr/local/etc/ctdb/public_addresses + 10\&.1\&.1\&.1/24 eth1 + 10\&.1\&.1\&.2/24 eth1 + +Node 2:/usr/local/etc/ctdb/public_addresses + 10\&.1\&.2\&.1/24 eth2 + 10\&.1\&.2\&.2/24 eth2 + +Node 3:/usr/local/etc/ctdb/public_addresses + 10\&.1\&.2\&.1/24 eth2 + 10\&.1\&.2\&.2/24 eth2 + +.fi +.if n \{\ +.RE +.\} +.PP +In this example nodes 0 and 1 host two public addresses on the 10\&.1\&.1\&.x network while nodes 2 and 3 host two public addresses for the 10\&.1\&.2\&.x network\&. +.PP +Public address 10\&.1\&.1\&.1 can be hosted by either of nodes 0 or 1 and will be available to clients as long as at least one of these two nodes are available\&. +.PP +If both nodes 0 and 1 become unavailable then public address 10\&.1\&.1\&.1 also becomes unavailable\&. 10\&.1\&.1\&.1 can not be failed over to nodes 2 or 3 since these nodes do not have this public address configured\&. +.PP +The +\fBctdb ip\fR +command can be used to view the current assignment of public addresses to physical nodes\&. +.SH "NODE STATUS" +.PP +The current status of each node in the cluster can be viewed by the +\fBctdb status\fR +command\&. +.PP +A node can be in one of the following states: +.PP +OK +.RS 4 +This node is healthy and fully functional\&. It hosts public addresses to provide services\&. +.RE +.PP +DISCONNECTED +.RS 4 +This node is not reachable by other nodes via the private network\&. It is not currently participating in the cluster\&. It +\fIdoes not\fR +host public addresses to provide services\&. It might be shut down\&. +.RE +.PP +DISABLED +.RS 4 +This node has been administratively disabled\&. This node is partially functional and participates in the cluster\&. However, it +\fIdoes not\fR +host public addresses to provide services\&. +.RE +.PP +UNHEALTHY +.RS 4 +A service provided by this node has failed a health check and should be investigated\&. This node is partially functional and participates in the cluster\&. However, it +\fIdoes not\fR +host public addresses to provide services\&. Unhealthy nodes should be investigated and may require an administrative action to rectify\&. +.RE +.PP +BANNED +.RS 4 +CTDB is not behaving as designed on this node\&. For example, it may have failed too many recovery attempts\&. Such nodes are banned from participating in the cluster for a configurable time period before they attempt to rejoin the cluster\&. A banned node +\fIdoes not\fR +host public addresses to provide services\&. All banned nodes should be investigated and may require an administrative action to rectify\&. +.RE +.PP +STOPPED +.RS 4 +This node has been administratively exclude from the cluster\&. A stopped node does no participate in the cluster and +\fIdoes not\fR +host public addresses to provide services\&. This state can be used while performing maintenance on a node\&. +.RE +.PP +PARTIALLYONLINE +.RS 4 +A node that is partially online participates in a cluster like a healthy (OK) node\&. Some interfaces to serve public addresses are down, but at least one interface is up\&. See also +\fBctdb ifaces\fR\&. +.RE +.SH "CAPABILITIES" +.PP +Cluster nodes can have several different capabilities enabled\&. These are listed below\&. +.PP +RECMASTER +.RS 4 +Indicates that a node can become the CTDB cluster recovery master\&. The current recovery master is decided via an election held by all active nodes with this capability\&. +.sp +Default is YES\&. +.RE +.PP +LMASTER +.RS 4 +Indicates that a node can be the location master (LMASTER) for database records\&. The LMASTER always knows which node has the latest copy of a record in a volatile database\&. +.sp +Default is YES\&. +.RE +.PP +The RECMASTER and LMASTER capabilities can be disabled when CTDB is used to create a cluster spanning across WAN links\&. In this case CTDB acts as a WAN accelerator\&. +.SH "LVS" +.PP +LVS is a mode where CTDB presents one single IP address for the entire cluster\&. This is an alternative to using public IP addresses and round\-robin DNS to loadbalance clients across the cluster\&. +.PP +This is similar to using a layer\-4 loadbalancing switch but with some restrictions\&. +.PP +One extra LVS public address is assigned on the public network to each LVS group\&. Each LVS group is a set of nodes in the cluster that presents the same LVS address public address to the outside world\&. Normally there would only be one LVS group spanning an entire cluster, but in situations where one CTDB cluster spans multiple physical sites it might be useful to have one LVS group for each site\&. There can be multiple LVS groups in a cluster but each node can only be member of one LVS group\&. +.PP +Client access to the cluster is load\-balanced across the HEALTHY nodes in an LVS group\&. If no HEALTHY nodes exists then all nodes in the group are used, regardless of health status\&. CTDB will, however never load\-balance LVS traffic to nodes that are BANNED, STOPPED, DISABLED or DISCONNECTED\&. The +\fBctdb lvs\fR +command is used to show which nodes are currently load\-balanced across\&. +.PP +In each LVS group, one of the nodes is selected by CTDB to be the LVS master\&. This node receives all traffic from clients coming in to the LVS public address and multiplexes it across the internal network to one of the nodes that LVS is using\&. When responding to the client, that node will send the data back directly to the client, bypassing the LVS master node\&. The command +\fBctdb lvs master\fR +will show which node is the current LVS master\&. +.PP +The path used for a client I/O is: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Client sends request packet to LVSMASTER\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +LVSMASTER passes the request on to one node across the internal network\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +Selected node processes the request\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +Node responds back to client\&. +.RE +.PP +This means that all incoming traffic to the cluster will pass through one physical node, which limits scalability\&. You can send more data to the LVS address that one physical node can multiplex\&. This means that you should not use LVS if your I/O pattern is write\-intensive since you will be limited in the available network bandwidth that node can handle\&. LVS does work very well for read\-intensive workloads where only smallish READ requests are going through the LVSMASTER bottleneck and the majority of the traffic volume (the data in the read replies) goes straight from the processing node back to the clients\&. For read\-intensive i/o patterns you can achieve very high throughput rates in this mode\&. +.PP +Note: you can use LVS and public addresses at the same time\&. +.PP +If you use LVS, you must have a permanent address configured for the public interface on each node\&. This address must be routable and the cluster nodes must be configured so that all traffic back to client hosts are routed through this interface\&. This is also required in order to allow samba/winbind on the node to talk to the domain controller\&. This LVS IP address can not be used to initiate outgoing traffic\&. +.PP +Make sure that the domain controller and the clients are reachable from a node +\fIbefore\fR +you enable LVS\&. Also ensure that outgoing traffic to these hosts is routed out through the configured public interface\&. +.SS "Configuration" +.PP +To activate LVS on a CTDB node you must specify the +\fICTDB_LVS_PUBLIC_IFACE\fR, +\fICTDB_LVS_PUBLIC_IP\fR +and +\fICTDB_LVS_NODES\fR +configuration variables\&. +\fICTDB_LVS_NODES\fR +specifies a file containing the private address of all nodes in the current node\*(Aqs LVS group\&. +.PP +Example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB_LVS_PUBLIC_IFACE=eth1 +CTDB_LVS_PUBLIC_IP=10\&.1\&.1\&.237 +CTDB_LVS_NODES=/usr/local/etc/ctdb/lvs_nodes + +.fi +.if n \{\ +.RE +.\} +.PP +Example +/usr/local/etc/ctdb/lvs_nodes: +.sp +.if n \{\ +.RS 4 +.\} +.nf +192\&.168\&.1\&.2 +192\&.168\&.1\&.3 +192\&.168\&.1\&.4 + +.fi +.if n \{\ +.RE +.\} +.PP +Normally any node in an LVS group can act as the LVS master\&. Nodes that are highly loaded due to other demands maybe flagged with the "slave\-only" option in the +\fICTDB_LVS_NODES\fR +file to limit the LVS functionality of those nodes\&. +.PP +LVS nodes file that excludes 192\&.168\&.1\&.4 from being the LVS master node: +.sp +.if n \{\ +.RS 4 +.\} +.nf +192\&.168\&.1\&.2 +192\&.168\&.1\&.3 +192\&.168\&.1\&.4 slave\-only + +.fi +.if n \{\ +.RE +.\} +.SH "TRACKING AND RESETTING TCP CONNECTIONS" +.PP +CTDB tracks TCP connections from clients to public IP addresses, on known ports\&. When an IP address moves from one node to another, all existing TCP connections to that IP address are reset\&. The node taking over this IP address will also send gratuitous ARPs (for IPv4, or neighbour advertisement, for IPv6)\&. This allows clients to reconnect quickly, rather than waiting for TCP timeouts, which can be very long\&. +.PP +It is important that established TCP connections do not survive a release and take of a public IP address on the same node\&. Such connections can get out of sync with sequence and ACK numbers, potentially causing a disruptive ACK storm\&. +.SH "NAT GATEWAY" +.PP +NAT gateway (NATGW) is an optional feature that is used to configure fallback routing for nodes\&. This allows cluster nodes to connect to external services (e\&.g\&. DNS, AD, NIS and LDAP) when they do not host any public addresses (e\&.g\&. when they are unhealthy)\&. +.PP +This also applies to node startup because CTDB marks nodes as UNHEALTHY until they have passed a "monitor" event\&. In this context, NAT gateway helps to avoid a "chicken and egg" situation where a node needs to access an external service to become healthy\&. +.PP +Another way of solving this type of problem is to assign an extra static IP address to a public interface on every node\&. This is simpler but it uses an extra IP address per node, while NAT gateway generally uses only one extra IP address\&. +.SS "Operation" +.PP +One extra NATGW public address is assigned on the public network to each NATGW group\&. Each NATGW group is a set of nodes in the cluster that shares the same NATGW address to talk to the outside world\&. Normally there would only be one NATGW group spanning an entire cluster, but in situations where one CTDB cluster spans multiple physical sites it might be useful to have one NATGW group for each site\&. +.PP +There can be multiple NATGW groups in a cluster but each node can only be member of one NATGW group\&. +.PP +In each NATGW group, one of the nodes is selected by CTDB to be the NATGW master and the other nodes are consider to be NATGW slaves\&. NATGW slaves establish a fallback default route to the NATGW master via the private network\&. When a NATGW slave hosts no public IP addresses then it will use this route for outbound connections\&. The NATGW master hosts the NATGW public IP address and routes outgoing connections from slave nodes via this IP address\&. It also establishes a fallback default route\&. +.SS "Configuration" +.PP +NATGW is usually configured similar to the following example configuration: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes +CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24 +CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24 +CTDB_NATGW_PUBLIC_IFACE=eth0 +CTDB_NATGW_DEFAULT_GATEWAY=10\&.0\&.0\&.1 + +.fi +.if n \{\ +.RE +.\} +.PP +Normally any node in a NATGW group can act as the NATGW master\&. Some configurations may have special nodes that lack connectivity to a public network\&. In such cases, those nodes can be flagged with the "slave\-only" option in the +\fICTDB_NATGW_NODES\fR +file to limit the NATGW functionality of those nodes\&. +.PP +See the +NAT GATEWAY +section in +\fBctdb-script.options\fR(5) +for more details of NATGW configuration\&. +.SS "Implementation details" +.PP +When the NATGW functionality is used, one of the nodes is selected to act as a NAT gateway for all the other nodes in the group when they need to communicate with the external services\&. The NATGW master is selected to be a node that is most likely to have usable networks\&. +.PP +The NATGW master hosts the NATGW public IP address +\fICTDB_NATGW_PUBLIC_IP\fR +on the configured public interfaces +\fICTDB_NATGW_PUBLIC_IFACE\fR +and acts as a router, masquerading outgoing connections from slave nodes via this IP address\&. If +\fICTDB_NATGW_DEFAULT_GATEWAY\fR +is set then it also establishes a fallback default route to the configured this gateway with a metric of 10\&. A metric 10 route is used so it can co\-exist with other default routes that may be available\&. +.PP +A NATGW slave establishes its fallback default route to the NATGW master via the private network +\fICTDB_NATGW_PRIVATE_NETWORK\fRwith a metric of 10\&. This route is used for outbound connections when no other default route is available because the node hosts no public addresses\&. A metric 10 routes is used so that it can co\-exist with other default routes that may be available when the node is hosting public addresses\&. +.PP +\fICTDB_NATGW_STATIC_ROUTES\fR +can be used to have NATGW create more specific routes instead of just default routes\&. +.PP +This is implemented in the +11\&.natgw +eventscript\&. Please see the eventscript file and the +NAT GATEWAY +section in +\fBctdb-script.options\fR(5) +for more details\&. +.SH "POLICY ROUTING" +.PP +Policy routing is an optional CTDB feature to support complex network topologies\&. Public addresses may be spread across several different networks (or VLANs) and it may not be possible to route packets from these public addresses via the system\*(Aqs default route\&. Therefore, CTDB has support for policy routing via the +13\&.per_ip_routing +eventscript\&. This allows routing to be specified for packets sourced from each public address\&. The routes are added and removed as CTDB moves public addresses between nodes\&. +.SS "Configuration variables" +.PP +There are 4 configuration variables related to policy routing: +\fICTDB_PER_IP_ROUTING_CONF\fR, +\fICTDB_PER_IP_ROUTING_RULE_PREF\fR, +\fICTDB_PER_IP_ROUTING_TABLE_ID_LOW\fR, +\fICTDB_PER_IP_ROUTING_TABLE_ID_HIGH\fR\&. See the +POLICY ROUTING +section in +\fBctdb-script.options\fR(5) +for more details\&. +.SS "Configuration" +.PP +The format of each line of +\fICTDB_PER_IP_ROUTING_CONF\fR +is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + [ ] + +.fi +.if n \{\ +.RE +.\} +.PP +Leading whitespace is ignored and arbitrary whitespace may be used as a separator\&. Lines that have a "public address" item that doesn\*(Aqt match an actual public address are ignored\&. This means that comment lines can be added using a leading character such as \*(Aq#\*(Aq, since this will never match an IP address\&. +.PP +A line without a gateway indicates a link local route\&. +.PP +For example, consider the configuration line: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 192\&.168\&.1\&.99 192\&.168\&.1\&.1/24 + +.fi +.if n \{\ +.RE +.\} +.PP +If the corresponding public_addresses line is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 192\&.168\&.1\&.99/24 eth2,eth3 + +.fi +.if n \{\ +.RE +.\} +.PP +\fICTDB_PER_IP_ROUTING_RULE_PREF\fR +is 100, and CTDB adds the address to eth2 then the following routing information is added: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ip rule add from 192\&.168\&.1\&.99 pref 100 table ctdb\&.192\&.168\&.1\&.99 + ip route add 192\&.168\&.1\&.0/24 dev eth2 table ctdb\&.192\&.168\&.1\&.99 + +.fi +.if n \{\ +.RE +.\} +.PP +This causes traffic from 192\&.168\&.1\&.1 to 192\&.168\&.1\&.0/24 go via eth2\&. +.PP +The +\fBip rule\fR +command will show (something like \- depending on other public addresses and other routes on the system): +.sp +.if n \{\ +.RS 4 +.\} +.nf + 0: from all lookup local + 100: from 192\&.168\&.1\&.99 lookup ctdb\&.192\&.168\&.1\&.99 + 32766: from all lookup main + 32767: from all lookup default + +.fi +.if n \{\ +.RE +.\} +.PP +\fBip route show table ctdb\&.192\&.168\&.1\&.99\fR +will show: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 192\&.168\&.1\&.0/24 dev eth2 scope link + +.fi +.if n \{\ +.RE +.\} +.PP +The usual use for a line containing a gateway is to add a default route corresponding to a particular source address\&. Consider this line of configuration: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 192\&.168\&.1\&.99 0\&.0\&.0\&.0/0 192\&.168\&.1\&.1 + +.fi +.if n \{\ +.RE +.\} +.PP +In the situation described above this will cause an extra routing command to be executed: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ip route add 0\&.0\&.0\&.0/0 via 192\&.168\&.1\&.1 dev eth2 table ctdb\&.192\&.168\&.1\&.99 + +.fi +.if n \{\ +.RE +.\} +.PP +With both configuration lines, +\fBip route show table ctdb\&.192\&.168\&.1\&.99\fR +will show: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 192\&.168\&.1\&.0/24 dev eth2 scope link + default via 192\&.168\&.1\&.1 dev eth2 + +.fi +.if n \{\ +.RE +.\} +.SS "Sample configuration" +.PP +Here is a more complete example configuration\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +/usr/local/etc/ctdb/public_addresses: + + 192\&.168\&.1\&.98 eth2,eth3 + 192\&.168\&.1\&.99 eth2,eth3 + +/usr/local/etc/ctdb/policy_routing: + + 192\&.168\&.1\&.98 192\&.168\&.1\&.0/24 + 192\&.168\&.1\&.98 192\&.168\&.200\&.0/24 192\&.168\&.1\&.254 + 192\&.168\&.1\&.98 0\&.0\&.0\&.0/0 192\&.168\&.1\&.1 + 192\&.168\&.1\&.99 192\&.168\&.1\&.0/24 + 192\&.168\&.1\&.99 192\&.168\&.200\&.0/24 192\&.168\&.1\&.254 + 192\&.168\&.1\&.99 0\&.0\&.0\&.0/0 192\&.168\&.1\&.1 + +.fi +.if n \{\ +.RE +.\} +.PP +The routes local packets as expected, the default route is as previously discussed, but packets to 192\&.168\&.200\&.0/24 are routed via the alternate gateway 192\&.168\&.1\&.254\&. +.SH "NOTIFICATIONS" +.PP +When certain state changes occur in CTDB, it can be configured to perform arbitrary actions via notifications\&. For example, sending SNMP traps or emails when a node becomes unhealthy or similar\&. +.PP +The notification mechanism runs all executable files ending in "\&.script" in +/usr/local/etc/ctdb/events/notification/, ignoring any failures and continuing to run all files\&. +.PP +CTDB currently generates notifications after CTDB changes to these states: +.RS 4 +init +.RE +.RS 4 +setup +.RE +.RS 4 +startup +.RE +.RS 4 +healthy +.RE +.RS 4 +unhealthy +.RE +.SH "LOG LEVELS" +.PP +Valid log levels, in increasing order of verbosity, are: +.RS 4 +ERROR +.RE +.RS 4 +WARNING +.RE +.RS 4 +NOTICE +.RE +.RS 4 +INFO +.RE +.RS 4 +DEBUG +.RE +.SH "REMOTE CLUSTER NODES" +.PP +It is possible to have a CTDB cluster that spans across a WAN link\&. For example where you have a CTDB cluster in your datacentre but you also want to have one additional CTDB node located at a remote branch site\&. This is similar to how a WAN accelerator works but with the difference that while a WAN\-accelerator often acts as a Proxy or a MitM, in the ctdb remote cluster node configuration the Samba instance at the remote site IS the genuine server, not a proxy and not a MitM, and thus provides 100% correct CIFS semantics to clients\&. +.PP +See the cluster as one single multihomed samba server where one of the NICs (the remote node) is very far away\&. +.PP +NOTE: This does require that the cluster filesystem you use can cope with WAN\-link latencies\&. Not all cluster filesystems can handle WAN\-link latencies! Whether this will provide very good WAN\-accelerator performance or it will perform very poorly depends entirely on how optimized your cluster filesystem is in handling high latency for data and metadata operations\&. +.PP +To activate a node as being a remote cluster node you need to set the following two parameters in /usr/local/etc/ctdb/ctdb\&.conf for the remote node: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[legacy] + lmaster capability = false + recmaster capability = false + +.fi +.if n \{\ +.RE +.\} +.PP +Verify with the command "ctdb getcapabilities" that that node no longer has the recmaster or the lmaster capabilities\&. +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBctdbd\fR(1), +\fBctdbd_wrapper\fR(1), +\fBctdb_diagnostics\fR(1), +\fBltdbtool\fR(1), +\fBonnode\fR(1), +\fBping_pong\fR(1), +\fBctdb.conf\fR(5), +\fBctdb-script.options\fR(5), +\fBctdb.sysconfig\fR(5), +\fBctdb-statistics\fR(7), +\fBctdb-tunables\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb.conf.5 b/net/samba416/files/man/ctdb.conf.5 new file mode 100644 index 000000000000..ee36a518e920 --- /dev/null +++ b/net/samba416/files/man/ctdb.conf.5 @@ -0,0 +1,359 @@ +'\" t +.\" Title: ctdb.conf +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB\&.CONF" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb.conf \- CTDB configuration file +.SH "DESCRIPTION" +.PP +This file contains CTDB configuration options that affect the operation of CTDB daemons and command\-line tools\&. The default location of this file is +/usr/local/etc/ctdb/ctdb\&.conf\&. +.PP +Note that this is a Samba\-style configuration file, so it has a very different syntax to previous CTDB configuration files\&. +.PP +For event script options please see +\fBctdb-script.options\fR(5)\&. +.PP +Configuration options are grouped into several sections below\&. There are only a few options in each section, allowing them to be ordered (approximately) in decreasing order of importance\&. +.SH "LOGGING CONFIGURATION" +.PP +Options in this section control CTDB\*(Aqs logging\&. They are valid within the +\fIlogging\fR +section of file, indicated by +[logging]\&. +.PP +log level = \fILOGLEVEL\fR +.RS 4 +LOGLEVEL is a string that controls the verbosity of ctdbd\*(Aqs logging\&. See the +LOG LEVELS +section in +\fBctdb\fR(7) +for more details\&. +.sp +Default: +NOTICE +.RE +.PP +location = \fISTRING\fR +.RS 4 +STRING specifies where ctdbd will write its log\&. +.sp +Valid values are: +.PP +file:\fIFILENAME\fR +.RS 4 +FILENAME where ctdbd will write its log\&. This is usually +/var/log/log\&.ctdb\&. +.RE +.PP +syslog[:\fIMETHOD\fR] +.RS 4 +CTDB will log to syslog\&. By default this will use the syslog(3) API\&. +.sp +If METHOD is specified then it specifies an extension that causes logging to be done in a non\-blocking fashion\&. This can be useful under heavy loads that might cause the syslog daemon to dequeue messages too slowly, which would otherwise cause CTDB to block when logging\&. METHOD must be one of: +.PP +nonblocking +.RS 4 +CTDB will log to syslog via +/dev/log +in non\-blocking mode\&. +.RE +.PP +udp +.RS 4 +CTDB will log to syslog via UDP to localhost:514\&. The syslog daemon must be configured to listen on (at least) localhost:514\&. Most implementations will log the messages against hostname "localhost" \- this is a limit of the implementation for compatibility with more syslog daemon implementations\&. +.RE +.PP +udp\-rfc5424 +.RS 4 +As with "udp" but messages are sent in RFC5424 format\&. This method will log the correct hostname but is not as widely implemented in syslog daemons\&. +.RE +.RE +.sp +Default: file:/var/log/log\&.ctdb +.RE +.SH "CLUSTER CONFIGURATION" +.PP +Options in this section affect the CTDB cluster setup\&. They are valid within the +\fIcluster\fR +section of file, indicated by +[cluster]\&. +.PP +recovery lock = \fILOCK\fR +.RS 4 +LOCK specifies the cluster\-wide mutex used to detect and prevent a partitioned cluster (or "split brain")\&. +.sp +For information about the recovery lock please see the +RECOVERY LOCK +section in +\fBctdb\fR(7)\&. +.sp +Default: NONE\&. However, uses of a recovery lock is +\fIstrongly recommended\fR\&. +.RE +.PP +node address = \fIIPADDR\fR +.RS 4 +IPADDR is the private IP address that ctdbd will bind to\&. +.sp +This option is only required when automatic address detection can not be used\&. This can be the case when running multiple ctdbd daemons/nodes on the same physical host (usually for testing), using InfiniBand for the private network or on Linux when sysctl net\&.ipv4\&.ip_nonlocal_bind=1\&. +.sp +Default: CTDB selects the first address from the nodes list that it can bind to\&. See also the +PRIVATE ADDRESS +section in +\fBctdb\fR(7)\&. +.RE +.PP +transport = tcp|ib +.RS 4 +This option specifies which transport to use for ctdbd internode communications on the private network\&. +.sp +ib +means InfiniBand\&. The InfiniBand support is not regularly tested\&. If it is known to be broken then it may be disabled so that a value of +ib +is considered invalid\&. +.sp +Default: +tcp +.RE +.SH "DATABASE CONFIGURATION" +.PP +Options in this section affect the CTDB database setup\&. They are valid within the +\fIdatabase\fR +section of file, indicated by +[database]\&. +.PP +volatile database directory = \fIDIRECTORY\fR +.RS 4 +DIRECTORY on local storage where CTDB keeps a local copy of volatile TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&. +.sp +Mounting a tmpfs (or similar memory filesystem) on this directory can provide a significant performance improvement when there is I/O contention on the local disk\&. +.sp +Default: +/var/lib/ctdb/volatile +.RE +.PP +persistent database directory=\fIDIRECTORY\fR +.RS 4 +DIRECTORY on local storage where CTDB keeps a local copy of persistent TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&. +.sp +Default: +/var/lib/ctdb/persistent +.RE +.PP +state database directory = \fIDIRECTORY\fR +.RS 4 +DIRECTORY on local storage where CTDB keeps a local copy of internal state TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&. +.sp +Default: +/var/lib/ctdb/state +.RE +.PP +tdb mutexes = true|false +.RS 4 +This parameter enables TDB_MUTEX_LOCKING feature on volatile databases if the robust mutexes are supported\&. This optimizes the record locking using robust mutexes and is much more efficient that using posix locks\&. +.sp +If robust mutexes are unreliable on the platform being used then they can be disabled by setting this to +false\&. +.RE +.PP +lock debug script = \fIFILENAME\fR +.RS 4 +FILENAME is a script used by CTDB\*(Aqs database locking code to attempt to provide debugging information when CTDB is unable to lock an entire database or a record\&. +.sp +This script should be a bare filename relative to the CTDB configuration directory (/usr/local/etc/ctdb/)\&. Any directory prefix is ignored and the path is calculated relative to this directory\&. +.sp +CTDB provides a lock debugging script and installs it as +/usr/local/etc/ctdb/debug_locks\&.sh\&. +.sp +Default: NONE +.RE +.SH "EVENT HANDLING CONFIGURATION" +.PP +Options in this section affect CTDB event handling\&. They are valid within the +\fIevent\fR +section of file, indicated by +[event]\&. +.PP +debug script = \fIFILENAME\fR +.RS 4 +FILENAME is a script used by CTDB\*(Aqs event handling code to attempt to provide debugging information when an event times out\&. +.sp +This script should be a bare filename relative to the CTDB configuration directory (/usr/local/etc/ctdb/)\&. Any directory prefix is ignored and the path is calculated relative to this directory\&. +.sp +CTDB provides a script for debugging timed out event scripts and installs it as +/usr/local/etc/ctdb/debug\-hung\-script\&.sh\&. +.sp +Default: NONE +.RE +.SH "FAILOVER CONFIGURATION" +.PP +Options in this section affect CTDB failover\&. They are valid within the +\fIfailover\fR +section of file, indicated by +[failover]\&. +.PP +disabled = true|false +.RS 4 +If set to +true +then public IP failover is disabled\&. +.sp +Default: +false +.RE +.SH "LEGACY CONFIGURATION" +.PP +Options in this section affect legacy CTDB setup\&. They are valid within the +\fIlegacy\fR +section of file, indicated by +[legacy]\&. +.PP +ctdb start as stopped = true|false +.RS 4 +If set to +true +CTDB starts in the STOPPED state\&. +.sp +To allow the node to take part in the cluster it must be manually continued with the +\fBctdb continue\fR +command\&. +.sp +Please see the +NODE STATES +section in +\fBctdb\fR(7) +for more information about the STOPPED state\&. +.sp +Default: +false +.RE +.PP +start as disabled = true|false +.RS 4 +If set to +true +CTDB starts in the DISABLED state\&. +.sp +To allow the node to host public IP addresses and services, it must be manually enabled using the +\fBctdb enable\fR +command\&. +.sp +Please see the +NODE STATES +section in +\fBctdb\fR(7) +for more information about the DISABLED state\&. +.sp +Default: +false +.RE +.PP +realtime scheduling = true|false +.RS 4 +Usually CTDB runs with real\-time priority\&. This helps it to perform effectively on a busy system, such as when there are thousands of Samba clients\&. If you are running CTDB on a platform that does not support real\-time priority, you can set this to +false\&. +.sp +Default: +true +.RE +.PP +recmaster capability = true|false +.RS 4 +Indicates whether a node can become the recovery master for the cluster\&. If this is set to +false +then the node will not be able to become the recovery master for the cluster\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&. +.sp +Please see the +REMOTE CLUSTER NODES +section in +\fBctdb\fR(7) +for more information\&. +.sp +Default: +true +.RE +.PP +lmaster capability = true|false +.RS 4 +Indicates whether a node can become a location master for records in a database\&. If this is set to +false +then the node will not be part of the vnnmap\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&. +.sp +Please see the +REMOTE CLUSTER NODES +section in +\fBctdb\fR(7) +for more information\&. +.sp +Default: +true +.RE +.PP +script log level = \fILOGLEVEL\fR +.RS 4 +This option sets the debug level of event script output to LOGLEVEL\&. +.sp +See the +DEBUG LEVELS +section in +\fBctdb\fR(7) +for more information\&. +.sp +Default: +ERROR +.RE +.SH "FILES" +.RS 4 +/usr/local/etc/ctdb/ctdb\&.conf +.RE +.SH "SEE ALSO" +.PP +\fBctdbd\fR(1), +\fBonnode\fR(1), +\fBctdb.sysconfig\fR(5), +\fBctdb-script.options\fR(5), +\fBctdb\fR(7), +\fBctdb-tunables\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb.sysconfig.5 b/net/samba416/files/man/ctdb.sysconfig.5 new file mode 100644 index 000000000000..32afdb2bcf24 --- /dev/null +++ b/net/samba416/files/man/ctdb.sysconfig.5 @@ -0,0 +1,139 @@ +'\" t +.\" Title: ctdb.sysconfig +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB\&.SYSCONFIG" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb.sysconfig \- CTDB daemon configuration file +.SH "DESCRIPTION" +.PP +This file contains configuration that affects the operation of CTDB\&. This is a distribution\-specific service configuration file such as +/etc/sysconfig/ctdb +(Red Hat) or +/etc/default/ctdb +(Debian) and is a shell script (see +\fBsh\fR(1))\&. +.SH "GLOBAL CONFIGURATION" +.PP +CTDB_INIT_STYLE=debian|redhat|suse +.RS 4 +This is the init style used by the Linux distribution (or other operating system) being used\&. This is usually determined dynamically by checking the system\&. This variable is used by the initscript to determine which init system primitives to use\&. It is also used by some eventscripts to choose the name of initscripts for certain services, since these can vary between distributions\&. +.sp +If using CTDB\*(Aqs event scripts are unable to determine an appropriate default then this option can also be placed in a relevant +\fBctdb-script.options\fR(5) +file\&. +.sp +Default: NONE\&. Guessed, based on features of distribution\&. +.RE +.PP +CTDB_STARTUP_TIMEOUT=\fINUM\fR +.RS 4 +NUM is the number of seconds to wait for +\fBctdbd\fR(1) +complete early initialisation up to a point where it is unlikely to abort\&. If +\fBctdbd\fR +doesn\*(Aqt complete the "setup" event before this timeout then it is killed\&. +.sp +Defaults: 10 +.RE +.SH "RESOURCE LIMITS" +.SS "Maximum number of open files" +.PP +CTDB can use a lot of file descriptors, especially when used with Samba\&. If there are thousands of smbd processes connected to CTDB when this can mean that thousands of file descriptors are used\&. For CTDB, it is often necessary to increase limit on the maximum number of open files\&. +.PP +The maximum number of open files should be configured using an operating system mechanism\&. +.PP +systemd +.RS 4 +The +LimitNOFILE=\fBLIMIT\fR +option can be used in a unit/service file increase the maximum number of open files\&. See +\fBsystemd.exec\fR(5) +for details\&. +.RE +.PP +SYSV init +.RS 4 +Use a command like +\fBulimit \-n \fR\fB\fBLIMIT\fR\fR +to increase the maximum number of open files\&. This command can be put in the relevant distribution\-specific service configuration file\&. +.RE +.SS "Allowing core dumps" +.PP +Many distributions do not allow core dump files to be generated by default\&. To assist with debugging, core files can be enabled\&. This should be configured using an operating system mechanism\&. +.PP +systemd +.RS 4 +The +LimitCORE=0|unlimited +option can be used in a unit/service file\&. +0 +disallows core files, +unlimited +allows them\&. maximum number of open files\&. See +\fBsystemd.exec\fR(5) +for details\&. +.RE +.PP +SYSV init +.RS 4 +Use a command like +\fBulimit \-c 0|unlimited\fR +to disable or enable core files as required\&. This command can be put in the relevant distribution\-specific service configuration file\&. +.RE +.SH "FILES" +.RS 4 +/etc/sysconfig/ctdb +.RE +.RS 4 +/etc/default/ctdb +.RE +.RS 4 +/usr/local/etc/ctdb/script\&.options +.RE +.SH "SEE ALSO" +.PP +\fBctdbd\fR(1), +\fBctdb-script.options\fR(5), +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdb_diagnostics.1 b/net/samba416/files/man/ctdb_diagnostics.1 new file mode 100644 index 000000000000..b24c57d5acd6 --- /dev/null +++ b/net/samba416/files/man/ctdb_diagnostics.1 @@ -0,0 +1,79 @@ +'\" t +.\" Title: ctdb_diagnostics +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 11/18/2018 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDB_DIAGNOSTICS" "1" "11/18/2018" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdb_diagnostics \- dump diagnostic information about CTDB/Samba installation +.SH "SYNOPSIS" +.HP \w'\fBctdb_diagnostics\fR\ 'u +\fBctdb_diagnostics\fR [OPTIONS] \&.\&.\&. +.SH "DESCRIPTION" +.PP +ctdb_diagnostics is used to dump diagnostic information about a clustered Samba installation\&. This includes configuration files, output of relevant commands and logs\&. This information can be used to check the correctness of the configuration and to diagnose problems\&. +.SH "OPTIONS" +.PP +\-n +.RS 4 +Comma separated list of nodes to operate on +.RE +.PP +\-c +.RS 4 +Ignore comment lines (starting with \*(Aq#\*(Aq) in file comparisons +.RE +.PP +\-w +.RS 4 +Ignore whitespace in file comparisons +.RE +.PP +\-\-no\-ads +.RS 4 +Do not use commands that assume an Active Directory Server +.RE +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBctdb\fR(7), +\m[blue]\fB\%https://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Martijn van Brummelen +.SH "COPYRIGHT" +.br +Copyright \(co 2015 Martijn van Brummelen +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdbd.1 b/net/samba416/files/man/ctdbd.1 new file mode 100644 index 000000000000..394b632a0368 --- /dev/null +++ b/net/samba416/files/man/ctdbd.1 @@ -0,0 +1,83 @@ +'\" t +.\" Title: ctdbd +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDBD" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdbd \- The CTDB cluster daemon +.SH "SYNOPSIS" +.HP \w'\fBctdbd\fR\ 'u +\fBctdbd\fR [\fIOPTION\fR...] +.SH "DESCRIPTION" +.PP +ctdbd is the main CTDB daemon\&. +.PP +Note that ctdbd is not usually invoked directly\&. It is invoked via +\fBctdbd_wrapper\fR(1) +or via the initscript\&. +.PP +See +\fBctdb\fR(7) +for an overview of CTDB\&. +.SH "GENERAL OPTIONS" +.PP +\-i, \-\-interactive +.RS 4 +Enable interactive mode\&. This will make ctdbd run in the foreground and not detach from the terminal\&. In this mode ctdbd will log to stderr\&. +.sp +By default ctdbd will detach itself and run in the background as a daemon, logging to the configured destination\&. +.RE +.PP +\-?, \-\-help +.RS 4 +Display a summary of options\&. +.RE +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBctdbd_wrapper\fR(1), +\fBonnode\fR(1), +\fBctdb.conf\fR(5), +\fBctdb\fR(7), +\fBctdb-tunables\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/ctdbd_wrapper.1 b/net/samba416/files/man/ctdbd_wrapper.1 new file mode 100644 index 000000000000..b0b1f9bd783a --- /dev/null +++ b/net/samba416/files/man/ctdbd_wrapper.1 @@ -0,0 +1,63 @@ +'\" t +.\" Title: ctdbd_wrapper +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "CTDBD_WRAPPER" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ctdbd_wrapper \- Wrapper for ctdbd +.SH "SYNOPSIS" +.HP \w'\fBctdbd_wrapper\fR\ 'u +\fBctdbd_wrapper\fR {start | stop} +.SH "DESCRIPTION" +.PP +ctdbd_wrapper is used to start or stop the main CTDB daemon\&. +.PP +See +\fBctdb\fR(7) +for an overview of CTDB\&. +.SH "SEE ALSO" +.PP +\fBctdbd\fR(1), +\fBctdb.sysconfig\fR(5), +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Amitay Isaacs, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/dbwrap_tool.1 b/net/samba416/files/man/dbwrap_tool.1 new file mode 100644 index 000000000000..c6adf654f4b5 --- /dev/null +++ b/net/samba416/files/man/dbwrap_tool.1 @@ -0,0 +1,329 @@ +'\" t +.\" Title: dbwrap_tool +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "DBWRAP_TOOL" "1" "08/09/2022" "Samba 4\&.16\&.4" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +dbwrap_tool \- low level TDB/CTDB manipulation tool using the dbwrap interface +.SH "SYNOPSIS" +.HP \w'\ 'u +dbwrap_tool [\-?|\-\-help] [\-\-usage] [\-\-persistent] [\-\-non\-persistent] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] {} {} [\ [\ []]] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +The dbwrap_tool program is used to read and manipulate TDB/CTDB databases using the dbwrap interface\&. +.PP +The following database operations are available: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +fetch: fetch a record +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +store: create or modify a record +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +delete: remove a record +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +exists: test for existence of a record +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +erase: remove all records +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +listkeys: list all available records +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +listwatchers: list processes, which are waiting for changes in a record +.RE +.sp +.RE +.PP +The following types are available: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +int32: signed 32bit integer +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +uint32: unsigned 32bit integer +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +string: "hello world" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +hex: hex strings like "68656C6C6F20776F726C6400" ("hello world") +.RE +.sp +.RE +.SH "OPTIONS" +.PP +\-\-persistent +.RS 4 +Open the database as a persistent database\&. +.sp +Exactly one of \-\-persistent and \-\-non\-persistent must be specified\&. +.RE +.PP +\-\-non\-persistent +.RS 4 +Open the database as a non\-persistent database\&. +.sp +Caveat: opening a database as non\-persistent when there is currently no other opener will wipe the database\&. +.sp +Exactly one of \-\-persistent and \-\-non\-persistent must be specified\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.SH "COMMANDS" +.SS "fetch" +.HP \w'\ 'u +dbwrap_tool fetch + +.SS "store" +.HP \w'\ 'u +dbwrap_tool store + +.SS "delete" +.HP \w'\ 'u +dbwrap_tool delete + +.SS "exists" +.HP \w'\ 'u +dbwrap_tool exists + +.SS "erase" +.HP \w'\ 'u +dbwrap_tool erase +.SS "listkeys" +.HP \w'\ 'u +dbwrap_tool listkeys + +.SS "listwatchers" +.HP \w'\ 'u +dbwrap_tool listwatchers + +.SH "EXAMPLES" +.PP +List all keys from winbindd_idmap\&.tdb +.RS 4 +dbwrap_tool +\-\-persistent winbindd_idmap\&.tdb listkeys +.RE +.PP +Fetch record with key "USER HWM" as uint32 +.RS 4 +dbwrap_tool +\-\-persistent winbindd_idmap\&.tdb fetch "USER HWM" uint32 +.RE +.PP +Remove record with key "USER HWM" +.RS 4 +dbwrap_tool +\-\-persistent winbindd_idmap\&.tdb remove "USER HWM" +.RE +.PP +Store and overwrite record "USER HWM" with value 214 +.RS 4 +uint32: +dbwrap_tool +\-\-persistent winbindd_idmap\&.tdb store "USER HWM" uint32 214 +hex: +dbwrap_tool +\-\-persistent winbindd_idmap\&.tdb store "USER HWM" hex D6000000 +.RE +.SH "NOTES" +.PP +Use with caution! +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbd\fR(8), +\fBsamba\fR(7) +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The dbwrap_tool manpage was written by Bjoern Baumbach\&. diff --git a/net/samba416/files/man/gentest.1 b/net/samba416/files/man/gentest.1 new file mode 100644 index 000000000000..35e301ed2918 --- /dev/null +++ b/net/samba416/files/man/gentest.1 @@ -0,0 +1,133 @@ +'\" t +.\" Title: gentest +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: Test Suite +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "GENTEST" "1" "08/09/2022" "Samba 4\&.0" "Test Suite" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +gentest \- Run random generic SMB operations against two SMB servers and show the differences in behavior +.SH "SYNOPSIS" +.HP \w'\fBgentest\fR\ 'u +\fBgentest\fR {//server1/share1} {//server2/share2} {\-U\ user%pass} {\-U\ user%pass} [\-s\ seed] [\-o\ numops] [\-a] [\-A] [\-i\ FILE] [\-O] [\-S\ FILE] [\-L] [\-F] [\-C] [\-X] +.SH "DESCRIPTION" +.PP +gentest +is a utility for detecting differences in behaviour between SMB servers\&. It will run a random set of generic operations against +\fI//server1/share1\fR +and then the same random set against +\fI//server2/share2\fR +and display the differences in the responses it gets\&. +.PP +This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&. +.SH "OPTIONS" +.PP +\-U user%pass +.RS 4 +Specify the user and password to use when logging on on the shares\&. This parameter is mandatory and has to be specified twice\&. +.RE +.PP +\-s seed +.RS 4 +Seed the random number generator with the specified value\&. +.RE +.PP +\-o numops +.RS 4 +Set the number of operations to perform\&. +.RE +.PP +\-a +.RS 4 +Print the operations that are performed\&. +.RE +.PP +\-A +.RS 4 +Backtrack to find minimal number of operations required to make the response to a certain call differ\&. +.RE +.PP +\-i FILE +.RS 4 +Specify a file containing the names of fields that have to be ignored (such as time fields)\&. See below for a description of the file format\&. +.RE +.PP +\-O +.RS 4 +Enable oplocks\&. +.RE +.PP +\-S FILE +.RS 4 +Set preset seeds file\&. The default is +gentest_seeds\&.dat\&. +.RE +.PP +\-L +.RS 4 +Use preset seeds +.RE +.PP +\-F +.RS 4 +Fast reconnect (just close files) +.RE +.PP +\-C +.RS 4 +Continuous analysis mode +.RE +.PP +\-X +.RS 4 +Analyse even when the test succeeded\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +Samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +gentest was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/ldb.3 b/net/samba416/files/man/ldb.3 new file mode 100644 index 000000000000..d535d8ab67e7 --- /dev/null +++ b/net/samba416/files/man/ldb.3 @@ -0,0 +1,427 @@ +'\" t +.\" Title: ldb +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDB" "3" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldb \- A light\-weight database library +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.SH "DESCRIPTION" +.PP +ldb is a light weight embedded database library and API\&. With a programming interface that is very similar to LDAP, ldb can store its data either in a tdb(3) database or in a real LDAP database\&. +.PP +When used with the tdb backend ldb does not require any database daemon\&. Instead, ldb function calls are processed immediately by the ldb library, which does IO directly on the database, while allowing multiple readers/writers using operating system byte range locks\&. This leads to an API with very low overheads, often resulting in speeds of more than 10x what can be achieved with a more traditional LDAP architecture\&. +.PP +In a taxonomy of databases ldb would sit half way between key/value pair databases (such as berkley db or tdb) and a full LDAP database\&. With a structured attribute oriented API like LDAP and good indexing capabilities, ldb can be used for quite sophisticated applications that need a light weight database, without the administrative overhead of a full LDAP installation\&. +.PP +Included with ldb are a number of useful command line tools for manipulating a ldb database\&. These tools are similar in style to the equivalent ldap command line tools\&. +.PP +In its default mode of operation with a tdb backend, ldb can also be seen as a "schema\-less LDAP"\&. By default ldb does not require a schema, which greatly reduces the complexity of getting started with ldb databases\&. As the complexity of you application grows you can take advantage of some of the optional schema\-like attributes that ldb offers, or you can migrate to using the full LDAP api while keeping your exiting ldb code\&. +.PP +If you are new to ldb, then I suggest starting with the manual pages for ldbsearch(1) and ldbedit(1), and experimenting with a local database\&. Then I suggest you look at the ldb_connect(3) and ldb_search(3) manual pages\&. +.SH "TOOLS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldbsearch(1) +\- command line ldb search utility +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldbedit(1) +\- edit all or part of a ldb database using your favourite editor +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldbadd(1) +\- add records to a ldb database using LDIF formatted input +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldbdel(1) +\- delete records from a ldb database +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldbmodify(1) +\- modify records in a ldb database using LDIF formatted input +.RE +.SH "FUNCTIONS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_connect(3)\fR +\- connect to a ldb backend +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_search(3)\fR +\- perform a database search +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_add(3)\fR +\- add a record to the database +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_delete(3)\fR +\- delete a record from the database +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_modify(3)\fR +\- modify a record in the database +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_errstring(3)\fR +\- retrieve extended error information from the last operation +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_write(3)\fR +\- write a LDIF formatted message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_write_file(3)\fR +\- write a LDIF formatted message to a file +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_read(3)\fR +\- read a LDIF formatted message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_read_free(3)\fR +\- free the result of a ldb_ldif_read() +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_read_file(3)\fR +\- read a LDIF message from a file +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_ldif_read_string(3)\fR +\- read a LDIF message from a string +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_element(3)\fR +\- find an element in a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_val_equal_exact(3)\fR +\- compare two ldb_val structures +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_val(3)\fR +\- find an element by value +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_add_empty(3)\fR +\- add an empty message element to a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_add(3)\fR +\- add a non\-empty message element to a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_element_compare(3)\fR +\- compare two ldb_message_element structures +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_int(3)\fR +\- return an integer value from a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_uint(3)\fR +\- return an unsigned integer value from a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_double(3)\fR +\- return a double value from a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_msg_find_string(3)\fR +\- return a string value from a ldb_message +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_set_alloc(3)\fR +\- set the memory allocation function to be used by ldb +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_set_debug(3)\fR +\- set a debug handler to be used by ldb +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBldb_set_debug_stderr(3)\fR +\- set a debug handler for stderr output +.RE +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +ldb is released under the GNU Lesser General Public License version 2 or later\&. Please see the file COPYING for license details\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbadd.1 b/net/samba416/files/man/ldbadd.1 new file mode 100644 index 000000000000..105b5649632a --- /dev/null +++ b/net/samba416/files/man/ldbadd.1 @@ -0,0 +1,78 @@ +'\" t +.\" Title: ldbadd +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBADD" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbadd \- Command\-line utility for adding records to an LDB +.SH "SYNOPSIS" +.HP \w'\fBldbadd\fR\ 'u +\fBldbadd\fR [\-h] [\-H\ LDB\-URL] [ldif\-file1] [ldif\-file2] [\&.\&.\&.] +.SH "DESCRIPTION" +.PP +ldbadd adds records to an ldb(3) database\&. It reads the ldif(5) files specified on the command line and adds the records from these files to the LDB database, which is specified by the \-H option or the LDB_URL environment variable\&. +.PP +If \- is specified as a ldb file, the ldif input is read from standard input\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Show list of available options\&. +.RE +.PP +\-H +.RS 4 +LDB URL to connect to\&. See ldb(3) for details\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to (can be overridden by using the \-H command\-line option\&.) +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbmodify, ldbdel, ldif(5) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbdel.1 b/net/samba416/files/man/ldbdel.1 new file mode 100644 index 000000000000..947ee6136b9c --- /dev/null +++ b/net/samba416/files/man/ldbdel.1 @@ -0,0 +1,80 @@ +'\" t +.\" Title: ldbdel +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBDEL" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbdel \- Command\-line program for deleting LDB records +.SH "SYNOPSIS" +.HP \w'\fBldbdel\fR\ 'u +\fBldbdel\fR [\-h] [\-H\ LDB\-URL] [dn] [\&.\&.\&.] +.SH "DESCRIPTION" +.PP +ldbdel deletes records from an ldb(3) database\&. It deletes the records identified by the dn\*(Aqs specified on the command\-line\&. +.PP +ldbdel uses either the database that is specified with the \-H option or the database specified by the LDB_URL environment variable\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Show list of available options\&. +.RE +.PP +\-H +.RS 4 +LDB URL to connect to\&. See ldb(3) for details\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to (can be overridden by using the \-H command\-line option\&.) +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbmodify, ldbadd, ldif(5) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +ldbdel was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbedit.1 b/net/samba416/files/man/ldbedit.1 new file mode 100644 index 000000000000..5267dd2556f2 --- /dev/null +++ b/net/samba416/files/man/ldbedit.1 @@ -0,0 +1,111 @@ +'\" t +.\" Title: ldbedit +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBEDIT" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbedit \- Edit LDB databases using your preferred editor +.SH "SYNOPSIS" +.HP \w'\fBldbedit\fR\ 'u +\fBldbedit\fR [\-?] [\-\-usage] [\-s\ base|one|sub] [\-b\ basedn] [\-a] [\-e\ editor] [\-H\ LDB\-URL] [expression] [attributes...] +.SH "DESCRIPTION" +.PP +ldbedit is a utility that allows you to edit LDB entries (in tdb files, sqlite files or LDAP servers) using your preferred editor\&. ldbedit generates an LDIF file based on your query, allows you to edit the LDIF, and then merges that LDIF back into the LDB backend\&. +.SH "OPTIONS" +.PP +\-?, \-\-help +.RS 4 +Show list of available options, and a phrase describing what that option does\&. +.RE +.PP +\-\-usage +.RS 4 +Show list of available options\&. This is similar to the help option, however it does not provide any description, and is hence shorter\&. +.RE +.PP +\-H +.RS 4 +LDB URL to connect to\&. For a tdb database, this will be of the form tdb://\fIfilename\fR\&. For a LDAP connection over unix domain sockets, this will be of the form ldapi://\fIsocket\fR\&. For a (potentially remote) LDAP connection over TCP, this will be of the form ldap://\fIhostname\fR\&. For an SQLite database, this will be of the form sqlite://\fIfilename\fR\&. +.RE +.PP +\-s one|sub|base +.RS 4 +Search scope to use\&. One\-level, subtree or base\&. +.RE +.PP +\-a, \-all +.RS 4 +Edit all records\&. This allows you to apply the same change to a number of records at once\&. You probably want to combine this with an expression of the form "objectclass=*"\&. +.RE +.PP +\-e editor, \-\-editor editor +.RS 4 +Specify the editor that should be used (overrides the VISUAL and EDITOR environment variables)\&. If this option is not used, and neither VISUAL nor EDITOR environment variables are set, then the vi editor will be used\&. +.RE +.PP +\-b basedn +.RS 4 +Specify Base Distinguished Name to use\&. +.RE +.PP +\-v, \-\-verbose +.RS 4 +Make ldbedit more verbose about the operations that are being performed\&. Without this option, ldbedit will only provide a summary change line\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to\&. This can be overridden by using the \-H command\-line option\&.) +.RE +.PP +VISUAL and EDITOR +.RS 4 +Environment variables used to determine what editor to use\&. VISUAL takes precedence over EDITOR, and both are overridden by the \-e command\-line option\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbmodify(1), ldbdel(1), ldif(5), vi(1) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +This manpage was written by Jelmer Vernooij and updated by Brad Hards\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbmodify.1 b/net/samba416/files/man/ldbmodify.1 new file mode 100644 index 000000000000..3e8f33b4bbe7 --- /dev/null +++ b/net/samba416/files/man/ldbmodify.1 @@ -0,0 +1,73 @@ +'\" t +.\" Title: ldbmodify +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBMODIFY" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbmodify \- Modify records in a LDB database +.SH "SYNOPSIS" +.HP \w'\fBldbmodify\fR\ 'u +\fBldbmodify\fR [\-H\ LDB\-URL] [ldif\-file] +.SH "DESCRIPTION" +.PP +ldbmodify changes, adds and deletes records in a LDB database\&. The changes that should be made to the LDB database are read from the specified LDIF\-file\&. If \- is specified as the filename, input is read from stdin\&. +.PP +For now, see ldapmodify(1) for details on the LDIF file format\&. +.SH "OPTIONS" +.PP +\-H +.RS 4 +LDB URL to connect to\&. See ldb(3) for details\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to (can be overridden by using the \-H command\-line option\&.) +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbedit +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbrename.1 b/net/samba416/files/man/ldbrename.1 new file mode 100644 index 000000000000..071db6e3c63e --- /dev/null +++ b/net/samba416/files/man/ldbrename.1 @@ -0,0 +1,81 @@ +'\" t +.\" Title: ldbrename +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBRENAME" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbrename \- Edit LDB databases using your favorite editor +.SH "SYNOPSIS" +.HP \w'\fBldbrename\fR\ 'u +\fBldbrename\fR [\-h] [\-o\ options] {olddn} {newdn} +.SH "DESCRIPTION" +.PP +ldbrename is a utility that allows you to rename trees in an LDB database based by DN\&. This utility takes two arguments: the original DN name of the top element and the DN to change it to\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Show list of available options\&. +.RE +.PP +\-H +.RS 4 +LDB URL to connect to\&. See ldb(3) for details\&. +.RE +.PP +\-o options +.RS 4 +Extra ldb options, such as modules\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to (can be overridden by using the \-H command\-line option\&.) +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbmodify, ldbdel, ldif(5) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/ldbsearch.1 b/net/samba416/files/man/ldbsearch.1 new file mode 100644 index 000000000000..24b26c440fe5 --- /dev/null +++ b/net/samba416/files/man/ldbsearch.1 @@ -0,0 +1,91 @@ +'\" t +.\" Title: ldbsearch +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: LDB 1.1 +.\" Language: English +.\" +.TH "LDBSEARCH" "1" "08/09/2022" "LDB 1\&.1" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ldbsearch \- Search for records in a LDB database +.SH "SYNOPSIS" +.HP \w'\fBldbsearch\fR\ 'u +\fBldbsearch\fR [\-h] [\-s\ base|one|sub] [\-b\ basedn] [\-i] [\-H\ LDB\-URL] [expression] [attributes] +.SH "DESCRIPTION" +.PP +ldbsearch searches a LDB database for records matching the specified expression (see the ldapsearch(1) manpage for a description of the expression format)\&. For each record, the specified attributes are printed\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Show list of available options\&. +.RE +.PP +\-H +.RS 4 +LDB URL to connect to\&. See ldb(3) for details\&. +.RE +.PP +\-s one|sub|base +.RS 4 +Search scope to use\&. One\-level, subtree or base\&. +.RE +.PP +\-i +.RS 4 +Read search expressions from stdin\&. +.RE +.PP +\-b basedn +.RS 4 +Specify Base DN to use\&. +.RE +.SH "ENVIRONMENT" +.PP +LDB_URL +.RS 4 +LDB URL to connect to (can be overridden by using the \-H command\-line option\&.) +.RE +.SH "VERSION" +.PP +This man page is correct for version 1\&.1 of LDB\&. +.SH "SEE ALSO" +.PP +ldb(3), ldbedit(1) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE diff --git a/net/samba416/files/man/libsmbclient.7 b/net/samba416/files/man/libsmbclient.7 new file mode 100644 index 000000000000..1195e50624a3 --- /dev/null +++ b/net/samba416/files/man/libsmbclient.7 @@ -0,0 +1,94 @@ +'\" t +.\" Title: libsmbclient +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: 7 +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "LIBSMBCLIENT" "7" "08/09/2022" "Samba 4\&.16\&.4" "7" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsmbclient \- An extension library for browsers and that can be used as a generic browsing API\&. +.SH "SYNOPSIS" +.HP \w'\ 'u +.PP +Browser URL: +smb://[[[domain:]user[:password@]]server[/share[/path[/file]]]] [?options] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +libsmbclient +is a library toolset that permits applications to manipulate CIFS/SMB network resources using many of the standards POSIX functions available for manipulating local UNIX/Linux files\&. It permits much more than just browsing, files can be opened and read or written, permissions changed, file times modified, attributes and ACL\*(Aqs can be manipulated, and so on\&. Of course, its functionality includes all the capabilities commonly called browsing\&. +.PP +libsmbclient +can not be used directly from the command line, instead it provides an extension of the capabilities of tools such as file managers and browsers\&. This man page describes the configuration options for this tool so that the user may obtain greatest utility of use\&. +.SH "OPTIONS" +.PP +What the URLs mean: +.PP +smb:// +.RS 4 +Shows all workgroups or domains that are visible in the network\&. The behavior matches that of the Microsoft Windows Explorer\&. +.sp +The method of locating the list of workgroups (domains also) varies depending on the setting of the context variable +(context\->options\&.browse_max_lmb_count)\&. It is the responsibility of the application that calls this library to set this to a sensible value\&. This is a compile\-time option\&. This value determines the maximum number of local master browsers to query for the list of workgroups\&. In order to ensure that the list is complete for those present on the network, all master browsers must be queried\&. If there are a large number of workgroups on the network, the time spent querying will be significant\&. For small networks (just a few workgroups), it is suggested to set this value to 0, instructing libsmbclient to query all local master browsers\&. In an environment that has many workgroups a more reasonable setting may be around 3\&. +.RE +.PP +smb://name/ +.RS 4 +This command causes libsmbclient to perform a name look\-up\&. If the NAME<1D> or NAME<1B> exists (workgroup name), libsmbclient will list all servers in the workgroup (or domain)\&. Otherwise, a name look\-up for the NAME<20> (machine name) will be performed, and the list of shared resources on the server will be displayed\&. +.RE +.PP +When libsmbclient is invoked by an application it searches for a directory called +\&.smb +in the $HOME directory that is specified in the users shell environment\&. It then searches for a file called +smb\&.conf +which, if present, will fully over\-ride the system +/etc/samba/smb\&.conf +file\&. If instead libsmbclient finds a file called +~/\&.smb/smb\&.conf\&.append, it will read the system +/etc/samba/smb\&.conf +and then append the contents of the +~/\&.smb/smb\&.conf\&.append +to it\&. +.PP +libsmbclient +will check the users shell environment for the +USER +parameter and will use its value when if the +user +parameter was not included in the URL\&. +.SH "PROGRAMMERS GUIDE" +.PP +Watch this space for future updates\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The libsmbclient manpage page was written by John H Terpstra\&. diff --git a/net/samba416/files/man/lmhosts.5 b/net/samba416/files/man/lmhosts.5 new file mode 100644 index 000000000000..5de2230cab67 --- /dev/null +++ b/net/samba416/files/man/lmhosts.5 @@ -0,0 +1,123 @@ +'\" t +.\" Title: lmhosts +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: File Formats and Conventions +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "LMHOSTS" "5" "08/09/2022" "Samba 4\&.16\&.4" "File Formats and Conventions" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +lmhosts \- The Samba NetBIOS hosts file +.SH "SYNOPSIS" +.PP +lmhosts +is the +\fBsamba\fR(7) +NetBIOS name to IP address mapping file\&. +.SH "DESCRIPTION" +.PP +This file is part of the +\fBsamba\fR(7) +suite\&. +.PP +lmhosts +is the +\fISamba \fR +NetBIOS name to IP address mapping file\&. It is very similar to the +/etc/hosts +file format, except that the hostname component must correspond to the NetBIOS naming format\&. +.SH "FILE FORMAT" +.PP +It is an ASCII file containing one line for NetBIOS name\&. The two fields on each line are separated from each other by white space\&. Any entry beginning with \*(Aq#\*(Aq is ignored\&. Each line in the lmhosts file contains the following information: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +IP Address \- in dotted decimal format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NetBIOS Name \- This name format is a maximum fifteen character host name, with an optional trailing \*(Aq#\*(Aq character followed by the NetBIOS name type as two hexadecimal digits\&. +.sp +If the trailing \*(Aq#\*(Aq is omitted then the given IP address will be returned for all names that match the given name, whatever the NetBIOS name type in the lookup\&. +.RE +.sp +.RE +.PP +An example follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +# +# Sample Samba lmhosts file\&. +# +192\&.9\&.200\&.1 TESTPC +192\&.9\&.200\&.20 NTSERVER#20 +192\&.9\&.200\&.21 SAMBASERVER +.fi +.if n \{\ +.RE +.\} +.PP +Contains three IP to NetBIOS name mappings\&. The first and third will be returned for any queries for the names "TESTPC" and "SAMBASERVER" respectively, whatever the type component of the NetBIOS name requested\&. +.PP +The second mapping will be returned only when the "0x20" name type for a name "NTSERVER" is queried\&. Any other name type will not be resolved\&. +.PP +The default location of the +lmhosts +file is in the same directory as the +\fBsmb.conf\fR(5) +file\&. +.SH "FILES" +.PP +lmhosts is loaded from the configuration directory\&. This is usually +/etc/samba +or +/usr/local/samba/lib\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbclient\fR(1), +\fBsmb.conf\fR(5), and +\fBsmbpasswd\fR(8) +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/locktest.1 b/net/samba416/files/man/locktest.1 new file mode 100644 index 000000000000..e77256ceb5bc --- /dev/null +++ b/net/samba416/files/man/locktest.1 @@ -0,0 +1,137 @@ +'\" t +.\" Title: locktest +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: Test Suite +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "LOCKTEST" "1" "08/09/2022" "Samba 4\&.0" "Test Suite" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +locktest \- Find differences in locking between two SMB servers +.SH "SYNOPSIS" +.HP \w'\fBlocktest\fR\ 'u +\fBlocktest\fR {//server1/share1} {//server2/share2} [\-U\ user%pass] [\-U\ user%pass] [\-s\ seed] [\-o\ numops] [\-a] [\-O] [\-E] [\-Z] [\-R\ range] [\-B\ base] [\-M\ min] +.SH "DESCRIPTION" +.PP +locktest +is a utility for detecting differences in behaviour in locking between SMB servers\&. It will run a random set of locking operations against +\fI//server1/share1\fR +and then the same random set against +\fI//server2/share2\fR +and display the differences in the responses it gets\&. +.PP +This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&. +.SH "OPTIONS" +.PP +\-U user%pass +.RS 4 +Specify the user and password to use when logging on on the shares\&. This parameter can be specified twice (once for the first server, once for the second)\&. +.RE +.PP +\-s seed +.RS 4 +Seed the random number generator with the specified value\&. +.RE +.PP +\-o numops +.RS 4 +Set the number of operations to perform\&. +.RE +.PP +\-a +.RS 4 +Print the operations that are performed\&. +.RE +.PP +\-A +.RS 4 +Backtrack to find minimal number of operations required to make the response to a certain call differ\&. +.RE +.PP +\-O +.RS 4 +Enable oplocks\&. +.RE +.PP +\-u +.RS 4 +Hide unlock fails\&. +.RE +.PP +\-E +.RS 4 +enable exact error code checking +.RE +.PP +\-Z +.RS 4 +enable the zero/zero lock +.RE +.PP +\-R range +.RS 4 +set lock range +.RE +.PP +\-B base +.RS 4 +set lock base +.RE +.PP +\-M min +.RS 4 +set min lock length +.RE +.PP +\-k +.RS 4 +Use kerberos +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +Samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +locktest was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/log2pcap.1 b/net/samba416/files/man/log2pcap.1 new file mode 100644 index 000000000000..0605cc9adf2b --- /dev/null +++ b/net/samba416/files/man/log2pcap.1 @@ -0,0 +1,124 @@ +'\" t +.\" Title: log2pcap +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "LOG2PCAP" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +log2pcap \- Extract network traces from Samba log files +.SH "SYNOPSIS" +.HP \w'\ 'u +log2pcap [\-h] [\-q] [logfile] [pcap_file] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +log2pcap +reads in a samba log file and generates a pcap file (readable by most sniffers, such as ethereal or tcpdump) based on the packet dumps in the log file\&. +.PP +The log file must have a +\fIlog level\fR +of at least +\fB5\fR +to get the SMB header/parameters right, +\fB10\fR +to get the first 512 data bytes of the packet and +\fB50\fR +to get the whole packet\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +If this parameter is specified the output file will be a hex dump, in a format that is readable by the +text2pcap +utility\&. +.RE +.PP +\-q +.RS 4 +Be quiet\&. No warning messages about missing or incomplete data will be given\&. +.RE +.PP +logfile +.RS 4 +Samba log file\&. log2pcap will try to read the log from stdin if the log file is not specified\&. +.RE +.PP +pcap_file +.RS 4 +Name of the output file to write the pcap (or hexdump) data to\&. If this argument is not specified, output data will be written to stdout\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.SH "EXAMPLES" +.PP +Extract all network traffic from all samba log files: +.PP +.if n \{\ +.RS 4 +.\} +.nf + $ log2pcap < /var/log/* > trace\&.pcap + +.fi +.if n \{\ +.RE +.\} +.PP +Convert to pcap using text2pcap: +.PP +.if n \{\ +.RS 4 +.\} +.nf + $ log2pcap \-h samba\&.log | text2pcap \-T 139,139 \- trace\&.pcap + +.fi +.if n \{\ +.RE +.\} +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "BUGS" +.PP +Only SMB data is extracted from the samba logs, no LDAP, NetBIOS lookup or other data\&. +.PP +The generated TCP and IP headers don\*(Aqt contain a valid checksum\&. +.SH "SEE ALSO" +.PP +\fBtext2pcap\fR(1), +\fBethereal\fR(1) +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +This manpage was written by Jelmer Vernooij\&. diff --git a/net/samba416/files/man/ltdbtool.1 b/net/samba416/files/man/ltdbtool.1 new file mode 100644 index 000000000000..cfe19788d612 --- /dev/null +++ b/net/samba416/files/man/ltdbtool.1 @@ -0,0 +1,256 @@ +'\" t +.\" Title: ltdbtool +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "LTDBTOOL" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ltdbtool \- manipulate CTDB\*(Aqs local TDB files +.SH "SYNOPSIS" +.HP \w'\fBltdbtool\fR\ 'u +\fBltdbtool\fR [\fIOPTION\fR...] {\fICOMMAND\fR} [\fICOMMAND\-ARGS\fR] +.SH "DESCRIPTION" +.PP +ltdbtool is a utility to manipulate CTDB\*(Aqs local TDB databases (LTDBs) without connecting to a CTDB daemon\&. +.PP +It can be used to: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +dump the contents of a LTDB, optionally printing the CTDB record header information, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +convert between an LTDB and a non\-clustered tdb by adding or removing CTDB headers and +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +convert between 64 and 32 bit LTDBs where the CTDB record headers differ by 4 bytes of padding\&. +.RE +.SH "OPTIONS" +.PP +\-e +.RS 4 +Dump empty records\&. These are normally excluded\&. +.RE +.PP +\-p +.RS 4 +Dump with header information, similar to "ctdb catdb"\&. +.RE +.PP +\-s {0 | 32 | 64} +.RS 4 +Specify how to determine the CTDB record header size for the input database: +.PP +0 +.RS 4 +no CTDB header +.RE +.PP +32 +.RS 4 +CTDB header size of a 32 bit system (20 bytes) +.RE +.PP +64 +.RS 4 +CTDB header size of a 64 bit system (24 bytes) +.RE +.sp +The default is 32 or 64 depending on the system architecture\&. +.RE +.PP +\-o {0 | 32 | 64} +.RS 4 +Specify how to determine the CTDB record header size for the output database, see \-s\&. +.RE +.PP +\-S \fISIZE\fR +.RS 4 +Explicitly specify the CTDB record header SIZE of the input database in bytes\&. +.RE +.PP +\-O \fISIZE\fR +.RS 4 +Explicitly specify the CTDB record header SIZE for the output database in bytes\&. +.RE +.PP +\-h +.RS 4 +Print help text\&. +.RE +.SH "COMMANDS" +.PP +help +.RS 4 +Print help text\&. +.RE +.PP +dump \fIIDB\fR +.RS 4 +Dump the contents of an LTDB input file IDB to standard output in a human\-readable format\&. +.RE +.PP +convert \fIIDB\fR \fIODB\fR +.RS 4 +Copy an LTDB input file IDB to output file ODB, optionally adding or removing CTDB headers\&. +.RE +.SH "EXAMPLES" +.PP +Print a local tdb in "tdbdump" style: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool dump idmap2\&.tdb\&.0 + +.fi +.if n \{\ +.RE +.\} +.PP +Print a local tdb with header information similar to "ctdb catdb": +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool dump \-p idmap2\&.tdb\&.0 + +.fi +.if n \{\ +.RE +.\} +.PP +Strip the CTDB headers from records: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool convert \-o0 idmap2\&.tdb\&.0 idmap\&.tdb + +.fi +.if n \{\ +.RE +.\} +.PP +Strip 64 bit CTDB headers from records, running on i386: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool convert \-s64 \-o0 idmap2\&.tdb\&.0 idmap\&.tdb + +.fi +.if n \{\ +.RE +.\} +.PP +Strip the CTDB headers from records by piping through tdbrestore: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool dump idmap2\&.tdb\&.0 | tdbrestore idmap\&.tdb + +.fi +.if n \{\ +.RE +.\} +.PP +Convert a local tdb from a 64 bit system for usage on a 32 bit system: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool convert \-s64 \-o32 idmap2\&.tdb\&.0 idmap2\&.tdb\&.1 + +.fi +.if n \{\ +.RE +.\} +.PP +Add a default header: +.sp +.if n \{\ +.RS 4 +.\} +.nf + ltdbtool convert \-s0 idmap\&.tdb idmap2\&.tdb\&.0 + +.fi +.if n \{\ +.RE +.\} +.SH "SEE ALSO" +.PP +\fBctdb\fR(1), +\fBtdbdump\fR(1), +\fBtdbrestore\fR(1), +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Gregor Beck +.SH "COPYRIGHT" +.br +Copyright \(co 2011 Gregor Beck, Michael Adam +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/masktest.1 b/net/samba416/files/man/masktest.1 new file mode 100644 index 000000000000..34f6f9b66814 --- /dev/null +++ b/net/samba416/files/man/masktest.1 @@ -0,0 +1,113 @@ +'\" t +.\" Title: masktest +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: Test Suite +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "MASKTEST" "1" "08/09/2022" "Samba 4\&.0" "Test Suite" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +masktest \- Find differences in wildcard matching between Samba\*(Aqs implementation and that of a remote server\&. +.SH "SYNOPSIS" +.HP \w'\fBmasktest\fR\ 'u +\fBmasktest\fR {//server/share} [\-U\ user%pass] [\-d\ debuglevel] [\-W\ workgroup] [\-n\ numloops] [\-s\ seed] [\-a] [\-E] [\-M\ max\ protocol] [\-f\ filechars] [\-m\ maskchars] [\-v] +.SH "DESCRIPTION" +.PP +masktest +is a utility for detecting differences in behaviour between Samba\*(Aqs own implementation and that of a remote server\&. It will run generate random filenames/masks and check if these match the same files they do on the remote file as they do on the local server\&. It will display any differences it finds\&. +.PP +This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&. +.SH "OPTIONS" +.PP +\-U user%pass +.RS 4 +Specify the user and password to use when logging on on the shares\&. This parameter can be specified twice (once for the first server, once for the second)\&. +.RE +.PP +\-s seed +.RS 4 +Seed the random number generator with the specified value\&. +.RE +.PP +\-n numops +.RS 4 +Set the number of operations to perform\&. +.RE +.PP +\-a +.RS 4 +Print the operations that are performed\&. +.RE +.PP +\-M max_protocol +.RS 4 +Maximum protocol to use\&. +.RE +.PP +\-f +.RS 4 +Specify characters that can be used when generating file names\&. Default: abcdefghijklm\&. +.RE +.PP +\-E +.RS 4 +Abort when difference in behaviour is found\&. +.RE +.PP +\-m maskchars +.RS 4 +Specify characters used for wildcards\&. +.RE +.PP +\-v +.RS 4 +Be verbose +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +Samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +masktest was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/mdfind.1 b/net/samba416/files/man/mdfind.1 new file mode 100644 index 000000000000..c4aad9b659ff --- /dev/null +++ b/net/samba416/files/man/mdfind.1 @@ -0,0 +1,166 @@ +'\" t +.\" Title: mdfind +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: User Commands +.\" Source: Samba 4.12.7 +.\" Language: English +.\" +.TH "MDFIND" "1" "09/23/2020" "Samba 4\&.12\&.7" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mdfind \- Run Spotlight searches against an SMB server +.SH "SYNOPSIS" +.HP \w'\ 'u +mvxattr {server} {sharename} {query} [\-p,\ \-\-path] [\-L,\ \-\-live] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +mdfind is a simple utility to run Spotlight searches against an SMB server that runs the Spotlight +\fImdssvc\fR +RPC service\&. +.SH "OPTIONS" +.PP +server +.RS 4 +The SMB server name or IP address to connect to\&. +.RE +.PP +sharename +.RS 4 +The name of a share on the server\&. +.RE +.PP +query +.RS 4 +The query expression syntax is a simplified form of filename globbing familiar to shell users\&. Queries have the following format: +.sp +attribute=="value" +.sp +For queries against a Samba server with Spotlight enabled using the Elasticsearch backend, the list of supported metadata attributes is given by the JSON attribute mapping file, typically installed at +/usr/share/samba/mdssvc/elasticsearch_mappings\&.json +.RE +.PP +\-p PATH, \-\-path=PATH +.RS 4 +Server side path to search, defaults to +\fI"/"\fR +.RE +.PP +\-L, \-\-live +.RS 4 +Query remains running\&. +.RE +.SH "EXAMPLES" +.PP +Search all indexed metadata attributes, exact match: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(Aq*=="Samba"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search all indexed metadata attributes, prefix match: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(Aq*=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search by filename: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemFSName=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search by date: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemFSContentChangeDate<$time\&.iso(2018\-10\-01T10:00:00Z)\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search files\*(Aqs content: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemTextContent=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Expressions: +.sp +.if n \{\ +.RS 4 +.\} +.nf + kMDItemFSName=="Samba*"||kMDItemTextContent=="Tango*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.SH "SEE ALSO" +.PP +File Metadata Search Programming Guide +https://developer\&.apple\&.com/library/archive/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/Introduction\&.html +.SH "VERSION" +.PP +This man page is part of version 4\&.12\&.7 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The mdfind manpage was written by Ralph Boehme\&. diff --git a/net/samba416/files/man/mdsearch.1 b/net/samba416/files/man/mdsearch.1 new file mode 100644 index 000000000000..8cae83dca219 --- /dev/null +++ b/net/samba416/files/man/mdsearch.1 @@ -0,0 +1,357 @@ +'\" t +.\" Title: mdsearch +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "MDSEARCH" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mdsearch \- Run Spotlight searches against an SMB server +.SH "SYNOPSIS" +.HP \w'\ 'u +mdfine {server} {sharename} {query} [\-p,\ \-\-path=STRING] [\-L,\ \-\-live] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +mdsearch is a simple utility to run Spotlight searches against an SMB server that runs the Spotlight +\fImdssvc\fR +RPC service\&. +.SH "OPTIONS" +.PP +server +.RS 4 +The SMB server name or IP address to connect to\&. +.RE +.PP +sharename +.RS 4 +The name of a share on the server\&. +.RE +.PP +query +.RS 4 +The query expression syntax is a simplified form of filename globbing familiar to shell users\&. Queries have the following format: +.sp +attribute=="value" +.sp +For queries against a Samba server with Spotlight enabled using the Elasticsearch backend, the list of supported metadata attributes is given by the JSON attribute mapping file, typically installed at +/usr/share/samba/mdssvc/elasticsearch_mappings\&.json +.RE +.PP +\-p PATH, \-\-path=PATH +.RS 4 +Server side path to search, defaults to +\fI"/"\fR +.RE +.PP +\-L, \-\-live +.RS 4 +Query remains running\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "EXAMPLES" +.PP +Search all indexed metadata attributes, exact match: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(Aq*=="Samba"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search all indexed metadata attributes, prefix match: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(Aq*=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search by filename: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemFSName=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search by date: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemFSContentChangeDate<$time\&.iso(2018\-10\-01T10:00:00Z)\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Search files\*(Aqs content: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \*(AqkMDItemTextContent=="Samba*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.PP +Expressions: +.sp +.if n \{\ +.RS 4 +.\} +.nf + kMDItemFSName=="Samba*"||kMDItemTextContent=="Tango*"\*(Aq + +.fi +.if n \{\ +.RE +.\} +.SH "SEE ALSO" +.PP +File Metadata Search Programming Guide +https://developer\&.apple\&.com/library/archive/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/Introduction\&.html +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The mdsearch manpage was written by Ralph Boehme\&. diff --git a/net/samba416/files/man/mvxattr.1 b/net/samba416/files/man/mvxattr.1 new file mode 100644 index 000000000000..6f79803e779a --- /dev/null +++ b/net/samba416/files/man/mvxattr.1 @@ -0,0 +1,84 @@ +'\" t +.\" Title: mvxattr +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "MVXATTR" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mvxattr \- Recursively rename extended attributes +.SH "SYNOPSIS" +.HP \w'\ 'u +mvxattr {\-s\ STRING,\ \-\-from=STRING} {\-d\ STRING,\ \-\-to=STRING} [\-l,\ \-\-follow\-symlinks] [\-p,\ \-\-print] [\-v,\ \-\-verbose] [\-f,\ \-\-force] {PATH\ [PATH\ \&.\&.\&.]} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +mvxattr is a simple utility to recursively rename extended attributes\&. +.PP +By default all symlinks are ignored, use +\fB\-l\fR +to follow them\&. +.SH "OPTIONS" +.PP +\-s STRING, \-\-from=STRING +.RS 4 +Source xattr name +.RE +.PP +\-d STRING, \-\-to=STRING +.RS 4 +Destination xattr name +.RE +.PP +\-l, \-\-follow\-symlinks +.RS 4 +Follow symlinks, the default is to ignore them\&. +.RE +.PP +\-p, \-\-print +.RS 4 +Print files where the xattr got renamed\&. +.RE +.PP +\-v, \-\-verbose +.RS 4 +Print files as they are checked\&. +.RE +.PP +\-f, \-\-force +.RS 4 +Force overwriting of destination xattr\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The mvxattr manpage was written by Ralph Boehme\&. diff --git a/net/samba416/files/man/ndrdump.1 b/net/samba416/files/man/ndrdump.1 new file mode 100644 index 000000000000..bf6165f7dc2b --- /dev/null +++ b/net/samba416/files/man/ndrdump.1 @@ -0,0 +1,84 @@ +'\" t +.\" Title: ndrdump +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "NDRDUMP" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndrdump \- DCE/RPC Packet Parser and Dumper +.SH "SYNOPSIS" +.HP \w'\fBndrdump\fR\ 'u +\fBndrdump\fR [\-c\ context] {pipe} {format} {in|out|struct} {filename} +.HP \w'\fBndrdump\fR\ 'u +\fBndrdump\fR [pipe] +.HP \w'\fBndrdump\fR\ 'u +\fBndrdump\fR +.SH "DESCRIPTION" +.PP +ndrdump tries to parse the specified +\fIfilename\fR +using Samba\*(Aqs parser for the specified pipe and format\&. The third argument should be either +\fIin\fR, +\fIout\fR +or +\fIstruct\fRdepending on whether the data should be parsed as a request, reply or a public structure\&. +.PP +Running ndrdump without arguments will list the pipes for which parsers are available\&. +.PP +Running ndrdump with one argument will list the functions and public structures that Samba can parse for the specified pipe\&. +.PP +The primary function of ndrdump is debugging Samba\*(Aqs internal DCE/RPC parsing functions\&. The file being parsed is usually one exported by wiresharks +\(lqExport selected packet bytes\(rq +function\&. +.PP +The context argument can be used to load context data from the request packet when parsing reply packets (such as array lengths)\&. +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +wireshark, pidl +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +ndrdump was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/nmblookup.1 b/net/samba416/files/man/nmblookup.1 new file mode 100644 index 000000000000..cedbd366a866 --- /dev/null +++ b/net/samba416/files/man/nmblookup.1 @@ -0,0 +1,341 @@ +'\" t +.\" Title: nmblookup +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "NMBLOOKUP" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nmblookup \- NetBIOS over TCP/IP client used to lookup NetBIOS names +.SH "SYNOPSIS" +.HP \w'\ 'u +nmblookup [\-M|\-\-master\-browser] [\-\-recursion] [\-S|\-\-status] [\-r|\-\-root\-port] [\-A|\-\-lookup\-by\-ip] [\-B|\-\-broadcast=BROADCAST\-ADDRESS] [\-U|\-\-unicast=UNICAST\-ADDRESS] [\-T|\-\-translate] [\-f|\-\-flags] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] {name} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +nmblookup +is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries\&. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine\&. All queries are done over UDP\&. +.SH "OPTIONS" +.PP +\-M|\-\-master\-browser +.RS 4 +Searches for a master browser by looking up the NetBIOS +\fIname\fR +with a type of +\fB0x1d\fR\&. If +\fI name\fR +is "\-" then it does a lookup on the special name +\fB__MSBROWSE__\fR\&. Please note that in order to use the name "\-", you need to make sure "\-" isn\*(Aqt parsed as an argument, e\&.g\&. use : +\fBnmblookup \-M \-\- \-\fR\&. +.RE +.PP +\-\-recursion +.RS 4 +Set the recursion desired bit in the packet to do a recursive lookup\&. This is used when sending a name query to a machine running a WINS server and the user wishes to query the names in the WINS server\&. If this bit is unset the normal (broadcast responding) NetBIOS processing code on a machine is used instead\&. See RFC1001, RFC1002 for details\&. +.RE +.PP +\-S|\-\-status +.RS 4 +Once the name query has returned an IP address then do a node status query as well\&. A node status query returns the NetBIOS names registered by a host\&. +.RE +.PP +\-r|\-\-root\-port +.RS 4 +Try and bind to UDP port 137 to send and receive UDP datagrams\&. The reason for this option is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port 137\&. Unfortunately, on most UNIX systems root privilege is needed to bind to this port, and in addition, if the +\fBnmbd\fR(8) +daemon is running on this machine it also binds to this port\&. +.RE +.PP +\-A|\-\-lookup\-by\-ip +.RS 4 +Interpret +\fIname\fR +as an IP Address and do a node status query on this address\&. +.RE +.PP +\-B|\-\-broadcast +.RS 4 +Send the query to the given broadcast address\&. Without this option the default behavior of nmblookup is to send the query to the broadcast address of the network interfaces as either auto\-detected or defined in the +\fIinterfaces\fR +parameter of the +\fBsmb.conf\fR(5) +file\&. +.RE +.PP +\-U|\-\-unicast +.RS 4 +Do a unicast query to the specified address or host +\fIunicast address\fR\&. This option (along with the +\fI\-R\fR +option) is needed to query a WINS server\&. +.RE +.PP +\-T|\-\-translate +.RS 4 +This causes any IP addresses found in the lookup to be looked up via a reverse DNS lookup into a DNS name, and printed out before each +.sp +\fIIP address \&.\&.\&.\&. NetBIOS name\fR +.sp +pair that is the normal output\&. +.RE +.PP +\-f|\-\-flags +.RS 4 +Show which flags apply to the name that has been looked up\&. Possible answers are zero or more of: Response, Authoritative, Truncated, Recursion_Desired, Recursion_Available, Broadcast\&. +.RE +.PP +name +.RS 4 +This is the NetBIOS name being queried\&. Depending upon the previous options this may be a NetBIOS name or IP address\&. If a NetBIOS name then the different name types may be specified by appending \*(Aq#\*(Aq to the name\&. This name may also be \*(Aq*\*(Aq, which will return all registered names within a broadcast area\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER +.RS 4 +This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best ist to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the +\fBlmhosts\fR(5) +for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR: Do a standard host name to IP address resolution, using the system +/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR: Query a name with the IP address listed in the +\fIwins server\fR +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the +\fIinterfaces\fR +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +If this parameter is not set then the name resolve order defined in the +smb\&.conf +file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&. +.sp +The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the +\m[blue]\fBname resolve order\fR\m[] +parameter of the +smb\&.conf +file, the name resolution methods will be attempted in this order\&. +.RE +.PP +\-O|\-\-socket\-options=SOCKETOPTIONS +.RS 4 +TCP socket options to set on the client socket\&. See the socket options parameter in the +smb\&.conf +manual page for the list of valid options\&. +.RE +.PP +\-m|\-\-max\-protocol=MAXPROTOCOL +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient max protocol\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-n|\-\-netbiosname=NETBIOSNAME +.RS 4 +This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the +\m[blue]\fBnetbios name\fR\m[] +parameter in the +smb\&.conf +file\&. However, a command line setting will take precedence over settings in +smb\&.conf\&. +.RE +.PP +\-\-netbios\-scope=SCOPE +.RS 4 +This specifies a NetBIOS scope that +nmblookup +will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are +\fIvery\fR +rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. +.RE +.PP +\-W|\-\-workgroup=WORKGROUP +.RS 4 +Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBworkgroup\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-r|\-\-realm=REALM +.RS 4 +Set the realm for the domain\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBrealm\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.SH "EXAMPLES" +.PP +nmblookup +can be used to query a WINS server (in the same way +nslookup +is used to query DNS servers)\&. To query a WINS server, +nmblookup +must be called like this: +.PP +nmblookup \-U server \-R \*(Aqname\*(Aq +.PP +For example, running : +.PP +nmblookup \-U samba\&.org \-R \*(AqIRIX#1B\*(Aq +.PP +would query the WINS server samba\&.org for the domain master browser (1B name type) for the IRIX workgroup\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBnmbd\fR(8), +\fBsamba\fR(7), and +\fBsmb.conf\fR(5)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/nmblookup4.1 b/net/samba416/files/man/nmblookup4.1 new file mode 100644 index 000000000000..8b98f793c915 --- /dev/null +++ b/net/samba416/files/man/nmblookup4.1 @@ -0,0 +1,157 @@ +'\" t +.\" Title: nmblookup4 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 03/24/2017 +.\" Manual: User Commands +.\" Source: Samba 3.2 +.\" Language: English +.\" +.TH "NMBLOOKUP4" "1" "03/24/2017" "Samba 3\&.2" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nmblookup4 \- NetBIOS over TCP/IP client used to lookup NetBIOS names +.SH "SYNOPSIS" +.HP \w'\fBnmblookup4\fR\ 'u +\fBnmblookup4\fR [\-M] [\-R] [\-S] [\-r] [\-A] [\-h] [\-B\ ] [\-U\ ] [\-d\ ] [\-s\ ] [\-i\ ] [\-T] [\-f] {name} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +\fBnmblookup4\fR +is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries\&. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine\&. All queries are done over UDP\&. +.SH "OPTIONS" +.PP +\-M +.RS 4 +Searches for a master browser by looking up the NetBIOS +\fIname\fR +with a type of +\fB0x1d\fR\&. If +\fI name\fR +is "\-" then it does a lookup on the special name +\fB__MSBROWSE__\fR\&. Please note that in order to use the name "\-", you need to make sure "\-" isn\*(Aqt parsed as an argument, e\&.g\&. use : +\fBnmblookup4 \-M \-\- \-\fR\&. +.RE +.PP +\-R +.RS 4 +Set the recursion desired bit in the packet to do a recursive lookup\&. This is used when sending a name query to a machine running a WINS server and the user wishes to query the names in the WINS server\&. If this bit is unset the normal (broadcast responding) NetBIOS processing code on a machine is used instead\&. See RFC1001, RFC1002 for details\&. +.RE +.PP +\-S +.RS 4 +Once the name query has returned an IP address then do a node status query as well\&. A node status query returns the NetBIOS names registered by a host\&. +.RE +.PP +\-r +.RS 4 +Try and bind to UDP port 137 to send and receive UDP datagrams\&. The reason for this option is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port 137\&. Unfortunately, on most UNIX systems root privilege is needed to bind to this port, and in addition, if the +\fBnmbd\fR(8) +daemon is running on this machine it also binds to this port\&. +.RE +.PP +\-A +.RS 4 +Interpret +\fIname\fR +as an IP Address and do a node status query on this address\&. +.RE +.PP +\-B +.RS 4 +Send the query to the given broadcast address\&. Without this option the default behavior of nmblookup4 is to send the query to the broadcast address of the network interfaces as either auto\-detected or defined in the +\m[blue]\fB\fIinterfaces\fR\fR\m[]\&\s-2\u[1]\d\s+2 +parameter of the +\fBsmb.conf\fR(5) +file\&. +.RE +.PP +\-U +.RS 4 +Do a unicast query to the specified address or host +\fIunicast address\fR\&. This option (along with the +\fI\-R\fR +option) is needed to query a WINS server\&. +.RE +.PP +\-T +.RS 4 +This causes any IP addresses found in the lookup to be looked up via a reverse DNS lookup into a DNS name, and printed out before each +.sp +\fIIP address \&.\&.\&.\&. NetBIOS name\fR +.sp +pair that is the normal output\&. +.RE +.PP +\-f +.RS 4 +Show which flags apply to the name that has been looked up\&. Possible answers are zero or more of: Response, Authoritative, Truncated, Recursion_Desired, Recursion_Available, Broadcast\&. +.RE +.PP +name +.RS 4 +This is the NetBIOS name being queried\&. Depending upon the previous options this may be a NetBIOS name or IP address\&. If a NetBIOS name then the different name types may be specified by appending \*(Aq#\*(Aq to the name\&. This name may also be \*(Aq*\*(Aq, which will return all registered names within a broadcast area\&. +.RE +.SH "EXAMPLES" +.PP +\fBnmblookup4\fR +can be used to query a WINS server (in the same way +\fBnslookup\fR +is used to query DNS servers)\&. To query a WINS server, +\fBnmblookup4\fR +must be called like this: +.PP +\fBnmblookup4 \-U server \-R \*(Aqname\*(Aq\fR +.PP +For example, running : +.PP +\fBnmblookup4 \-U samba\&.org \-R \*(AqIRIX#1B\*(Aq\fR +.PP +would query the WINS server samba\&.org for the domain master browser (1B name type) for the IRIX workgroup\&. +.SH "VERSION" +.PP +This man page is correct for version 3 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBnmbd\fR(8), +\fBsamba\fR(7), and +\fBsmb.conf\fR(5)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at +\m[blue]\fBftp://ftp\&.icce\&.rug\&.nl/pub/unix/\fR\m[]\&\s-2\u[2]\d\s+2) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&. +.SH "NOTES" +.IP " 1." 4 +\fIinterfaces\fR + +.RS 4 +\%[set $man.base.url.for.relative.links]/smb.conf.5.html#INTERFACES +.RE +.IP " 2." 4 +ftp://ftp.icce.rug.nl/pub/unix/ +.RS 4 +\%ftp://ftp.icce.rug.nl/pub/unix/ +.RE diff --git a/net/samba416/files/man/ntlm_auth.1 b/net/samba416/files/man/ntlm_auth.1 new file mode 100644 index 000000000000..932633931f3e --- /dev/null +++ b/net/samba416/files/man/ntlm_auth.1 @@ -0,0 +1,458 @@ +'\" t +.\" Title: ntlm_auth +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "NTLM_AUTH" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ntlm_auth \- tool to allow external access to Winbind\*(Aqs NTLM authentication function +.SH "SYNOPSIS" +.HP \w'\ 'u +ntlm_auth +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +ntlm_auth +is a helper utility that authenticates users using NT/LM authentication\&. It returns 0 if the users is authenticated successfully and 1 if access was denied\&. ntlm_auth uses winbind to access the user and authentication data for a domain\&. This utility is only intended to be used by other programs (currently +Squid +and +mod_ntlm_winbind) +.SH "OPERATIONAL REQUIREMENTS" +.PP +The +\fBwinbindd\fR(8) +daemon must be operational for many of these commands to function\&. +.PP +Some of these commands also require access to the directory +winbindd_privileged +in +$LOCKDIR\&. This should be done either by running this command as root or providing group access to the +winbindd_privileged +directory\&. For security reasons, this directory should not be world\-accessable\&. +.SH "OPTIONS" +.PP +\-\-helper\-protocol=PROTO +.RS 4 +Operate as a stdio\-based helper\&. Valid helper protocols are: +.PP +squid\-2\&.4\-basic +.RS 4 +Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&. +.RE +.PP +squid\-2\&.5\-basic +.RS 4 +Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&. +.RE +.PP +squid\-2\&.5\-ntlmssp +.RS 4 +Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&. +.sp +Requires access to the directory +winbindd_privileged +in +$LOCKDIR\&. The protocol used is described here: +http://devel\&.squid\-cache\&.org/ntlm/squid_helper_protocol\&.html\&. This protocol has been extended to allow the NTLMSSP Negotiate packet to be included as an argument to the +YR +command\&. (Thus avoiding loss of information in the protocol exchange)\&. +.RE +.PP +ntlmssp\-client\-1 +.RS 4 +Client\-side helper for use with arbitrary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowledge\&. +.sp +This helper is a client, and as such may be run by any user\&. The protocol used is effectively the reverse of the previous protocol\&. A +YR +command (without any arguments) starts the authentication exchange\&. +.RE +.PP +gss\-spnego +.RS 4 +Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as +squid\-2\&.5\-ntlmssp, but has some subtle differences that are undocumented outside the source at this stage\&. +.sp +Requires access to the directory +winbindd_privileged +in +$LOCKDIR\&. +.RE +.PP +gss\-spnego\-client +.RS 4 +Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&. +.RE +.PP +ntlm\-server\-1 +.RS 4 +Server\-side helper protocol, intended for use by a RADIUS server or the \*(Aqwinbind\*(Aq plugin for pppd, for the provision of MSCHAP and MSCHAPv2 authentication\&. +.sp +This protocol consists of lines in the form: +Parameter: value +and +Parameter:: Base64\-encode value\&. The presence of a single period +\&. +indicates that one side has finished supplying data to the other\&. (Which in turn could cause the helper to authenticate the user)\&. +.sp +Currently implemented parameters from the external program to the helper are: +.PP +Username +.RS 4 +The username, expected to be in Samba\*(Aqs +\m[blue]\fBunix charset\fR\m[]\&. +.PP +Examples: +.RS 4 +Username: bob +.sp +Username:: Ym9i +.RE +.RE +.PP +NT\-Domain +.RS 4 +The user\*(Aqs domain, expected to be in Samba\*(Aqs +\m[blue]\fBunix charset\fR\m[]\&. +.PP +Examples: +.RS 4 +NT\-Domain: WORKGROUP +.sp +NT\-Domain:: V09SS0dST1VQ +.RE +.RE +.PP +Full\-Username +.RS 4 +The fully qualified username, expected to be in Samba\*(Aqs +\m[blue]\fBunix charset\fR\m[] +and qualified with the +\m[blue]\fBwinbind separator\fR\m[]\&. +.PP +Examples: +.RS 4 +Full\-Username: WORKGROUP\ebob +.sp +Full\-Username:: V09SS0dST1VQYm9i +.RE +.RE +.PP +LANMAN\-Challenge +.RS 4 +The 8 byte +LANMAN Challenge +value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&. +.PP +Examples: +.RS 4 +LANMAN\-Challenge: 0102030405060708 +.RE +.RE +.PP +LANMAN\-Response +.RS 4 +The 24 byte +LANMAN Response +value, calculated from the user\*(Aqs password and the supplied +LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&. +.PP +Examples: +.RS 4 +LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718 +.RE +.RE +.PP +NT\-Response +.RS 4 +The >= 24 byte +NT Response +calculated from the user\*(Aqs password and the supplied +LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&. +.PP +Examples: +.RS 4 +NT\-Response: 0102030405060708090A0B0C0D0E0F10111213141516171 +.RE +.RE +.PP +Password +.RS 4 +The user\*(Aqs password\&. This would be provided by a network client, if the helper is being used in a legacy situation that exposes plaintext passwords in this way\&. +.PP +Examples: +.RS 4 +Password: samba2 +.sp +Password:: c2FtYmEy +.RE +.RE +.PP +Request\-User\-Session\-Key +.RS 4 +Upon successful authentication, return the user session key associated with the login\&. +.PP +Examples: +.RS 4 +Request\-User\-Session\-Key: Yes +.RE +.RE +.PP +Request\-LanMan\-Session\-Key +.RS 4 +Upon successful authentication, return the LANMAN session key associated with the login\&. +.PP +Examples: +.RS 4 +Request\-LanMan\-Session\-Key: Yes +.RE +.RE +.RE +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Implementers should take care to base64 encode any data (such as usernames/passwords) that may contain malicious user data, such as a newline\&. They may also need to decode strings from the helper, which likewise may have been base64 encoded\&. +.sp .5v +.RE +.RE +.PP +\-\-username=USERNAME +.RS 4 +Specify username of user to authenticate +.RE +.PP +\-\-domain=DOMAIN +.RS 4 +Specify domain of user to authenticate +.RE +.PP +\-\-workstation=WORKSTATION +.RS 4 +Specify the workstation the user authenticated from +.RE +.PP +\-\-challenge=STRING +.RS 4 +NTLM challenge (in HEXADECIMAL) +.RE +.PP +\-\-lm\-response=RESPONSE +.RS 4 +LM Response to the challenge (in HEXADECIMAL) +.RE +.PP +\-\-nt\-response=RESPONSE +.RS 4 +NT or NTLMv2 Response to the challenge (in HEXADECIMAL) +.RE +.PP +\-\-password=PASSWORD +.RS 4 +User\*(Aqs plaintext password +.sp +If not specified on the command line, this is prompted for when required\&. +.sp +For the NTLMSSP based server roles, this parameter specifies the expected password, allowing testing without winbindd operational\&. +.RE +.PP +\-\-request\-lm\-key +.RS 4 +Retrieve LM session key +.RE +.PP +\-\-request\-nt\-key +.RS 4 +Request NT key +.RE +.PP +\-\-diagnostics +.RS 4 +Perform Diagnostics on the authentication chain\&. Uses the password from +\-\-password +or prompts for one\&. +.RE +.PP +\-\-require\-membership\-of={SID|Name} +.RS 4 +Require that a user be a member of specified group (either name or SID) for authentication to succeed\&. +.RE +.PP +\-\-pam\-winbind\-conf=FILENAME +.RS 4 +Define the path to the pam_winbind\&.conf file\&. +.RE +.PP +\-\-target\-hostname=HOSTNAME +.RS 4 +Define the target hostname\&. +.RE +.PP +\-\-target\-service=SERVICE +.RS 4 +Define the target service\&. +.RE +.PP +\-\-use\-cached\-creds +.RS 4 +Whether to use credentials cached by winbindd\&. +.RE +.PP +\-\-allow\-mschapv2 +.RS 4 +Explicitly allow MSCHAPv2\&. +.RE +.PP +\-\-offline\-logon +.RS 4 +Allow offline logons for plain text auth\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.SH "EXAMPLE SETUP" +.PP +To setup ntlm_auth for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the +squid\&.conf +file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp +auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic +auth_param basic children 5 +auth_param basic realm Squid proxy\-caching web server +auth_param basic credentialsttl 2 hours +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +This example assumes that ntlm_auth has been installed into your path, and that the group permissions on +winbindd_privileged +are as described above\&. +.sp .5v +.RE +.PP +To setup ntlm_auth for use by squid 2\&.5 with group limitation in addition to the above example, the following should be added to the +squid\&.conf +file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq +auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq +.fi +.if n \{\ +.RE +.\} +.SH "TROUBLESHOOTING" +.PP +If you\*(Aqre experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millennium Edition against ntlm_auth\*(Aqs NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read +the Microsoft Knowledge Base article #239869 and follow instructions described there\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The ntlm_auth manpage was written by Jelmer Vernooij and Andrew Bartlett\&. diff --git a/net/samba416/files/man/ntlm_auth4.1 b/net/samba416/files/man/ntlm_auth4.1 new file mode 100644 index 000000000000..ad1863b7aa56 --- /dev/null +++ b/net/samba416/files/man/ntlm_auth4.1 @@ -0,0 +1,233 @@ +'\" t +.\" Title: ntlm_auth4 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 03/24/2017 +.\" Manual: User Commands +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "NTLM_AUTH4" "1" "03/24/2017" "Samba 4\&.0" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ntlm_auth4 \- tool to allow external access to Winbind\*(Aqs NTLM authentication function +.SH "SYNOPSIS" +.HP \w'\fBntlm_auth4\fR\ 'u +\fBntlm_auth4\fR [\-d\ debuglevel] [\-l\ logdir] [\-s\ ] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +\fBntlm_auth4\fR +is a helper utility that authenticates users using NT/LM authentication\&. It returns 0 if the users is authenticated successfully and 1 if access was denied\&. ntlm_auth4 uses winbind to access the user and authentication data for a domain\&. This utility is only indended to be used by other programs (currently squid)\&. +.SH "OPERATIONAL REQUIREMENTS" +.PP +The +\fBwinbindd\fR(8) +daemon must be operational for many of these commands to function\&. +.PP +Some of these commands also require access to the directory +winbindd_privileged +in +$LOCKDIR\&. This should be done either by running this command as root or providing group access to the +winbindd_privileged +directory\&. For security reasons, this directory should not be world\-accessable\&. +.SH "OPTIONS" +.PP +\-\-helper\-protocol=PROTO +.RS 4 +Operate as a stdio\-based helper\&. Valid helper protocols are: +.PP +squid\-2\&.4\-basic +.RS 4 +Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&. +.RE +.PP +squid\-2\&.5\-basic +.RS 4 +Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&. +.RE +.PP +squid\-2\&.5\-ntlmssp +.RS 4 +Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&. +.sp +Requires access to the directory +winbindd_privileged +in +$LOCKDIR\&. The protocol used is described here: +\m[blue]\fBhttp://devel\&.squid\-cache\&.org/ntlm/squid_helper_protocol\&.html\fR\m[] +.RE +.PP +ntlmssp\-client\-1 +.RS 4 +Cleint\-side helper for use with arbitary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowlege\&. +.sp +This helper is a client, and as such may be run by any user\&. The protocol used is effectivly the reverse of the previous protocol\&. +.RE +.PP +gss\-spnego +.RS 4 +Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as +\fBsquid\-2\&.5\-ntlmssp\fR, but has some subtle differences that are undocumented outside the source at this stage\&. +.sp +Requires access to the directory +winbindd_privileged +in +$LOCKDIR\&. +.RE +.PP +gss\-spnego\-client +.RS 4 +Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&. +.RE +.RE +.PP +\-\-username=USERNAME +.RS 4 +Specify username of user to authenticate +.RE +.PP +\-\-domain=DOMAIN +.RS 4 +Specify domain of user to authenticate +.RE +.PP +\-\-workstation=WORKSTATION +.RS 4 +Specify the workstation the user authenticated from +.RE +.PP +\-\-challenge=STRING +.RS 4 +NTLM challenge (in HEXADECIMAL) +.RE +.PP +\-\-lm\-response=RESPONSE +.RS 4 +LM Response to the challenge (in HEXADECIMAL) +.RE +.PP +\-\-nt\-response=RESPONSE +.RS 4 +NT or NTLMv2 Response to the challenge (in HEXADECIMAL) +.RE +.PP +\-\-password=PASSWORD +.RS 4 +User\*(Aqs plaintext password +.sp +If not specified on the command line, this is prompted for when required\&. +.RE +.PP +\-\-request\-lm\-key +.RS 4 +Retrieve LM session key +.RE +.PP +\-\-request\-nt\-key +.RS 4 +Request NT key +.RE +.PP +\-\-diagnostics +.RS 4 +Perform Diagnostics on the authentication chain\&. Uses the password from +\fB\-\-password\fR +or prompts for one\&. +.RE +.PP +\-\-require\-membership\-of={SID|Name} +.RS 4 +Require that a user be a member of specified group (either name or SID) for authentication to succeed\&. +.RE +.SH "EXAMPLE SETUP" +.PP +To setup ntlm_auth4 for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the +squid\&.conf +file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +auth_param ntlm program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-ntlmssp +auth_param basic program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-basic +auth_param basic children 5 +auth_param basic realm Squid proxy\-caching web server +auth_param basic credentialsttl 2 hours +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +This example assumes that ntlm_auth4 has been installed into your path, and that the group permissions on +winbindd_privileged +are as described above\&. +.sp .5v +.RE +.PP +To setup ntlm_auth4 for use by squid 2\&.5 with group limitation in addition to the above example, the following should be added to the +squid\&.conf +file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +auth_param ntlm program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq +auth_param basic program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq +.fi +.if n \{\ +.RE +.\} +.SH "TROUBLESHOOTING" +.PP +If you\*(Aqre experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millenium Edition against ntlm_auth4\*(Aqs NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read +\m[blue]\fBthe Microsoft Knowledge Base article #239869 and follow instructions described there\fR\m[]\&\s-2\u[1]\d\s+2\&. +.SH "VERSION" +.PP +This man page is correct for version 3\&.0 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The ntlm_auth4 manpage was written by Jelmer Vernooij and Andrew Bartlett\&. +.SH "NOTES" +.IP " 1." 4 +the Microsoft Knowledge Base article #239869 and follow instructions described there +.RS 4 +\%http://support.microsoft.com/support/kb/articles/Q239/8/69.ASP +.RE diff --git a/net/samba416/files/man/oLschema2ldif.1 b/net/samba416/files/man/oLschema2ldif.1 new file mode 100644 index 000000000000..962f5060d195 --- /dev/null +++ b/net/samba416/files/man/oLschema2ldif.1 @@ -0,0 +1,74 @@ +'\" t +.\" Title: oLschema2ldif +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "OLSCHEMA2LDIF" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +oLschema2ldif \- Converts LDAP schema\*(Aqs to LDB\-compatible LDIF +.SH "SYNOPSIS" +.HP \w'\fBoLschema2ldif\fR\ 'u +\fBoLschema2ldif\fR [\-I\ INPUT\-FILE] [\-O\ OUTPUT\-FILE] +.SH "DESCRIPTION" +.PP +oLschema2ldif is a simple tool that converts standard OpenLDAP schema files to a LDIF format that is understood by LDB\&. +.SH "OPTIONS" +.PP +\-I input\-file +.RS 4 +OpenLDAP schema to read\&. If none are specified, the schema file will be read from standard input\&. +.RE +.PP +\-O output\-file +.RS 4 +File to write ldif version of schema to\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +ldb(7), ldbmodify, ldbdel, ldif(5) +.SH "AUTHOR" +.PP +ldb was written by +\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. oLschema2ldif was written by +\m[blue]\fBSimo Sorce\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +If you wish to report a problem or make a suggestion then please see the +\m[blue]\fB\%http://ldb.samba.org/\fR\m[] +web site for current contact and maintainer information\&. +.SH "NOTES" +.IP " 1." 4 +Andrew Tridgell +.RS 4 +\%https://www.samba.org/~tridge/ +.RE +.IP " 2." 4 +Simo Sorce +.RS 4 +\%mailto:idra@samba.org +.RE diff --git a/net/samba416/files/man/onnode.1 b/net/samba416/files/man/onnode.1 new file mode 100644 index 000000000000..1fbd44b45ffc --- /dev/null +++ b/net/samba416/files/man/onnode.1 @@ -0,0 +1,218 @@ +'\" t +.\" Title: onnode +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "ONNODE" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +onnode \- run commands on CTDB cluster nodes +.SH "SYNOPSIS" +.HP \w'\fBonnode\fR\ 'u +\fBonnode\fR [\fIOPTION\fR...] {\fINODES\fR} {\fICOMMAND\fR} +.SH "DESCRIPTION" +.PP +onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes\&. +.PP +\fINODES\fR +specifies which node(s) to run a command on\&. See section +NODES SPECIFICATION +for details\&. +.PP +\fICOMMAND\fR +can be any shell command\&. The onnode utility uses ssh or rsh to connect to the remote nodes and run the command\&. +.SH "OPTIONS" +.PP +\-c +.RS 4 +Execute COMMAND in the current working directory on the specified nodes\&. +.RE +.PP +\-f \fIFILENAME\fR +.RS 4 +Specify an alternative nodes FILENAME to use instead of the default\&. See the discussion of +/usr/local/etc/ctdb/nodes +in the FILES section for more details\&. +.RE +.PP +\-i +.RS 4 +Keep standard input open, allowing data to be piped to onnode\&. Normally onnode closes stdin to avoid surprises when scripting\&. Note that this option is ignored when using +\fB\-p\fR +or if +\fBONNODE_SSH\fR +is set to anything other than "ssh"\&. +.RE +.PP +\-n +.RS 4 +Allow nodes to be specified by name rather than node numbers\&. These nodes don\*(Aqt need to be listed in the nodes file\&. You can avoid the nodes file entirely by combining this with +\-f /dev/null\&. +.RE +.PP +\-p +.RS 4 +Run COMMAND in parallel on the specified nodes\&. The default is to run COMMAND sequentially on each node\&. +.RE +.PP +\-P +.RS 4 +Push files to nodes\&. Names of files to push are specified rather than the usual command\&. Quoting is fragile/broken \- filenames with whitespace in them are not supported\&. +.RE +.PP +\-q +.RS 4 +Do not print node addresses\&. Normally, onnode prints informational node addresses if more than one node is specified\&. This overrides \-v\&. +.RE +.PP +\-v +.RS 4 +Print node addresses even if only one node is specified\&. Normally, onnode prints informational node addresses when more than one node is specified\&. +.RE +.PP +\-h, \-\-help +.RS 4 +Show a short usage guide\&. +.RE +.SH "NODES SPECIFICATION" +.PP +Nodes can be specified via numeric node numbers (from 0 to N\-1) or mnemonics\&. Multiple nodes are specified using lists of nodes, separated by commas, and ranges of numeric node numbers, separated by dashes\&. If nodes are specified multiple times then the command will be executed multiple times on those nodes\&. The order of nodes is significant\&. +.PP +The following mnemonics are available: +.PP +all +.RS 4 +All nodes\&. +.RE +.PP +any +.RS 4 +A node where ctdbd is running\&. This semi\-random but there is a bias towards choosing a low numbered node\&. +.RE +.PP +ok | healthy +.RS 4 +All nodes that are not disconnected, banned, disabled or unhealthy\&. +.RE +.PP +con | connected +.RS 4 +All nodes that are not disconnected\&. +.RE +.SH "EXAMPLES" +.PP +The following command would show the process ID of ctdbd on all nodes +.sp +.if n \{\ +.RS 4 +.\} +.nf + onnode all ctdb getpid + +.fi +.if n \{\ +.RE +.\} +.PP +The following command would show the last 5 lines of log on each node, preceded by the node\*(Aqs hostname +.sp +.if n \{\ +.RS 4 +.\} +.nf + onnode all "hostname; tail \-5 /var/log/log\&.ctdb" + +.fi +.if n \{\ +.RE +.\} +.PP +The following command would restart the ctdb service on all nodes, in parallel\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + onnode \-p all service ctdb restart + +.fi +.if n \{\ +.RE +.\} +.PP +The following command would run \&./foo in the current working directory, in parallel, on nodes 0, 2, 3 and 4\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + onnode \-c \-p 0,2\-4 \&./foo + +.fi +.if n \{\ +.RE +.\} +.SH "FILES" +.PP +/usr/local/etc/ctdb/nodes +.RS 4 +Default file containing a list of each node\*(Aqs IP address or hostname\&. +.sp +As above, a file specified via the +\fB\-f\fR +is given precedence\&. If a relative path is specified and no corresponding file exists relative to the current directory then the file is also searched for in the CTDB configuration directory\&. +.sp +Otherwise the default is +/usr/local/etc/ctdb/nodes\&. +.RE +.PP +/usr/local/etc/ctdb/onnode\&.conf +.RS 4 +If this file exists it is sourced by onnode\&. The main purpose is to allow the administrator to set +\fBONNODE_SSH\fR +to something other than "ssh"\&. In this case the \-t option is ignored\&. +.RE +.SH "SEE ALSO" +.PP +\fBctdb\fR(7), +\m[blue]\fB\%http://ctdb.samba.org/\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Andrew Tridgell, Martin Schwenke +.SH "COPYRIGHT" +.br +Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg +.br +Copyright \(co 2008 Martin Schwenke +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/pam_winbind.conf.5 b/net/samba416/files/man/pam_winbind.conf.5 new file mode 100644 index 000000000000..33adbaece735 --- /dev/null +++ b/net/samba416/files/man/pam_winbind.conf.5 @@ -0,0 +1,161 @@ +'\" t +.\" Title: pam_winbind.conf +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: 5 +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "PAM_WINBIND\&.CONF" "5" "08/09/2022" "Samba 4\&.16\&.4" "5" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +pam_winbind.conf \- Configuration file of PAM module for Winbind +.SH "DESCRIPTION" +.PP +This configuration file is part of the +\fBsamba\fR(7) +suite\&. +.PP +pam_winbind\&.conf is the configuration file for the pam_winbind PAM module\&. See +\fBpam_winbind\fR(8) +for further details\&. +.SH "SYNOPSIS" +.PP +The pam_winbind\&.conf configuration file is a classic ini\-style configuration file\&. There is only one section (global) where various options are defined\&. +.SH "OPTIONS" +.PP +pam_winbind supports several options which can either be set in the PAM configuration files or in the pam_winbind configuration file situated at +/etc/security/pam_winbind\&.conf\&. Options from the PAM configuration file take precedence to those from the pam_winbind\&.conf configuration file\&. +.PP +debug = yes|no +.RS 4 +Gives debugging output to syslog\&. Defaults to "no"\&. +.RE +.PP +debug_state = yes|no +.RS 4 +Gives detailed PAM state debugging output to syslog\&. Defaults to "no"\&. +.RE +.PP +require_membership_of = [SID or NAME] +.RS 4 +If this option is set, pam_winbind will only succeed if the user is a member of the given SID or NAME\&. A SID can be either a group\-SID, an alias\-SID or even an user\-SID\&. It is also possible to give a NAME instead of the SID\&. That name must have the form: +\fIMYDOMAIN\emygroup\fR +or +\fIMYDOMAIN\emyuser\fR +(where \*(Aq\e\*(Aq character corresponds to the value of +\fIwinbind separator\fR +parameter)\&. It is also possible to use a UPN in the form +\fIuser@REALM\fR +or +\fIgroup@REALM\fR\&. pam_winbind will, in that case, lookup the SID internally\&. Note that NAME may not contain any spaces\&. It is thus recommended to only use SIDs\&. You can verify the list of SIDs a user is a member of with +wbinfo \-\-user\-sids=SID\&. This setting is empty by default\&. +.sp +This option only operates during password authentication, and will not restrict access if a password is not required for any reason (such as SSH key\-based login)\&. +.RE +.PP +try_first_pass = yes|no +.RS 4 +By default, pam_winbind tries to get the authentication token from a previous module\&. If no token is available it asks the user for the old password\&. With this option, pam_winbind aborts with an error if no authentication token from a previous module is available\&. If a primary password is not valid, PAM will prompt for a password\&. Default to "no"\&. +.RE +.PP +krb5_auth = yes|no +.RS 4 +pam_winbind can authenticate using Kerberos when winbindd is talking to an Active Directory domain controller\&. Kerberos authentication must be enabled with this parameter\&. When Kerberos authentication can not succeed (e\&.g\&. due to clock skew), winbindd will fallback to samlogon authentication over MSRPC\&. When this parameter is used in conjunction with +\fIwinbind refresh tickets\fR, winbind will keep your Ticket Granting Ticket (TGT) up\-to\-date by refreshing it whenever necessary\&. Defaults to "no"\&. +.RE +.PP +krb5_ccache_type = [type] +.RS 4 +When pam_winbind is configured to try kerberos authentication by enabling the +\fIkrb5_auth\fR +option, it can store the retrieved Ticket Granting Ticket (TGT) in a credential cache\&. The type of credential cache can be controlled with this option\&. The supported values are: +\fIKCM\fR +or +\fIKEYRING\fR +(when supported by the system\*(Aqs Kerberos library and operating system), +\fIFILE\fR +and +\fIDIR\fR +(when the DIR type is supported by the system\*(Aqs Kerberos library)\&. In case of FILE a credential cache in the form of /tmp/krb5cc_UID will be created \- in case of DIR you NEED to specify a directory\&. UID is replaced with the numeric user id\&. The UID directory is being created\&. The path up to the directory should already exist\&. Check the details of the Kerberos implmentation\&. +.sp +When using the KEYRING type, the supported mechanism is +\(lqKEYRING:persistent:UID\(rq, which uses the Linux kernel keyring to store credentials on a per\-UID basis\&. The KEYRING has its limitations\&. As it is secure kernel memory, for example bulk sorage of credentils is for not possible\&. +.sp +When using th KCM type, the supported mechanism is +\(lqKCM:UID\(rq, which uses a Kerberos credential manaager to store credentials on a per\-UID basis similar to KEYRING\&. This is the recommended choice on latest Linux distributions, offering a Kerberos Credential Manager\&. If not we suggest to use KEYRING as those are the most secure and predictable method\&. +.sp +It is also possible to define custom filepaths and use the "%u" pattern in order to substitute the numeric user id\&. Examples: +.PP +krb5_ccache_type = DIR:/run/user/%u/krb5cc +.RS 4 +This will create a credential cache file in the specified directory\&. +.RE +.PP +krb5_ccache_type = FILE:/tmp/krb5cc_%u +.RS 4 +This will create a credential cache file\&. +.RE +.sp +Leave empty to just do kerberos authentication without having a ticket cache after the logon has succeeded\&. This setting is empty by default\&. +.RE +.PP +cached_login = yes|no +.RS 4 +Winbind allows one to logon using cached credentials when +\fIwinbind offline logon\fR +is enabled\&. To use this feature from the PAM module this option must be set\&. Defaults to "no"\&. +.RE +.PP +silent = yes|no +.RS 4 +Do not emit any messages\&. Defaults to "no"\&. +.RE +.PP +mkhomedir = yes|no +.RS 4 +Create homedirectory for a user on\-the\-fly, option is valid in PAM session block\&. Defaults to "no"\&. +.RE +.PP +warn_pwd_expire = days +.RS 4 +Defines number of days before pam_winbind starts to warn about passwords that are going to expire\&. Defaults to 14 days\&. +.RE +.PP +pwd_change_prompt = yes|no +.RS 4 +Generate prompt for changing an expired password\&. Defaults to "no"\&. +.RE +.SH "SEE ALSO" +.PP +\fBpam_winbind\fR(8), +\fBwbinfo\fR(1), +\fBwinbindd\fR(8), +\fBsmb.conf\fR(5) +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of Samba\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +This manpage was written by Jelmer Vernooij and Guenther Deschner\&. diff --git a/net/samba416/files/man/ping_pong.1 b/net/samba416/files/man/ping_pong.1 new file mode 100644 index 000000000000..1ed9363b426c --- /dev/null +++ b/net/samba416/files/man/ping_pong.1 @@ -0,0 +1,122 @@ +'\" t +.\" Title: ping_pong +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 09/23/2020 +.\" Manual: CTDB - clustered TDB database +.\" Source: ctdb +.\" Language: English +.\" +.TH "PING_PONG" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ping_pong \- measures the ping\-pong byte range lock latency +.SH "SYNOPSIS" +.HP \w'\fBping_pong\fR\ 'u +\fBping_pong\fR {\-r | \-w | \-rw} [\-m] [\-c] {\fIFILENAME\fR} {\fINUM\-LOCKS\fR} +.SH "DESCRIPTION" +.PP +ping_pong measures the byte range lock latency\&. It is especially useful on a cluster of nodes sharing a common lock manager as it will give some indication of the lock manager\*(Aqs performance under stress\&. +.PP +FILENAME is a file on shared storage to use for byte range locking tests\&. +.PP +NUM\-LOCKS is the number of byte range locks, so needs to be (strictly) greater than the number of nodes in the cluster\&. +.SH "OPTIONS" +.PP +\-r +.RS 4 +test read performance +.RE +.PP +\-w +.RS 4 +test write performance +.RE +.PP +\-m +.RS 4 +use mmap +.RE +.PP +\-c +.RS 4 +validate the locks +.RE +.SH "EXAMPLES" +.PP +Testing lock coherence +.sp +.if n \{\ +.RS 4 +.\} +.nf + ping_pong test\&.dat N + +.fi +.if n \{\ +.RE +.\} +.PP +Testing lock coherence with lock validation +.sp +.if n \{\ +.RS 4 +.\} +.nf + ping_pong \-c test\&.dat N + +.fi +.if n \{\ +.RE +.\} +.PP +Testing IO coherence +.sp +.if n \{\ +.RS 4 +.\} +.nf + ping_pong \-rw test\&.dat N + +.fi +.if n \{\ +.RE +.\} +.SH "SEE ALSO" +.PP +\fBctdb\fR(7), +\m[blue]\fB\%https://wiki.samba.org/index.php/Ping_pong\fR\m[] +.SH "AUTHOR" +.br +.PP +This documentation was written by Mathieu Parent +.SH "COPYRIGHT" +.br +Copyright \(co 2002 Andrew Tridgell +.br +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see +\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&. +.sp diff --git a/net/samba416/files/man/profiles.1 b/net/samba416/files/man/profiles.1 new file mode 100644 index 000000000000..46d81a7f8952 --- /dev/null +++ b/net/samba416/files/man/profiles.1 @@ -0,0 +1,136 @@ +'\" t +.\" Title: profiles +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "PROFILES" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +profiles \- A utility to report and change SIDs in registry files +.SH "SYNOPSIS" +.HP \w'\ 'u +profiles [\-c|\-\-change\-sid=STRING] [\-n|\-\-new\-sid=STRING] [\-v|\-\-verbose] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] {FILE} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +profiles +is a utility that reports and changes SIDs in windows registry files\&. It currently only supports NT\&. +.SH "OPTIONS" +.PP +file +.RS 4 +Registry file to view or edit\&. +.RE +.PP +\-v,\-\-verbose +.RS 4 +Increases verbosity of messages\&. +.RE +.PP +\-c SID1 \-n SID2, \-\-change\-sid SID1 \-\-new\-sid SID2 +.RS 4 +Change all occurrences of SID1 in +file +by SID2\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The profiles man page was written by Jelmer Vernooij\&. diff --git a/net/samba416/files/man/regdiff.1 b/net/samba416/files/man/regdiff.1 new file mode 100644 index 000000000000..4f0bbb103cf7 --- /dev/null +++ b/net/samba416/files/man/regdiff.1 @@ -0,0 +1,87 @@ +'\" t +.\" Title: regdiff +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "REGDIFF" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +regdiff \- Diff program for Windows registry files +.SH "SYNOPSIS" +.HP \w'\fBregdiff\fR\ 'u +\fBregdiff\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location] +.SH "DESCRIPTION" +.PP +regdiff compares two Windows registry files key by key and value by value and generates a text file that contains the differences between the two files\&. +.PP +A file generated by regdiff can later be applied to a registry file by the regpatch utility\&. +.PP +regdiff and regpatch use the same file format as the regedit32\&.exe utility from Windows\&. +.SH "OPTIONS" +.PP +\-\-help +.RS 4 +Show list of available options\&. +.RE +.PP +\-\-backend BACKEND +.RS 4 +Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is +\fIdir\fR\&. +.sp +This argument can be specified twice: once for the first registry file and once for the second\&. +.RE +.PP +\-\-credentials=CREDENTIALS +.RS 4 +Credentials to use, if any\&. Password should be separated from user name by a percent sign\&. +.sp +This argument can be specified twice: once for the first registry file and once for the second\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +gregedit, regshell, regpatch, regtree, samba, patch, diff +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +This manpage and regdiff were written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/regpatch.1 b/net/samba416/files/man/regpatch.1 new file mode 100644 index 000000000000..e3e1a228cc8f --- /dev/null +++ b/net/samba416/files/man/regpatch.1 @@ -0,0 +1,81 @@ +'\" t +.\" Title: regpatch +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "REGPATCH" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +regpatch \- Applies registry patches to registry files +.SH "SYNOPSIS" +.HP \w'\fBregpatch\fR\ 'u +\fBregpatch\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location] [patch\-file] +.SH "DESCRIPTION" +.PP +The regpatch utility applies registry patches to Windows registry files\&. The patch files should have the same format as is being used by the regdiff utility and regedit32\&.exe from Windows\&. +.PP +If no patch file is specified on the command line, regpatch attempts to read it from standard input\&. +.SH "OPTIONS" +.PP +\-\-help +.RS 4 +Show list of available options\&. +.RE +.PP +\-\-backend BACKEND +.RS 4 +Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is +\fIdir\fR\&. +.RE +.PP +\-\-credentials=CREDENTIALS +.RS 4 +Credentials to use, if any\&. Password should be separated from user name by a percent sign\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +regdiff, regtree, regshell, gregedit, samba, diff, patch +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +This manpage and regpatch were written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/regshell.1 b/net/samba416/files/man/regshell.1 new file mode 100644 index 000000000000..d15be6b01270 --- /dev/null +++ b/net/samba416/files/man/regshell.1 @@ -0,0 +1,177 @@ +'\" t +.\" Title: regshell +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "REGSHELL" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +regshell \- Windows registry file browser using readline +.SH "SYNOPSIS" +.HP \w'\fBregshell\fR\ 'u +\fBregshell\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location] +.SH "DESCRIPTION" +.PP +regshell is a utility that lets you browse thru a Windows registry file as if you were using a regular unix shell to browse thru a file system\&. +.SH "OPTIONS" +.PP +\-\-help +.RS 4 +Show list of available options\&. +.RE +.PP +\-\-backend BACKEND +.RS 4 +Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is +\fIdir\fR\&. +.RE +.PP +\-\-credentials=CREDENTIALS +.RS 4 +Credentials to use, if any\&. Password should be separated from user name by a percent sign\&. +.RE +.SH "COMMANDS" +.PP +ck|cd +.RS 4 +Go to the specified subkey\&. +.RE +.PP +ch|predef [predefined\-key\-name] +.RS 4 +Go to the specified predefined key\&. +.RE +.PP +list|ls +.RS 4 +List subkeys and values of the current key\&. +.RE +.PP +mkkey|mkdir +.RS 4 +Create a key with the specified +\fIkeyname\fR +as a subkey of the current key\&. +.RE +.PP +rmval|rm +.RS 4 +Delete the specified value\&. +.RE +.PP +rmkey|rmdir +.RS 4 +Delete the specified subkey recursively\&. +.RE +.PP +pwd|pwk +.RS 4 +Print the full name of the current key\&. +.RE +.PP +set|update +.RS 4 +Update the value of a key value\&. Not implemented at the moment\&. +.RE +.PP +help|? +.RS 4 +Print a list of available commands\&. +.RE +.PP +exit|quit +.RS 4 +Leave regshell\&. +.RE +.SH "EXAMPLES" +.PP +Browsing thru a nt4 registry file +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBregshell \-b nt4 NTUSER\&.DAT\fR +$$$PROTO\&.HIV> \fBls\fR +K AppEvents +K Console +K Control Panel +K Environment +K Identities +K Keyboard Layout +K Network +K Printers +K Software +K UNICODE Program Groups +K Windows 3\&.1 Migration Status +$$$PROTO\&.HIV> \fBexit\fR +.fi +.if n \{\ +.RE +.\} +.PP +Listing the subkeys of HKEY_CURRENT_USER\eAppEvents on a remote computer: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBregshell \-\-remote=ncacn_np:aurelia \-c "jelmer%secret"\fR +HKEY_CURRENT_MACHINE> \fBpredef HKEY_CURRENT_USER\fR +HKEY_CURRENT_USER> \fBcd AppEvents\fR +Current path is: HKEY_CURRENT_USER\eAppEvents +HKEY_CURRENT_USER\eAppEvents> \fBls\fR +K EventLabels +K Schemes +HKEY_CURRENT_USER\eAppEvents> \fBexit\fR +.fi +.if n \{\ +.RE +.\} +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +regtree, regdiff, regpatch, gregedit, samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +This manpage and regshell were written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/regtree.1 b/net/samba416/files/man/regtree.1 new file mode 100644 index 000000000000..f245298d49e0 --- /dev/null +++ b/net/samba416/files/man/regtree.1 @@ -0,0 +1,89 @@ +'\" t +.\" Title: regtree +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "REGTREE" "1" "08/09/2022" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +regtree \- Text\-mode registry viewer +.SH "SYNOPSIS" +.HP \w'\fBregtree\fR\ 'u +\fBregtree\fR [\-\-help] [\-\-backend=BACKEND] [\-\-fullpath] [\-\-no\-values] [\-\-credentials=CREDENTIALS] [location] +.SH "DESCRIPTION" +.PP +The regtree utility prints out all the contents of a Windows registry file\&. Subkeys are printed with one level more indentation than their parents\&. +.SH "OPTIONS" +.PP +\-\-help +.RS 4 +Show list of available options\&. +.RE +.PP +\-\-backend BACKEND +.RS 4 +Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is +\fIdir\fR\&. +.RE +.PP +\-\-credentials=CREDENTIALS +.RS 4 +Credentials to use, if any\&. Password should be separated from user name by a percent sign\&. +.RE +.PP +\-\-fullpath +.RS 4 +Print the full path to each key instead of only its name\&. +.RE +.PP +\-\-no\-values +.RS 4 +Don\*(Aqt print values, just keys\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +gregedit, regshell, regdiff, regpatch, samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +This manpage and regtree were written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/rpcclient.1 b/net/samba416/files/man/rpcclient.1 new file mode 100644 index 000000000000..899c53ad68ad --- /dev/null +++ b/net/samba416/files/man/rpcclient.1 @@ -0,0 +1,1961 @@ +'\" t +.\" Title: rpcclient +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "RPCCLIENT" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +rpcclient \- tool for executing client side MS\-RPC functions +.SH "SYNOPSIS" +.HP \w'\ 'u +rpcclient [\-c|\-\-command=COMMANDS] [\-I|\-\-dest\-ip=IP] [\-p|\-\-port=PORT] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] {BINDING\-STRING|HOST} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +rpcclient +is a utility initially developed to test MS\-RPC functionality in Samba itself\&. It has undergone several stages of development and stability\&. Many system administrators have now written scripts around it to manage Windows NT clients from their UNIX workstation\&. +.SH "OPTIONS" +.PP +BINDING\-STRING|HOST +.RS 4 +When connecting to a dcerpc service you need to specify a binding string\&. +.sp +The format is: +.sp +TRANSPORT:host[options] +.sp +where TRANSPORT is either ncacn_np (named pipes) for SMB or ncacn_ip_tcp for DCERPC over TCP/IP\&. +.sp +"host" is an IP or hostname or netbios name\&. If the binding string identifies the server side of an endpoint, "host" may be an empty string\&. See below for more details\&. +.sp +"options" can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto\-determined\&. +.sp +Examples: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_ip_tcp:samba\&.example\&.com[1024]\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_ip_tcp:samba\&.example\&.com[sign,seal,krb5]\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_ip_tcp:samba\&.example\&.com[sign,spnego]\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_np:samba\&.example\&.com\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_np:samba\&.example\&.com[samr]\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_np:samba\&.example\&.com[samr,sign,print]\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncalrpc:/path/to/unix/socket\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI//SAMBA\fR +.RE +.sp +.RE +The supported transports are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_np\fR +\- Connect using named pipes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncacn_ip_tcp\fR +\- Connect over TCP/IP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIncalrpc\fR +\- Connect over local RPC (unix sockets) +.RE +.sp +.RE +The supported options are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsign\fR +\- Use RPC integrity authentication level +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIseal\fR +\- Enable RPC privacy (encryption) authentication level +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIconnect\fR +\- Use RPC connect level authentication (auth, but no sign or seal) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpacket\fR +\- Use RPC packet authentication level +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIspnego\fR +\- Use SPNEGO instead of NTLMSSP authentication +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIntlm\fR +\- Use plain NTLM instead of SPNEGO or NTLMSSP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIkrb5\fR +\- Use Kerberos instead of NTLMSSP authentication +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIschannel\fR +\- Create a schannel connection +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsmb1\fR +\- Use SMB1 for named pipes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsmb2\fR +\- Use SMB2/3 for named pipes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIvalidate\fR +\- Enable the NDR validator +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIprint\fR +\- Enable debug output of packets +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpadcheck\fR +\- Check reply data for non\-zero pad bytes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIbigendian\fR +\- Use big endian for RPC +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIndr64\fR +\- Use NDR64 for RPC +.RE +.sp +.RE +.RE +.PP +\-c|\-\-command= +.RS 4 +Execute semicolon separated commands (listed below) +.RE +.PP +\-I|\-\-dest\-ip IP\-address +.RS 4 +\fIIP address\fR +is the address of the server to connect to\&. It should be specified in standard "a\&.b\&.c\&.d" notation\&. +.sp +Normally the client would attempt to locate a named SMB/CIFS server by looking it up via the NetBIOS name resolution mechanism described above in the +\fIname resolve order\fR +parameter above\&. Using this parameter will force the client to assume that the server is on the machine with the specified IP address and the NetBIOS name component of the resource being connected to will be ignored\&. +.sp +There is no default for this parameter\&. If not supplied, it will be determined automatically by the client as described above\&. +.RE +.PP +\-p|\-\-port port +.RS 4 +This number is the TCP port number that will be used when making connections to the server\&. The standard (well\-known) TCP port number for an SMB/CIFS server is 139, which is the default\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER +.RS 4 +This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best ist to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the +\fBlmhosts\fR(5) +for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR: Do a standard host name to IP address resolution, using the system +/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR: Query a name with the IP address listed in the +\fIwins server\fR +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the +\fIinterfaces\fR +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +If this parameter is not set then the name resolve order defined in the +smb\&.conf +file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&. +.sp +The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the +\m[blue]\fBname resolve order\fR\m[] +parameter of the +smb\&.conf +file, the name resolution methods will be attempted in this order\&. +.RE +.PP +\-O|\-\-socket\-options=SOCKETOPTIONS +.RS 4 +TCP socket options to set on the client socket\&. See the socket options parameter in the +smb\&.conf +manual page for the list of valid options\&. +.RE +.PP +\-m|\-\-max\-protocol=MAXPROTOCOL +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient max protocol\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-n|\-\-netbiosname=NETBIOSNAME +.RS 4 +This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the +\m[blue]\fBnetbios name\fR\m[] +parameter in the +smb\&.conf +file\&. However, a command line setting will take precedence over settings in +smb\&.conf\&. +.RE +.PP +\-\-netbios\-scope=SCOPE +.RS 4 +This specifies a NetBIOS scope that +nmblookup +will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are +\fIvery\fR +rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. +.RE +.PP +\-W|\-\-workgroup=WORKGROUP +.RS 4 +Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBworkgroup\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-r|\-\-realm=REALM +.RS 4 +Set the realm for the domain\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBrealm\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "COMMANDS" +.SS "LSARPC" +.PP +lsaquery +.RS 4 +Query info policy +.RE +.PP +lookupsids +.RS 4 +Convert SIDs to names +.RE +.PP +lookupsids3 +.RS 4 +Convert SIDs to names +.RE +.PP +lookupsids_level +.RS 4 +Convert SIDs to names +.RE +.PP +lookupnames +.RS 4 +Convert names to SIDs +.RE +.PP +lookupnames4 +.RS 4 +Convert names to SIDs +.RE +.PP +lookupnames_level +.RS 4 +Convert names to SIDs +.RE +.PP +enumtrust +.RS 4 +Enumerate trusted domains +.RE +.PP +enumprivs +.RS 4 +Enumerate privileges +.RE +.PP +getdispname +.RS 4 +Get the privilege name +.RE +.PP +lsaenumsid +.RS 4 +Enumerate the LSA SIDS +.RE +.PP +lsacreateaccount +.RS 4 +Create a new lsa account +.RE +.PP +lsaenumprivsaccount +.RS 4 +Enumerate the privileges of an SID +.RE +.PP +lsaenumacctrights +.RS 4 +Enumerate the rights of an SID +.RE +.PP +lsaaddpriv +.RS 4 +Assign a privilege to a SID +.RE +.PP +lsadelpriv +.RS 4 +Revoke a privilege from a SID +.RE +.PP +lsaaddacctrights +.RS 4 +Add rights to an account +.RE +.PP +lsaremoveacctrights +.RS 4 +Remove rights from an account +.RE +.PP +lsalookupprivvalue +.RS 4 +Get a privilege value given its name +.RE +.PP +lsaquerysecobj +.RS 4 +Query LSA security object +.RE +.PP +lsaquerytrustdominfo +.RS 4 +Query LSA trusted domains info (given a SID) +.RE +.PP +lsaquerytrustdominfobyname +.RS 4 +Query LSA trusted domains info (given a name), only works for Windows > 2k +.RE +.PP +lsaquerytrustdominfobysid +.RS 4 +Query LSA trusted domains info (given a SID) +.RE +.PP +lsasettrustdominfo +.RS 4 +Set LSA trusted domain info +.RE +.PP +getusername +.RS 4 +Get username +.RE +.PP +createsecret +.RS 4 +Create Secret +.RE +.PP +deletesecret +.RS 4 +Delete Secret +.RE +.PP +querysecret +.RS 4 +Query Secret +.RE +.PP +setsecret +.RS 4 +Set Secret +.RE +.PP +retrieveprivatedata +.RS 4 +Retrieve Private Data +.RE +.PP +storeprivatedata +.RS 4 +Store Private Data +.RE +.PP +createtrustdom +.RS 4 +Create Trusted Domain +.RE +.PP +deletetrustdom +.RS 4 +Delete Trusted Domain +.RE +.SS "LSARPC\-DS" +.PP +dsroledominfo +.RS 4 +Get Primary Domain Information +.RE +.SS "DFS" +.PP +dfsversion +.RS 4 +Query DFS support +.RE +.PP +dfsadd +.RS 4 +Add a DFS share +.RE +.PP +dfsremove +.RS 4 +Remove a DFS share +.RE +.PP +dfsgetinfo +.RS 4 +Query DFS share info +.RE +.PP +dfsenum +.RS 4 +Enumerate dfs shares +.RE +.PP +dfsenumex +.RS 4 +Enumerate dfs shares +.RE +.SS "SHUTDOWN" +.PP +shutdowninit +.RS 4 +syntax: shutdown [\-m message] +.RE +.PP +shutdownabort +.RS 4 +syntax: shutdownabort +.RE +.SS "SRVSVC" +.PP +srvinfo +.RS 4 +Server query info +.RE +.PP +netshareenum +.RS 4 +Enumerate shares +.RE +.PP +netshareenumall +.RS 4 +Enumerate all shares +.RE +.PP +netsharegetinfo +.RS 4 +Get Share Info +.RE +.PP +netsharesetinfo +.RS 4 +Set Share Info +.RE +.PP +netsharesetdfsflags +.RS 4 +Set DFS flags +.RE +.PP +netfileenum +.RS 4 +Enumerate open files +.RE +.PP +netremotetod +.RS 4 +Fetch remote time of day +.RE +.PP +netnamevalidate +.RS 4 +Validate sharename +.RE +.PP +netfilegetsec +.RS 4 +Get File security +.RE +.PP +netsessdel +.RS 4 +Delete Session +.RE +.PP +netsessenum +.RS 4 +Enumerate Sessions +.RE +.PP +netdiskenum +.RS 4 +Enumerate Disks +.RE +.PP +netconnenum +.RS 4 +Enumerate Connections +.RE +.PP +netshareadd +.RS 4 +Add share +.RE +.PP +netsharedel +.RS 4 +Delete share +.RE +.SS "SAMR" +.PP +queryuser +.RS 4 +Query user info +.RE +.PP +querygroup +.RS 4 +Query group info +.RE +.PP +queryusergroups +.RS 4 +Query user groups +.RE +.PP +queryuseraliases +.RS 4 +Query user aliases +.RE +.PP +querygroupmem +.RS 4 +Query group membership +.RE +.PP +queryaliasmem +.RS 4 +Query alias membership +.RE +.PP +queryaliasinfo +.RS 4 +Query alias info +.RE +.PP +deletealias +.RS 4 +Delete an alias +.RE +.PP +querydispinfo +.RS 4 +Query display info +.RE +.PP +querydispinfo2 +.RS 4 +Query display info +.RE +.PP +querydispinfo3 +.RS 4 +Query display info +.RE +.PP +querydominfo +.RS 4 +Query domain info +.RE +.PP +enumdomusers +.RS 4 +Enumerate domain users +.RE +.PP +enumdomgroups +.RS 4 +Enumerate domain groups +.RE +.PP +enumalsgroups +.RS 4 +Enumerate alias groups +.RE +.PP +enumdomains +.RS 4 +Enumerate domains +.RE +.PP +createdomuser +.RS 4 +Create domain user +.RE +.PP +createdomgroup +.RS 4 +Create domain group +.RE +.PP +createdomalias +.RS 4 +Create domain alias +.RE +.PP +samlookupnames +.RS 4 +Look up names +.RE +.PP +samlookuprids +.RS 4 +Look up names +.RE +.PP +deletedomgroup +.RS 4 +Delete domain group +.RE +.PP +deletedomuser +.RS 4 +Delete domain user +.RE +.PP +samquerysecobj +.RS 4 +Query SAMR security object +.RE +.PP +getdompwinfo +.RS 4 +Retrieve domain password info +.RE +.PP +getusrdompwinfo +.RS 4 +Retrieve user domain password info +.RE +.PP +lookupdomain +.RS 4 +Lookup Domain Name +.RE +.PP +chgpasswd +.RS 4 +Change user password +.RE +.PP +chgpasswd2 +.RS 4 +Change user password +.RE +.PP +chgpasswd3 +.RS 4 +Change user password +.RE +.PP +getdispinfoidx +.RS 4 +Get Display Information Index +.RE +.PP +setuserinfo +.RS 4 +Set user info +.RE +.PP +setuserinfo2 +.RS 4 +Set user info2 +.RE +.SS "SPOOLSS" +.PP +adddriver [] +.RS 4 +Execute an AddPrinterDriver() RPC to install the printer driver information on the server\&. Note that the driver files should already exist in the directory returned by +getdriverdir\&. Possible values for +\fIarch\fR +are the same as those for the +getdriverdir +command\&. The +\fIconfig\fR +parameter is defined as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Long Driver Name:\e +Driver File Name:\e +Data File Name:\e +Config File Name:\e +Help File Name:\e +Language Monitor Name:\e +Default Data Type:\e +Comma Separated list of Files +.fi +.if n \{\ +.RE +.\} +.sp +Any empty fields should be enter as the string "NULL"\&. +.sp +Samba does not need to support the concept of Print Monitors since these only apply to local printers whose driver can make use of a bi\-directional link for communication\&. This field should be "NULL"\&. On a remote NT print server, the Print Monitor for a driver must already be installed prior to adding the driver or else the RPC will fail\&. +.sp +The +\fIversion\fR +parameter lets you specify the printer driver version number\&. If omitted, the default driver version for the specified architecture will be used\&. This option can be used to upload Windows 2000 (version 3) printer drivers\&. +.RE +.PP +addprinter +.RS 4 +Add a printer on the remote server\&. This printer will be automatically shared\&. Be aware that the printer driver must already be installed on the server (see +adddriver) and the +\fIport\fRmust be a valid port name (see +enumports\&. +.RE +.PP +deldriver +.RS 4 +Delete the specified printer driver for all architectures\&. This does not delete the actual driver files from the server, only the entry from the server\*(Aqs list of drivers\&. +.RE +.PP +deldriverex [architecture] [version] [flags] +.RS 4 +Delete the specified printer driver and optionally files associated with the driver\&. You can limit this action to a specific architecture and a specific version\&. If no architecture is given, all driver files of that driver will be deleted\&. +\fIflags\fR +correspond to numeric DPD_* values, i\&.e\&. a value of 3 requests (DPD_DELETE_UNUSED_FILES | DPD_DELETE_SPECIFIC_VERSION)\&. +.RE +.PP +enumdata +.RS 4 +Enumerate all printer setting data stored on the server\&. On Windows NT clients, these values are stored in the registry, while Samba servers store them in the printers TDB\&. This command corresponds to the MS Platform SDK GetPrinterData() function (* This command is currently unimplemented)\&. +.RE +.PP +enumdataex +.RS 4 +Enumerate printer data for a key +.RE +.PP +enumkey +.RS 4 +Enumerate printer keys +.RE +.PP +enumjobs +.RS 4 +List the jobs and status of a given printer\&. This command corresponds to the MS Platform SDK EnumJobs() function +.RE +.PP +getjob +.RS 4 +Get print job +.RE +.PP +setjob +.RS 4 +Set print job +.RE +.PP +enumports [level] +.RS 4 +Executes an EnumPorts() call using the specified info level\&. Currently only info levels 1 and 2 are supported\&. +.RE +.PP +enumdrivers [level] +.RS 4 +Execute an EnumPrinterDrivers() call\&. This lists the various installed printer drivers for all architectures\&. Refer to the MS Platform SDK documentation for more details of the various flags and calling options\&. Currently supported info levels are 1, 2, and 3\&. +.RE +.PP +enumprinters [level] +.RS 4 +Execute an EnumPrinters() call\&. This lists the various installed and share printers\&. Refer to the MS Platform SDK documentation for more details of the various flags and calling options\&. Currently supported info levels are 1, 2 and 5\&. +.RE +.PP +getdata +.RS 4 +Retrieve the data for a given printer setting\&. See the +enumdata +command for more information\&. This command corresponds to the GetPrinterData() MS Platform SDK function\&. +.RE +.PP +getdataex +.RS 4 +Get printer driver data with keyname +.RE +.PP +getdriver +.RS 4 +Retrieve the printer driver information (such as driver file, config file, dependent files, etc\&.\&.\&.) for the given printer\&. This command corresponds to the GetPrinterDriver() MS Platform SDK function\&. Currently info level 1, 2, and 3 are supported\&. +.RE +.PP +getdriverdir +.RS 4 +Execute a GetPrinterDriverDirectory() RPC to retrieve the SMB share name and subdirectory for storing printer driver files for a given architecture\&. Possible values for +\fIarch\fR +are "Windows 4\&.0" (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows Alpha_AXP", and "Windows NT R4000"\&. +.RE +.PP +getdriverpackagepath +.RS 4 +Get print driver package download directory +.RE +.PP +getprinter +.RS 4 +Retrieve the current printer information\&. This command corresponds to the GetPrinter() MS Platform SDK function\&. +.RE +.PP +openprinter +.RS 4 +Execute an OpenPrinterEx() and ClosePrinter() RPC against a given printer\&. +.RE +.PP +openprinter_ex +.RS 4 +Open printer handle +.RE +.PP +setdriver +.RS 4 +Execute a SetPrinter() command to update the printer driver associated with an installed printer\&. The printer driver must already be correctly installed on the print server\&. +.sp +See also the +enumprinters +and +enumdrivers +commands for obtaining a list of of installed printers and drivers\&. +.RE +.PP +getprintprocdir +.RS 4 +Get print processor directory +.RE +.PP +addform +.RS 4 +Add form +.RE +.PP +setform +.RS 4 +Set form +.RE +.PP +getform +.RS 4 +Get form +.RE +.PP +deleteform +.RS 4 +Delete form +.RE +.PP +enumforms +.RS 4 +Enumerate form +.RE +.PP +setprinter +.RS 4 +Set printer comment +.RE +.PP +setprinterdata +.RS 4 +Set REG_SZ printer data +.RE +.PP +setprintername +.RS 4 +Set printer name +.RE +.PP +rffpcnex +.RS 4 +Rffpcnex test +.RE +.PP +printercmp +.RS 4 +Printer comparison test +.RE +.PP +enumprocs +.RS 4 +Enumerate Print Processors +.RE +.PP +enumprocdatatypes +.RS 4 +Enumerate Print Processor Data Types +.RE +.PP +enummonitors +.RS 4 +Enumerate Print Monitors +.RE +.PP +createprinteric +.RS 4 +Create Printer IC +.RE +.PP +playgdiscriptonprinteric +.RS 4 +Create Printer IC +.RE +.PP +getcoreprinterdrivers +.RS 4 +Get CorePrinterDriver +.RE +.PP +enumpermachineconnections +.RS 4 +Enumerate Per Machine Connections +.RE +.PP +addpermachineconnection +.RS 4 +Add Per Machine Connection +.RE +.PP +delpermachineconnection +.RS 4 +Delete Per Machine Connection +.RE +.SS "NETLOGON" +.PP +logonctrl2 +.RS 4 +Logon Control 2 +.RE +.PP +getanydcname +.RS 4 +Get trusted DC name +.RE +.PP +getdcname +.RS 4 +Get trusted PDC name +.RE +.PP +dsr_getdcname +.RS 4 +Get trusted DC name +.RE +.PP +dsr_getdcnameex +.RS 4 +Get trusted DC name +.RE +.PP +dsr_getdcnameex2 +.RS 4 +Get trusted DC name +.RE +.PP +dsr_getsitename +.RS 4 +Get sitename +.RE +.PP +dsr_getforesttrustinfo +.RS 4 +Get Forest Trust Info +.RE +.PP +logonctrl +.RS 4 +Logon Control +.RE +.PP +samlogon +.RS 4 +Sam Logon +.RE +.PP +change_trust_pw +.RS 4 +Change Trust Account Password +.RE +.PP +gettrustrid +.RS 4 +Get trust rid +.RE +.PP +dsr_enumtrustdom +.RS 4 +Enumerate trusted domains +.RE +.PP +dsenumdomtrusts +.RS 4 +Enumerate all trusted domains in an AD forest +.RE +.PP +deregisterdnsrecords +.RS 4 +Deregister DNS records +.RE +.PP +netrenumtrusteddomains +.RS 4 +Enumerate trusted domains +.RE +.PP +netrenumtrusteddomainsex +.RS 4 +Enumerate trusted domains +.RE +.PP +getdcsitecoverage +.RS 4 +Get the Site\-Coverage from a DC +.RE +.PP +capabilities +.RS 4 +Return Capabilities +.RE +.PP +logongetdomaininfo +.RS 4 +Return LogonGetDomainInfo +.RE +.SS "FSRVP" +.PP +fss_is_path_sup +.RS 4 +Check whether a share supports shadow\-copy +.RE +.PP +fss_get_sup_version +.RS 4 +Get supported FSRVP version from server +.RE +.PP +fss_create_expose +.RS 4 +Request shadow\-copy creation and exposure +.RE +.PP +fss_delete +.RS 4 +Request shadow\-copy share deletion +.RE +.PP +fss_has_shadow_copy +.RS 4 +Check for an associated share shadow\-copy +.RE +.PP +fss_get_mapping +.RS 4 +Get shadow\-copy share mapping information +.RE +.PP +fss_recovery_complete +.RS 4 +Flag read\-write snapshot as recovery complete, +.RE +.SS "CLUSAPI" +.PP +clusapi_open_cluster +.RS 4 +Open cluster +.RE +.PP +clusapi_get_cluster_name +.RS 4 +Get cluster name +.RE +.PP +clusapi_get_cluster_version +.RS 4 +Get cluster version +.RE +.PP +clusapi_get_quorum_resource +.RS 4 +Get quorum resource +.RE +.PP +clusapi_create_enum +.RS 4 +Create enum query +.RE +.PP +clusapi_create_enumex +.RS 4 +Create enumex query +.RE +.PP +clusapi_open_resource +.RS 4 +Open cluster resource +.RE +.PP +clusapi_online_resource +.RS 4 +Set cluster resource online +.RE +.PP +clusapi_offline_resource +.RS 4 +Set cluster resource offline +.RE +.PP +clusapi_get_resource_state +.RS 4 +Get cluster resource state +.RE +.PP +clusapi_get_cluster_version2 +.RS 4 +Get cluster version2 +.RE +.PP +clusapi_pause_node +.RS 4 +Pause cluster node +.RE +.PP +clusapi_resume_node +.RS 4 +Resume cluster node +.RE +.SS "DRSUAPI" +.PP +dscracknames +.RS 4 +Crack Name +.RE +.PP +dsgetdcinfo +.RS 4 +Get Domain Controller Info +.RE +.PP +dsgetncchanges +.RS 4 +Get NC Changes +.RE +.PP +dswriteaccountspn +.RS 4 +Write Account SPN +.RE +.SS "ECHO" +.PP +echoaddone +.RS 4 +Add one to a number +.RE +.PP +echodata +.RS 4 +Echo data +.RE +.PP +sinkdata +.RS 4 +Sink data +.RE +.PP +sourcedata +.RS 4 +Source data +.RE +.SS "EPMAPPER" +.PP +epmmap +.RS 4 +Map a binding +.RE +.PP +epmlookup +.RS 4 +Lookup bindings +.RE +.SS "EVENTLOG" +.PP +eventlog_readlog +.RS 4 +Read Eventlog +.RE +.PP +eventlog_numrecord +.RS 4 +Get number of records +.RE +.PP +eventlog_oldestrecord +.RS 4 +Get oldest record +.RE +.PP +eventlog_reportevent +.RS 4 +Report event +.RE +.PP +eventlog_reporteventsource +.RS 4 +Report event and source +.RE +.PP +eventlog_registerevsource +.RS 4 +Register event source +.RE +.PP +eventlog_backuplog +.RS 4 +Backup Eventlog File +.RE +.PP +eventlog_loginfo +.RS 4 +Get Eventlog Information +.RE +.SS "IRemoteWinspool" +.PP +winspool_AsyncOpenPrinter +.RS 4 +Open printer handle +.RE +.PP +winspool_AsyncCorePrinterDriverInstalled +.RS 4 +Query Core Printer Driver Installed +.RE +.SS "NTSVCS" +.PP +ntsvcs_getversion +.RS 4 +Query NTSVCS version +.RE +.PP +ntsvcs_validatedevinst +.RS 4 +Query NTSVCS device instance +.RE +.PP +ntsvcs_hwprofflags +.RS 4 +Query NTSVCS HW prof flags +.RE +.PP +ntsvcs_hwprofinfo +.RS 4 +Query NTSVCS HW prof info +.RE +.PP +ntsvcs_getdevregprop +.RS 4 +Query NTSVCS device registry property +.RE +.PP +ntsvcs_getdevlistsize +.RS 4 +Query NTSVCS device list size +.RE +.PP +ntsvcs_getdevlist +.RS 4 +Query NTSVCS device list +.RE +.SS "MDSSVC" +.PP +fetch_properties +.RS 4 +Fetch connection properties +.RE +.PP +fetch_attributes +.RS 4 +Fetch attributes for a CNID +.RE +.SS "WINREG" +.PP +winreg_enumkey +.RS 4 +Enumerate Keys +.RE +.PP +querymultiplevalues +.RS 4 +Query multiple values +.RE +.PP +querymultiplevalues2 +.RS 4 +Query multiple values +.RE +.SS "WITNESS" +.PP +GetInterfaceList +.RS 4 +List the interfaces to which witness client connections can be made +.RE +.PP +Register +.RS 4 +Register for resource state change notifications of a NetName and IPAddress +.RE +.PP +UnRegister +.RS 4 +Unregister for notifications from the server +.RE +.PP +AsyncNotify +.RS 4 +Request notification of registered resource changes from the server +.RE +.PP +RegisterEx +.RS 4 +Register for resource state change notifications of a NetName, ShareName and multiple IPAddresses +.RE +.SS "WKSSVC" +.PP +wkssvc_wkstagetinfo +.RS 4 +Query WKSSVC Workstation Information +.RE +.PP +wkssvc_getjoininformation +.RS 4 +Query WKSSVC Join Information +.RE +.PP +wkssvc_messagebuffersend +.RS 4 +Send WKSSVC message +.RE +.PP +wkssvc_enumeratecomputernames +.RS 4 +Enumerate WKSSVC computer names +.RE +.PP +wkssvc_enumerateusers +.RS 4 +Enumerate WKSSVC users +.RE +.SS "GENERAL OPTIONS" +.PP +help +.RS 4 +Get help on commands +.RE +.PP +? +.RS 4 +Get help on commands +.RE +.PP +debuglevel +.RS 4 +Set debug level +.RE +.PP +debug +.RS 4 +Set debug level +.RE +.PP +list +.RS 4 +List available commands on pipe +.RE +.PP +exit +.RS 4 +Exit program +.RE +.PP +quit +.RS 4 +Exit program +.RE +.PP +sign +.RS 4 +Force RPC pipe connections to be signed +.RE +.PP +seal +.RS 4 +Force RPC pipe connections to be sealed +.RE +.PP +packet +.RS 4 +Force RPC pipe connections with packet authentication level +.RE +.PP +schannel +.RS 4 +Force RPC pipe connections to be sealed with \*(Aqschannel\*(Aq\&. Force RPC pipe connections to be sealed with \*(Aqschannel\*(Aq\&. Assumes valid machine account to this domain controller\&. +.RE +.PP +schannelsign +.RS 4 +Force RPC pipe connections to be signed (not sealed) with \*(Aqschannel\*(Aq\&. Assumes valid machine account to this domain controller\&. +.RE +.PP +timeout +.RS 4 +Set timeout (in milliseconds) for RPC operations +.RE +.PP +transport +.RS 4 +Choose ncacn transport for RPC operations +.RE +.PP +none +.RS 4 +Force RPC pipe connections to have no special properties +.RE +.SH "BUGS" +.PP +rpcclient +is designed as a developer testing tool and may not be robust in certain areas (such as command line parsing)\&. It has been known to generate a core dump upon failures when invalid parameters where passed to the interpreter\&. +.PP +From Luke Leighton\*(Aqs original rpcclient man page: +.PP +\fIWARNING!\fR +The MSRPC over SMB code has been developed from examining Network traces\&. No documentation is available from the original creators (Microsoft) on how MSRPC over SMB works, or how the individual MSRPC services work\&. Microsoft\*(Aqs implementation of these services has been demonstrated (and reported) to be\&.\&.\&. a bit flaky in places\&. +.PP +The development of Samba\*(Aqs implementation is also a bit rough, and as more of the services are understood, it can even result in versions of +\fBsmbd\fR(8) +and +\fBrpcclient\fR(1) +that are incompatible for some commands or services\&. Additionally, the developers are sending reports to Microsoft, and problems found or reported to Microsoft are fixed in Service Packs, which may result in incompatibilities\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The original rpcclient man page was written by Matthew Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&. diff --git a/net/samba416/files/man/samba-gpupdate.8 b/net/samba416/files/man/samba-gpupdate.8 new file mode 100644 index 000000000000..17e27207ebba --- /dev/null +++ b/net/samba416/files/man/samba-gpupdate.8 @@ -0,0 +1,122 @@ +'\" t +.\" Title: SAMBA_GPOUPDATE +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 2017-07-11 +.\" Manual: System Administration tools +.\" Source: Samba 4.8.0 +.\" Language: English +.\" +.TH "SAMBA_GPOUPDATE" "8" "2017\-07\-11" "Samba 4\&.8\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +samba-gpupdate \- apply group policy +.SH "SYNOPSIS" +.HP \w'\fBsamba\-gpupdate\fR\ 'u +\fBsamba\-gpupdate\fR +.HP \w'\fBsamba\-gpupdate\fR\ 'u +\fBsamba\-gpupdate\fR [\fIoptions\fR] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +\fBsamba\-gpupdate\fR +a script for applying and unapplying Group Policy\&. This applies password policies (minimum/maximum password age, minimum password length, and password complexity), kerberos policies (user/service ticket lifetime and renew lifetime), smb\&.conf policies, hourly/daily/weekly/monthly cron scripts, Sudo Privileges, Message of the Day and Logon Prompt messages, etc\&. +.SH "OPTIONS" +.PP +\fB\-h\fR, +\fB\-\-help\fR +show this help message and exit +.PP +\fB\-H \fRURL, +\fB\-\-url\fR=\fIURL\fR +URL for the samdb +.PP +\fB\-X\fR, +\fB\-\-unapply\fR +Unapply Group Policy +.PP +\fB\-\-target\fR +{Computer | User} +.PP +\fB\-\-force\fR +Reapplies all policy settings +.PP +\fB\-\-rsop\fR +Print the Resultant Set of Policy +.PP +Samba Common Options: +.PP +\fB\-s \fRFILE, +\fB\-\-configfile\fR=\fIFILE\fR +Configuration file +.PP +\fB\-d \fRDEBUGLEVEL, +\fB\-\-debuglevel\fR=\fIDEBUGLEVEL\fR +debug level +.PP +\fB\-\-option\fR=\fIOPTION\fR +set smb\&.conf option from command line +.PP +\fB\-\-realm\fR=\fIREALM\fR +set the realm name +.PP +Version Options: +.PP +\fB\-V\fR, +\fB\-\-version\fR +Display version number +.PP +Credentials Options: +.PP +\fB\-\-simple\-bind\-dn\fR=\fIDN\fR +DN to use for a simple bind +.PP +\fB\-\-password\fR=\fIPASSWORD\fR +Password +.PP +\fB\-U \fRUSERNAME, +\fB\-\-username\fR=\fIUSERNAME\fR +Username +.PP +\fB\-W \fRWORKGROUP, +\fB\-\-workgroup\fR=\fIWORKGROUP\fR +Workgroup +.PP +\fB\-N\fR, +\fB\-\-no\-pass\fR +Don\*(Aqt ask for a password +.PP +\fB\-k \fRKERBEROS, +\fB\-\-kerberos\fR=\fIKERBEROS\fR +Use Kerberos +.PP +\fB\-\-ipaddress\fR=\fIIPADDRESS\fR +IP address of server +.PP +\fB\-P\fR, +\fB\-\-machine\-pass\fR +Use stored machine account password +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/samba.7 b/net/samba416/files/man/samba.7 new file mode 100644 index 000000000000..e95fad49abb5 --- /dev/null +++ b/net/samba416/files/man/samba.7 @@ -0,0 +1,254 @@ +'\" t +.\" Title: samba +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: Miscellanea +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SAMBA" "7" "08/09/2022" "Samba 4\&.16\&.4" "Miscellanea" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +samba \- A Windows AD and SMB/CIFS fileserver for UNIX +.SH "SYNOPSIS" +.HP \w'\ 'u +samba +.SH "DESCRIPTION" +.PP +The Samba software suite is a collection of programs that implements the Server Message Block (commonly abbreviated as SMB) protocol for UNIX systems and provides Active Directory services\&. The first version of the SMB protocol is sometimes also referred to as the Common Internet File System (CIFS)\&. For a more thorough description, see +http://www\&.ubiqx\&.org/cifs/\&. Samba also implements the NetBIOS protocol in nmbd\&. +.PP +\fBsamba\fR(8) +.RS 4 +The +samba +daemon provides the Active Directory services and file and print services to SMB clients\&. The configuration file for this daemon is described in +\fBsmb.conf\fR(5)\&. +.RE +.PP +\fBsmbd\fR(8) +.RS 4 +The +smbd +daemon provides the file and print services to SMB clients\&. The configuration file for this daemon is described in +\fBsmb.conf\fR(5)\&. +.RE +.PP +\fBnmbd\fR(8) +.RS 4 +The +nmbd +daemon provides NetBIOS nameservice and browsing support\&. The configuration file for this daemon is described in +\fBsmb.conf\fR(5)\&. +.RE +.PP +\fBwinbindd\fR(8) +.RS 4 +winbindd +is a daemon that is used for integrating authentication and the user database into unix\&. +.RE +.PP +\fBsmbclient\fR(1) +.RS 4 +The +smbclient +program implements a simple ftp\-like client\&. This is useful for accessing SMB shares on other compatible SMB servers, and can also be used to allow a UNIX box to print to a printer attached to any SMB server\&. +.RE +.PP +\fBsamba-tool\fR(8) +.RS 4 +The +samba\-tool +is the main Samba Administration tool regarding Active Directory services\&. +.RE +.PP +\fBtestparm\fR(1) +.RS 4 +The +testparm +utility is a simple syntax checker for Samba\*(Aqs +\fBsmb.conf\fR(5) +configuration file\&. In AD server mode +samba\-tool testparm +should be used though\&. +.RE +.PP +\fBsmbstatus\fR(1) +.RS 4 +The +smbstatus +tool provides access to information about the current connections to +smbd\&. +.RE +.PP +\fBnmblookup\fR(1) +.RS 4 +The +nmblookup +tool allows NetBIOS name queries to be made\&. +.RE +.PP +\fBsmbpasswd\fR(8) +.RS 4 +The +smbpasswd +command is a tool for setting passwords on local Samba but also on remote SMB servers\&. +.RE +.PP +\fBsmbcacls\fR(1) +.RS 4 +The +smbcacls +command is a tool to set ACL\*(Aqs on remote SMB servers\&. +.RE +.PP +\fBsmbtree\fR(1) +.RS 4 +The +smbtree +command is a text\-based network neighborhood tool\&. +.RE +.PP +\fBsmbtar\fR(1) +.RS 4 +The +smbtar +can make backups of data directly from SMB servers\&. +.RE +.PP +\fBsmbspool\fR(8) +.RS 4 +smbspool +is a helper utility for printing on printers connected to SMB servers\&. +.RE +.PP +\fBsmbcontrol\fR(1) +.RS 4 +smbcontrol +is a utility that can change the behaviour of running +samba, +smbd, +nmbd +and +winbindd +daemons\&. +.RE +.PP +\fBrpcclient\fR(1) +.RS 4 +rpcclient +is a utility that can be used to execute RPC commands on remote SMB servers\&. +.RE +.PP +\fBpdbedit\fR(8) +.RS 4 +The +pdbedit +command can be used to maintain the local user database on a Samba server\&. +.RE +.PP +\fBnet\fR(8) +.RS 4 +The +net +command is the main administration tool for Samba member and standalone servers\&. +.RE +.PP +\fBwbinfo\fR(1) +.RS 4 +wbinfo +is a utility that retrieves and stores information related to winbind\&. +.RE +.PP +\fBprofiles\fR(1) +.RS 4 +profiles +is a command\-line utility that can be used to replace all occurrences of a certain SID with another SID\&. +.RE +.PP +\fBlog2pcap\fR(1) +.RS 4 +log2pcap +is a utility for generating pcap trace files from Samba log files\&. +.RE +.PP +\fBvfstest\fR(1) +.RS 4 +vfstest +is a utility that can be used to test vfs modules\&. +.RE +.PP +\fBntlm_auth\fR(1) +.RS 4 +ntlm_auth +is a helper\-utility for external programs wanting to do NTLM\-authentication\&. +.RE +.PP +\fBsmbcquotas\fR(1) +.RS 4 +smbcquotas +is a tool to manage quotas on remote SMB servers\&. +.RE +.SH "COMPONENTS" +.PP +The Samba suite is made up of several components\&. Each component is described in a separate manual page\&. It is strongly recommended that you read the documentation that comes with Samba and the manual pages of those components that you use\&. If the manual pages and documents aren\*(Aqt clear enough then please visit +https://devel\&.samba\&.org +for information on how to file a bug report or submit a patch\&. +.PP +If you require help, visit the Samba webpage at +https://www\&.samba\&.org/ +and explore the many option available to you\&. +.SH "AVAILABILITY" +.PP +The Samba software suite is licensed under the GNU Public License(GPL)\&. A copy of that license should have come with the package in the file COPYING\&. You are encouraged to distribute copies of the Samba suite, but please obey the terms of this license\&. +.PP +The latest version of the Samba suite can be obtained from +https://download\&.samba\&.org/pub/samba/\&. +.PP +The Samba Wiki at +https://wiki\&.samba\&.org +has also a lot of useful information\&. On the Samba mailing list at +https://lists\&.samba\&.org +you can find a lot of information in the archives and you can subscribe to the samba list and ask for help or discuss things\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "CONTRIBUTIONS" +.PP +If you wish to contribute to the Samba project, then I suggest you join the Samba mailing list at +https://lists\&.samba\&.org\&. +.PP +If you have patches to submit, visit +https://devel\&.samba\&.org/ +for information on how to do it properly\&. We prefer patches in +git format\-patch +format\&. +.SH "CONTRIBUTORS" +.PP +Contributors to the project are now too numerous to mention here but all deserve the thanks of all Samba users\&. To see a full list, look at the +change\-log +in the source package for the pre\-CVS changes and at +https://git\&.samba\&.org/ +for the contributors to Samba post\-GIT\&. GIT is the Open Source source code control system used by the Samba Team to develop Samba\&. The project would have been unmanageable without it\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/sharesec.1 b/net/samba416/files/man/sharesec.1 new file mode 100644 index 000000000000..f768a0f724d1 --- /dev/null +++ b/net/samba416/files/man/sharesec.1 @@ -0,0 +1,364 @@ +'\" t +.\" Title: sharesec +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SHARESEC" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +sharesec \- Set or get share ACLs +.SH "SYNOPSIS" +.HP \w'\ 'u +sharesec {sharename} [\-r,\ \-\-remove=ACL] [\-m,\ \-\-modify=ACL] [\-a,\ \-\-add=ACL] [\-R,\ \-\-replace=ACLs] [\-D,\ \-\-delete] [\-v,\ \-\-view] [\-\-view\-all] [\-M,\ \-\-machine\-sid] [\-F,\ \-\-force] [\-d,\ \-\-debuglevel=DEBUGLEVEL] [\-s,\ \-\-configfile=CONFIGFILE] [\-l,\ \-\-log\-basename=LOGFILEBASE] [\-S,\ \-\-setsddl=STRING] [\-\-viewsddl] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +The +sharesec +program manipulates share permissions on SMB file shares\&. +.SH "OPTIONS" +.PP +The following options are available to the +sharesec +program\&. The format of ACLs is described in the section ACL FORMAT +.PP +\-a|\-\-add=ACL +.RS 4 +Add the ACEs specified to the ACL list\&. +.RE +.PP +\-D|\-\-delete +.RS 4 +Delete the entire security descriptor\&. +.RE +.PP +\-F|\-\-force +.RS 4 +Force storing the ACL\&. +.RE +.PP +\-m|\-\-modify=ACL +.RS 4 +Modify existing ACEs\&. +.RE +.PP +\-M|\-\-machine\-sid +.RS 4 +Initialize the machine SID\&. +.RE +.PP +\-r|\-\-remove=ACL +.RS 4 +Remove ACEs\&. +.RE +.PP +\-R|\-\-replace=ACLS +.RS 4 +Overwrite an existing share permission ACL\&. +.RE +.PP +\-v|\-\-view +.RS 4 +List a share acl +.RE +.PP +\-\-view\-all +.RS 4 +List all share acls +.RE +.PP +\-S|\-\-setsddl=STRING +.RS 4 +Set security descriptor by providing ACL in SDDL format\&. +.RE +.PP +\-\-viewsddl +.RS 4 +List a share acl in SDDL format\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.SH "ACL FORMAT" +.PP +The format of an ACL is one or more ACL entries separated by either commas or newlines\&. An ACL entry is one of the following: +.PP +.if n \{\ +.RS 4 +.\} +.nf + REVISION: + OWNER: + GROUP: + ACL::// + +.fi +.if n \{\ +.RE +.\} +.PP +The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor\&. If not specified it defaults to 1\&. Using values other than 1 may cause strange behaviour\&. +.PP +The owner and group specify the owner and group SIDs for the object\&. Share ACLs do not specify an owner or a group, so these fields are empty\&. +.PP +ACLs specify permissions granted to the SID\&. This SID can be specified in S\-1\-x\-y\-z format or as a name in which case it is resolved against the server on which the file or directory resides\&. The type, flags and mask values determine the type of access granted to the SID\&. +.PP +The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. The flags values are generally zero for share ACLs\&. +.PP +The mask is a value which expresses the access right granted to the SID\&. It can be given as a decimal or hexadecimal value, or by using one of the following text strings which map to the NT file permissions of the same name\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIR\fR +\- Allow read access +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIW\fR +\- Allow write access +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIX\fR +\- Execute permission on the object +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fID\fR +\- Delete the object +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIP\fR +\- Change permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIO\fR +\- Take ownership +.RE +.sp +.RE +.PP +The following combined permissions can be specified: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIREAD\fR +\- Equivalent to \*(AqRX\*(Aq permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fICHANGE\fR +\- Equivalent to \*(AqRXWD\*(Aq permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIFULL\fR +\- Equivalent to \*(AqRWXDPO\*(Aq permissions +.RE +.SH "EXIT STATUS" +.PP +The +sharesec +program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&. +.PP +If the operation succeeded, sharesec returns and exit status of 0\&. If +sharesec +couldn\*(Aqt connect to the specified server, or there was an error getting or setting the ACLs, an exit status of 1 is returned\&. If there was an error parsing any command line arguments, an exit status of 2 is returned\&. +.SH "EXAMPLES" +.PP +Add full access for SID +\fIS\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724\fR +on +\fIshare\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf + host:~ # sharesec share \-a S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0/FULL + +.fi +.if n \{\ +.RE +.\} +.PP +List all ACEs for +\fIshare\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf + host:~ # sharesec share \-v + REVISION:1 + CONTROL:SR|DP + OWNER: + GROUP: + ACL:S\-1\-1\-0:ALLOWED/0x0/FULL + ACL:S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0x0/FULL + +.fi +.if n \{\ +.RE +.\} +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smb.conf.5 b/net/samba416/files/man/smb.conf.5 new file mode 100644 index 000000000000..06ca9a340a59 --- /dev/null +++ b/net/samba416/files/man/smb.conf.5 @@ -0,0 +1,13994 @@ +'\" t +.\" Title: smb.conf +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: File Formats and Conventions +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMB\&.CONF" "5" "08/09/2022" "Samba 4\&.16\&.4" "File Formats and Conventions" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smb.conf \- The configuration file for the Samba suite +.SH "SYNOPSIS" +.PP +The +smb\&.conf +file is a configuration file for the Samba suite\&. +smb\&.conf +contains runtime configuration information for the Samba programs\&. The complete description of the file format and possible parameters held within are here for reference purposes\&. +.SH "HOW CONFIGURATION CHANGES ARE APPLIED" +.PP +The Samba suite includes a number of different programs\&. Some of them operate in a client mode, others are server daemons that provide various services to its clients\&. The +smb\&.conf +file is processed in the following way: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The Samba suite\*(Aqs client applications read their configuration only once\&. Any changes made after start aren\*(Aqt reflected in the context of already running client code\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The Samba suite\*(Aqs server daemons reload their configuration when requested\&. However, already active connections do not change their configuration\&. More detailed information can be found in +\fBsmbd\fR(8) +and +\fBwinbindd\fR(8) +manual pages\&. +.RE +.sp +.RE +.PP +To request Samba server daemons to refresh their configuration, please use +\fBsmbcontrol\fR(1) +utility\&. +.SH "FILE FORMAT" +.PP +The file consists of sections and parameters\&. A section begins with the name of the section in square brackets and continues until the next section begins\&. Sections contain parameters of the form: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIname\fR = \fIvalue \fR +.fi +.if n \{\ +.RE +.\} +.PP +The file is line\-based \- that is, each newline\-terminated line represents either a comment, a section name or a parameter\&. +.PP +Section and parameter names are not case sensitive\&. +.PP +Only the first equals sign in a parameter is significant\&. Whitespace before or after the first equals sign is discarded\&. Leading, trailing and internal whitespace in section and parameter names is irrelevant\&. Leading and trailing whitespace in a parameter value is discarded\&. Internal whitespace within a parameter value is retained verbatim\&. +.PP +Any line beginning with a semicolon (\(lq;\(rq) or a hash (\(lq#\(rq) character is ignored, as are lines containing only whitespace\&. +.PP +Any line ending in a +\(lq\e\(rq +is continued on the next line in the customary UNIX fashion\&. +.PP +The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 1/0 or true/false\&. Case is not significant in boolean values, but is preserved in string values\&. Some items such as create masks are numeric\&. +.SH "SECTION DESCRIPTIONS" +.PP +Each section in the configuration file (except for the [global] section) describes a shared resource (known as a +\(lqshare\(rq)\&. The section name is the name of the shared resource and the parameters within the section define the shares attributes\&. +.PP +There are three special sections, [global], [homes] and [printers], which are described under +\fIspecial sections\fR\&. The following notes apply to ordinary section descriptions\&. +.PP +A share consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service\&. Some housekeeping options are also specifiable\&. +.PP +Sections are either file share services (used by the client as an extension of their native file systems) or printable services (used by the client to access print services on the host running the server)\&. +.PP +Sections may be designated +\fIguest\fR +services, in which case no password is required to access them\&. A specified UNIX +\fIguest account\fR +is used to define access privileges in this case\&. +.PP +Sections other than guest services will require a password to access them\&. The client provides the username\&. As older clients only provide passwords and not usernames, you may specify a list of usernames to check against the password using the +user = +option in the share definition\&. For modern clients such as Windows 95/98/ME/NT/2000, this should not be necessary\&. +.PP +The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system\&. The server does not grant more access than the host system grants\&. +.PP +The following sample section defines a file space share\&. The user has write access to the path +/home/bar\&. The share is accessed via the share name +foo: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \fI[foo]\fR + \m[blue]\fBpath = /home/bar\fR\m[] + \m[blue]\fBread only = no\fR\m[] +.fi +.if n \{\ +.RE +.\} +.PP +The following sample section defines a printable share\&. The share is read\-only, but printable\&. That is, the only write access permitted is via calls to open, write to and close a spool file\&. The +\fIguest ok\fR +parameter means access will be permitted as the default guest user (specified elsewhere): +.sp +.if n \{\ +.RS 4 +.\} +.nf + \fI[aprinter]\fR + \m[blue]\fBpath = /var/tmp\fR\m[] + \m[blue]\fBread only = yes\fR\m[] + \m[blue]\fBprintable = yes\fR\m[] + \m[blue]\fBguest ok = yes\fR\m[] +.fi +.if n \{\ +.RE +.\} +.sp +.SH "SPECIAL SECTIONS" +.SS "The [global] section" +.PP +Parameters in this section apply to the server as a whole, or are defaults for sections that do not specifically define certain items\&. See the notes under PARAMETERS for more information\&. +.SS "The [homes] section" +.PP +If a section called [homes] is included in the configuration file, services connecting clients to their home directories can be created on the fly by the server\&. +.PP +When the connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, the requested section name is treated as a username and looked up in the local password file\&. If the name exists and the correct password has been given, a share is created by cloning the [homes] section\&. +.PP +Some modifications are then made to the newly created share: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The share name is changed from homes to the located username\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If no path was given, the path is set to the user\*(Aqs home directory\&. +.RE +.sp +.RE +.PP +If you decide to use a +\fIpath =\fR +line in your [homes] section, it may be useful to use the %S macro\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBpath = /data/pchome/%S\fR +.fi +.if n \{\ +.RE +.\} +.sp +is useful if you have different home directories for your PCs than for UNIX access\&. +.PP +This is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss\&. +.PP +A similar process occurs if the requested section name is +\(lqhomes\(rq, except that the share name is not changed to that of the requesting user\&. This method of using the [homes] section works well if different users share a client PC\&. +.PP +The [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others\&. The following is a typical and suitable [homes] section: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI[homes]\fR +\m[blue]\fBread only = no\fR\m[] +.fi +.if n \{\ +.RE +.\} +.PP +An important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients +\fIwithout a password\fR\&. In the very unlikely event that this is actually desirable, it is wise to also specify +\fIread only access\fR\&. +.PP +The +\fIbrowseable\fR +flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag\&. This is useful as it means setting +\fIbrowseable = no\fR +in the [homes] section will hide the [homes] share but make any auto home directories visible\&. +.SS "The [printers] section" +.PP +This section works like [homes], but for printers\&. +.PP +If a [printers] section occurs in the configuration file, users are able to connect to any printer specified in the local host\*(Aqs printcap file\&. +.PP +When a connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, but a [homes] section exists, it is used as described above\&. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name\&. If a match is found, a new printer share is created by cloning the [printers] section\&. +.PP +A few modifications are then made to the newly created share: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The share name is set to the located printer name +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If no printer name was given, the printer name is set to the located printer name +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the share does not permit guest access and no username was given, the username is set to the located printer name\&. +.RE +.sp +.RE +.PP +The [printers] service MUST be printable \- if you specify otherwise, the server will refuse to load the configuration file\&. +.PP +Typically the path specified is that of a world\-writeable spool directory with the sticky bit set on it\&. A typical [printers] entry looks like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI[printers]\fR +\m[blue]\fBpath = /var/tmp\fR\m[] +\m[blue]\fBguest ok = yes\fR\m[] +\m[blue]\fBprintable = yes\fR\m[] +.fi +.if n \{\ +.RE +.\} +.PP +All aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned\&. If your printing subsystem doesn\*(Aqt work like that, you will have to set up a pseudo\-printcap\&. This is a file consisting of one or more lines like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +alias|alias|alias|alias\&.\&.\&. +.fi +.if n \{\ +.RE +.\} +.PP +Each alias should be an acceptable printer name for your printing subsystem\&. In the [global] section, specify the new file as your printcap\&. The server will only recognize names found in your pseudo\-printcap, which of course can contain whatever aliases you like\&. The same technique could be used simply to limit access to a subset of your local printers\&. +.PP +An alias, by the way, is defined as any component of the first entry of a printcap record\&. Records are separated by newlines, components (if there are more than one) are separated by vertical bar symbols (|)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +On SYSV systems which use lpstat to determine what printers are defined on the system you may be able to use +printcap name = lpstat +to automatically obtain a list of printers\&. See the +printcap name +option for more details\&. +.sp .5v +.RE +.SH "USERSHARES" +.PP +Starting with Samba version 3\&.0\&.23 the capability for non\-root users to add, modify, and delete their own share definitions has been added\&. This capability is called +\fIusershares\fR +and is controlled by a set of parameters in the [global] section of the smb\&.conf\&. The relevant parameters are : +.PP +usershare allow guests +.RS 4 +Controls if usershares can permit guest access\&. +.RE +.PP +usershare max shares +.RS 4 +Maximum number of user defined shares allowed\&. +.RE +.PP +usershare owner only +.RS 4 +If set only directories owned by the sharing user can be shared\&. +.RE +.PP +usershare path +.RS 4 +Points to the directory containing the user defined share definitions\&. The filesystem permissions on this directory control who can create user defined shares\&. +.RE +.PP +usershare prefix allow list +.RS 4 +Comma\-separated list of absolute pathnames restricting what directories can be shared\&. Only directories below the pathnames in this list are permitted\&. +.RE +.PP +usershare prefix deny list +.RS 4 +Comma\-separated list of absolute pathnames restricting what directories can be shared\&. Directories below the pathnames in this list are prohibited\&. +.RE +.PP +usershare template share +.RS 4 +Names a pre\-existing share used as a template for creating new usershares\&. All other share parameters not specified in the user defined share definition are copied from this named share\&. +.RE +.PP +To allow members of the UNIX group +foo +to create user defined shares, create the directory to contain the share definitions as follows: +.PP +Become root: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mkdir /usr/local/samba/lib/usershares +chgrp foo /usr/local/samba/lib/usershares +chmod 1770 /usr/local/samba/lib/usershares +.fi +.if n \{\ +.RE +.\} +.PP +Then add the parameters +.sp +.if n \{\ +.RS 4 +.\} +.nf + \m[blue]\fBusershare path = /usr/local/samba/lib/usershares\fR\m[] + \m[blue]\fBusershare max shares = 10\fR\m[] # (or the desired number of shares) +.fi +.if n \{\ +.RE +.\} +.sp +to the global section of your +smb\&.conf\&. Members of the group foo may then manipulate the user defined shares using the following commands\&. +.PP +net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] +.RS 4 +To create or modify (overwrite) a user defined share\&. +.RE +.PP +net usershare delete sharename +.RS 4 +To delete a user defined share\&. +.RE +.PP +net usershare list wildcard\-sharename +.RS 4 +To list user defined shares\&. +.RE +.PP +net usershare info wildcard\-sharename +.RS 4 +To print information about user defined shares\&. +.RE +.SH "PARAMETERS" +.PP +Parameters define the specific attributes of sections\&. +.PP +Some parameters are specific to the [global] section (e\&.g\&., +\fIsecurity\fR)\&. Some parameters are usable in all sections (e\&.g\&., +\fIcreate mask\fR)\&. All others are permissible only in normal sections\&. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal\&. The letter +\fIG\fR +in parentheses indicates that a parameter is specific to the [global] section\&. The letter +\fIS\fR +indicates that a parameter can be specified in a service specific section\&. All +\fIS\fR +parameters can also be specified in the [global] section \- in which case they will define the default behavior for all services\&. +.PP +Parameters are arranged here in alphabetical order \- this may not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym\&. +.SH "VARIABLE SUBSTITUTIONS" +.PP +Many of the strings that are settable in the config file can take substitutions\&. For example the option +\(lqpath = /tmp/%u\(rq +is interpreted as +\(lqpath = /tmp/john\(rq +if the user connected with the username john\&. +.PP +These substitutions are mostly noted in the descriptions below, but there are some general substitutions which apply whenever they might be relevant\&. These are: +.PP +%U +.RS 4 +session username (the username that the client wanted, not necessarily the same as the one they got)\&. +.RE +.PP +%G +.RS 4 +primary group name of %U\&. +.RE +.PP +%h +.RS 4 +the Internet hostname that Samba is running on\&. +.RE +.PP +%m +.RS 4 +the NetBIOS name of the client machine (very useful)\&. +.sp +This parameter is not available when Samba listens on port 445, as clients no longer send this information\&. If you use this macro in an include statement on a domain that has a Samba domain controller be sure to set in the [global] section +\fIsmb ports = 139\fR\&. This will cause Samba to not listen on port 445 and will permit include functionality to function as it did with Samba 2\&.x\&. +.RE +.PP +%L +.RS 4 +the NetBIOS name of the server\&. This allows you to change your config based on what the client calls you\&. Your server can have a +\(lqdual personality\(rq\&. +.RE +.PP +%M +.RS 4 +the Internet name of the client machine\&. +.RE +.PP +%R +.RS 4 +the selected protocol level after protocol negotiation\&. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2, NT1, SMB2_02, SMB2_10, SMB3_00, SMB3_02, SMB3_11 or SMB2_FF\&. +.RE +.PP +%d +.RS 4 +the process id of the current server process\&. +.RE +.PP +%a +.RS 4 +The architecture of the remote machine\&. It currently recognizes Samba (\fBSamba\fR), the Linux CIFS file system (\fBCIFSFS\fR), OS/2, (\fBOS2\fR), Mac OS X (\fBOSX\fR), Windows for Workgroups (\fBWfWg\fR), Windows 9x/ME (\fBWin95\fR), Windows NT (\fBWinNT\fR), Windows 2000 (\fBWin2K\fR), Windows XP (\fBWinXP\fR), Windows XP 64\-bit(\fBWinXP64\fR), Windows 2003 including 2003R2 (\fBWin2K3\fR), and Windows Vista (\fBVista\fR)\&. Anything else will be known as +\fBUNKNOWN\fR\&. +.RE +.PP +%I +.RS 4 +the IP address of the client machine\&. +.sp +Before 4\&.0\&.0 it could contain IPv4 mapped IPv6 addresses, now it only contains IPv4 or IPv6 addresses\&. +.RE +.PP +%J +.RS 4 +the IP address of the client machine, colons/dots replaced by underscores\&. +.RE +.PP +%i +.RS 4 +the local IP address to which a client connected\&. +.sp +Before 4\&.0\&.0 it could contain IPv4 mapped IPv6 addresses, now it only contains IPv4 or IPv6 addresses\&. +.RE +.PP +%j +.RS 4 +the local IP address to which a client connected, colons/dots replaced by underscores\&. +.RE +.PP +%T +.RS 4 +the current date and time\&. +.RE +.PP +%t +.RS 4 +the current date and time in a minimal format without colons (YYYYYmmdd_HHMMSS)\&. +.RE +.PP +%D +.RS 4 +name of the domain or workgroup of the current user\&. +.RE +.PP +%w +.RS 4 +the winbind separator\&. +.RE +.PP +%$(\fIenvvar\fR) +.RS 4 +the value of the environment variable +\fIenvar\fR\&. +.RE +.PP +The following substitutes apply only to some configuration options (only those that are used when a connection has been established): +.PP +%S +.RS 4 +the name of the current service, if any\&. +.RE +.PP +%P +.RS 4 +the root directory of the current service, if any\&. +.RE +.PP +%u +.RS 4 +username of the current service, if any\&. +.RE +.PP +%g +.RS 4 +primary group name of %u\&. +.RE +.PP +%H +.RS 4 +the home directory of the user given by %u\&. +.RE +.PP +%N +.RS 4 +This value is the same as %L\&. +.RE +.PP +There are some quite creative things that can be done with these substitutions and other +smb\&.conf +options\&. +.SH "NAME MANGLING" +.PP +Samba supports +name mangling +so that DOS and Windows clients can use files that don\*(Aqt conform to the 8\&.3 format\&. It can also be set to adjust the case of 8\&.3 format filenames\&. +.PP +There are several options that control the way mangling is performed, and they are grouped here rather than listed separately\&. For the defaults look at the output of the testparm program\&. +.PP +These options can be set separately for each service\&. +.PP +The options are: +.PP +case sensitive = yes/no/auto +.RS 4 +controls whether filenames are case sensitive\&. If they aren\*(Aqt, Samba must do a filename search and match on passed names\&. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS and smbclient 3\&.0\&.5 and above currently) to tell the Samba server on a per\-packet basis that they wish to access the file system in a case\-sensitive manner (to support UNIX case sensitive semantics)\&. No Windows or DOS system supports case\-sensitive filename so setting this option to auto is that same as setting it to no for them\&. Default +\fIauto\fR\&. +.RE +.PP +default case = upper/lower +.RS 4 +controls what the default case is for new filenames (ie\&. files that don\*(Aqt currently exist in the filesystem)\&. Default +\fIlower\fR\&. IMPORTANT NOTE: As part of the optimizations for directories containing large numbers of files, the following special case applies\&. If the options +\m[blue]\fBcase sensitive = yes\fR\m[], +\m[blue]\fBpreserve case = No\fR\m[], and +\m[blue]\fBshort preserve case = No\fR\m[] +are set, then the case of +\fIall\fR +incoming client filenames, not just new filenames, will be modified\&. See additional notes below\&. +.RE +.PP +preserve case = yes/no +.RS 4 +controls whether new files (ie\&. files that don\*(Aqt currently exist in the filesystem) are created with the case that the client passes, or if they are forced to be the +default +case\&. Default +\fIyes\fR\&. +.RE +.PP +short preserve case = yes/no +.RS 4 +controls if new files (ie\&. files that don\*(Aqt currently exist in the filesystem) which conform to 8\&.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the +default +case\&. This option can be used with +preserve case = yes +to permit long filenames to retain their case, while short names are lowercased\&. Default +\fIyes\fR\&. +.RE +.PP +By default, Samba 3\&.0 has the same semantics as a Windows NT server, in that it is case insensitive but case preserving\&. As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share\&. +.SH "REGISTRY\-BASED CONFIGURATION" +.PP +Starting with Samba version 3\&.2\&.0, the capability to store Samba configuration in the registry is available\&. The configuration is stored in the registry key +\fIHKLM\eSoftware\eSamba\esmbconf\fR\&. There are two levels of registry configuration: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Share definitions stored in registry are used\&. This is triggered by setting the global parameter +\fIregistry shares\fR +to +\(lqyes\(rq +in +\fIsmb\&.conf\fR\&. +.sp +The registry shares are loaded not at startup but on demand at runtime by +\fIsmbd\fR\&. Shares defined in +\fIsmb\&.conf\fR +take priority over shares of the same name defined in registry\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Global +\fIsmb\&.conf\fR +options stored in registry are used\&. This can be activated in two different ways: +.sp +Firstly, a registry only configuration is triggered by setting +\m[blue]\fBconfig backend = registry\fR\m[] +in the [global] section of +\fIsmb\&.conf\fR\&. This resets everything that has been read from config files to this point and reads the content of the global configuration section from the registry\&. This is the recommended method of using registry based configuration\&. +.sp +Secondly, a mixed configuration can be activated by a special new meaning of the parameter +\m[blue]\fBinclude = registry\fR\m[] +in the [global] section of +\fIsmb\&.conf\fR\&. This reads the global options from registry with the same priorities as for an include of a text file\&. This may be especially useful in cases where an initial configuration is needed to access the registry\&. +.sp +Activation of global registry options automatically activates registry shares\&. So in the registry only case, shares are loaded on demand only\&. +.RE +.sp +.RE +.PP +Note: To make registry\-based configurations foolproof at least to a certain extent, the use of +\fIlock directory\fR +and +\fIconfig backend\fR +inside the registry configuration has been disabled: Especially by changing the +\fIlock directory\fR +inside the registry configuration, one would create a broken setup where the daemons do not see the configuration they loaded once it is active\&. +.PP +The registry configuration can be accessed with tools like +\fIregedit\fR +or +\fInet (rpc) registry\fR +in the key +\fIHKLM\eSoftware\eSamba\esmbconf\fR\&. More conveniently, the +\fIconf\fR +subcommand of the +\fBnet\fR(8) +utility offers a dedicated interface to read and write the registry based configuration locally, i\&.e\&. directly accessing the database file, circumventing the server\&. +.SH "IDENTITY MAPPING CONSIDERATIONS" +.PP +In the SMB protocol, users, groups, and machines are represented by their security identifiers (SIDs)\&. On POSIX system Samba processes need to run under corresponding POSIX user identities and with supplemental POSIX groups to allow access to the files owned by those users and groups\&. The process of mapping SIDs to POSIX users and groups is called +\fIIDENTITY MAPPING\fR +or, in short, +\fIID MAPPING\fR\&. +.PP +Samba supports multiple ways to map SIDs to POSIX users and groups\&. The configuration is driven by the +\m[blue]\fBidmap config DOMAIN : OPTION\fR\m[] +option which allows one to specify identity mapping (idmap) options for each domain separately\&. +.PP +Identity mapping modules implement different strategies for mapping of SIDs to POSIX user and group identities\&. They are applicable to different use cases and scenarios\&. It is advised to read the documentation of the individual identity mapping modules before choosing a specific scenario to use\&. Each identity management module is documented in a separate manual page\&. The standard idmap backends are tdb (\fBidmap_tdb\fR(8)), tdb2 (\fBidmap_tdb2\fR(8)), ldap (\fBidmap_ldap\fR(8)), rid (\fBidmap_rid\fR(8)), hash (\fBidmap_hash\fR(8)), autorid (\fBidmap_autorid\fR(8)), ad (\fBidmap_ad\fR(8)), nss (\fBidmap_nss\fR(8)), and rfc2307 (\fBidmap_rfc2307\fR(8))\&. +.PP +Overall, ID mapping configuration should be decided carefully\&. Changes to the already deployed ID mapping configuration may create the risk of losing access to the data or disclosing the data to the wrong parties\&. +.PP +This example shows how to configure two domains with +\fBidmap_rid\fR(8), the principal domain and a trusted domain, leaving the default id mapping scheme at tdb\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + [global] + security = domain + workgroup = MAIN + + idmap config * : backend = tdb + idmap config * : range = 1000000\-1999999 + + idmap config MAIN : backend = rid + idmap config MAIN : range = 5000000\-5999999 + + idmap config TRUSTED : backend = rid + idmap config TRUSTED : range = 6000000\-6999999 + +.fi +.if n \{\ +.RE +.\} +.SH "EXPLANATION OF EACH PARAMETER" + + +abort shutdown script (G) +.PP +.RS 4 +This a full path name to a script called by +\fBsmbd\fR(8) +that should stop a shutdown procedure issued by the +\m[blue]\fBshutdown script\fR\m[]\&. +.sp +If the connected user possesses the +\fBSeRemoteShutdownPrivilege\fR, right, this command will be run as root\&. +.sp +Default: +\fI\fIabort shutdown script\fR\fR\fI = \fR\fI""\fR\fI \fR +.sp +Example: +\fI\fIabort shutdown script\fR\fR\fI = \fR\fI/sbin/shutdown \-c\fR\fI \fR +.RE + +access based share enum (S) +.PP +.RS 4 +If this parameter is +\fByes\fR +for a service, then the share hosted by the service will only be visible to users who have read or write access to the share during share enumeration (for example net view \e\esambaserver)\&. The share ACLs which allow or deny the access to the share can be modified using for example the +sharesec +command or using the appropriate Windows tools\&. This has parallels to access based enumeration, the main difference being that only share permissions are evaluated, and security descriptors on files contained on the share are not used in computing enumeration access rights\&. +.sp +Default: +\fI\fIaccess based share enum\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +acl allow execute always (S) +.PP +.RS 4 +This boolean parameter controls the behaviour of +\fBsmbd\fR(8) +when receiving a protocol request of "open for execution" from a Windows client\&. With Samba 3\&.6 and older, the execution right in the ACL was not checked, so a client could execute a file even if it did not have execute rights on the file\&. In Samba 4\&.0, this has been fixed, so that by default, i\&.e\&. when this parameter is set to "False", "open for execution" is now denied when execution permissions are not present\&. +.sp +If this parameter is set to "True", Samba does not check execute permissions on "open for execution", thus re\-establishing the behaviour of Samba 3\&.6\&. This can be useful to smoothen upgrades from older Samba versions to 4\&.0 and newer\&. This setting is not meant to be used as a permanent setting, but as a temporary relief: It is recommended to fix the permissions in the ACLs and reset this parameter to the default after a certain transition period\&. +.sp +Default: +\fI\fIacl allow execute always\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +acl check permissions (S) +.PP +.RS 4 +Please note this parameter is now deprecated in Samba 3\&.6\&.2 and will be removed in a future version of Samba\&. +.sp +This boolean parameter controls what +\fBsmbd\fR(8) +does on receiving a protocol request of "open for delete" from a Windows client\&. If a Windows client doesn\*(Aqt have permissions to delete a file then they expect this to be denied at open time\&. POSIX systems normally only detect restrictions on delete by actually attempting to delete the file or directory\&. As Windows clients can (and do) "back out" a delete request by unsetting the "delete on close" bit Samba cannot delete the file immediately on "open for delete" request as we cannot restore such a deleted file\&. With this parameter set to true (the default) then smbd checks the file system permissions directly on "open for delete" and denies the request without actually deleting the file if the file system permissions would seem to deny it\&. This is not perfect, as it\*(Aqs possible a user could have deleted a file without Samba being able to check the permissions correctly, but it is close enough to Windows semantics for mostly correct behaviour\&. Samba will correctly check POSIX ACL semantics in this case\&. +.sp +If this parameter is set to "false" Samba doesn\*(Aqt check permissions on "open for delete" and allows the open\&. If the user doesn\*(Aqt have permission to delete the file this will only be discovered at close time, which is too late for the Windows user tools to display an error message to the user\&. The symptom of this is files that appear to have been deleted "magically" re\-appearing on a Windows explorer refresh\&. This is an extremely advanced protocol option which should not need to be changed\&. This parameter was introduced in its final form in 3\&.0\&.21, an earlier version with slightly different semantics was introduced in 3\&.0\&.20\&. That older version is not documented here\&. +.sp +Default: +\fI\fIacl check permissions\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +acl flag inherited canonicalization (S) +.PP +.RS 4 +This option controls the way Samba handles client requests setting the Security Descriptor of files and directories and the effect the operation has on the Security Descriptor flag "DACL auto\-inherited" (DI)\&. Generally, this flag is set on a file (or directory) upon creation if the parent directory has DI set and also has inheritable ACEs\&. +.sp +On the other hand when a Security Descriptor is explicitly set on a file, the DI flag is cleared, unless the flag "DACL Inheritance Required" (DR) is also set in the new Security Descriptor (fwiw, DR is never stored on disk)\&. +.sp +This is the default behaviour when this option is enabled (the default)\&. When setting this option to +no, the resulting value of the DI flag on\-disk is directly taken from the DI value of the to\-be\-set Security Descriptor\&. This can be used so dump tools like rsync that copy data blobs from xattrs that represent ACLs created by the acl_xattr VFS module will result in copies of the ACL that are identical to the source\&. Without this option, the copied ACLs would all loose the DI flag if set on the source\&. +.sp +Default: +\fI\fIacl flag inherited canonicalization\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +acl group control (S) +.PP +.RS 4 +In a POSIX filesystem, only the owner of a file or directory and the superuser can modify the permissions and ACLs on a file\&. If this parameter is set, then Samba overrides this restriction, and also allows the +\fIprimary group owner\fR +of a file or directory to modify the permissions and ACLs on that file\&. +.sp +On a Windows server, groups may be the owner of a file or directory \- thus allowing anyone in that group to modify the permissions on it\&. This allows the delegation of security controls on a point in the filesystem to the group owner of a directory and anything below it also owned by that group\&. This means there are multiple people with permissions to modify ACLs on a file or directory, easing manageability\&. +.sp +This parameter allows Samba to also permit delegation of the control over a point in the exported directory hierarchy in much the same way as Windows\&. This allows all members of a UNIX group to control the permissions on a file or directory they have group ownership on\&. +.sp +This parameter is best used with the +\m[blue]\fBinherit owner\fR\m[] +option and also on a share containing directories with the UNIX +\fIsetgid bit\fR +set on them, which causes new files and directories created within it to inherit the group ownership from the containing directory\&. +.sp +This parameter was deprecated in Samba 3\&.0\&.23, but re\-activated in Samba 3\&.0\&.31 and above, as it now only controls permission changes if the user is in the owning primary group\&. It is now no longer equivalent to the +\fIdos filemode\fR +option\&. +.sp +Default: +\fI\fIacl group control\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +acl map full control (S) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +maps a POSIX ACE entry of "rwx" (read/write/execute), the maximum allowed POSIX permission set, into a Windows ACL of "FULL CONTROL"\&. If this parameter is set to true any POSIX ACE entry of "rwx" will be returned in a Windows ACL as "FULL CONTROL", is this parameter is set to false any POSIX ACE entry of "rwx" will be returned as the specific Windows ACL bits representing read, write and execute\&. +.sp +Default: +\fI\fIacl map full control\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +add group script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run +\fIAS ROOT\fR +by +\fBsmbd\fR(8) +when a new group is requested\&. It will expand any +\fI%g\fR +to the group name passed\&. This script is only useful for installations using the Windows NT domain administration tools\&. The script is free to create a group with an arbitrary name to circumvent unix group name restrictions\&. In that case the script must print the numeric gid of the created group on stdout\&. +.sp +Default: +\fI\fIadd group script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadd group script\fR\fR\fI = \fR\fI/usr/sbin/groupadd %g\fR\fI \fR +.RE + +additional dns hostnames (G) +.PP +.RS 4 +A list of additional DNS names by which this host can be identified +.sp +Default: +\fI\fIadditional dns hostnames\fR\fR\fI = \fR\fI # empty string (no additional dns names)\fR\fI \fR +.sp +Example: +\fI\fIadditional dns hostnames\fR\fR\fI = \fR\fI host2\&.example\&.com host3\&.other\&.com \fR\fI \fR +.RE + +add machine script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run by +\fBsmbd\fR(8) +when a machine is added to Samba\*(Aqs domain and a Unix account matching the machine\*(Aqs name appended with a "$" does not already exist\&. +.sp +This option is very similar to the +\m[blue]\fBadd user script\fR\m[], and likewise uses the %u substitution for the account name\&. Do not use the %m substitution\&. +.sp +Default: +\fI\fIadd machine script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadd machine script\fR\fR\fI = \fR\fI/usr/sbin/adduser \-n \-g machines \-c Machine \-d /var/lib/nobody \-s /bin/false %u\fR\fI \fR +.RE + +addport command (G) +.PP +.RS 4 +Samba 3\&.0\&.23 introduced support for adding printer ports remotely using the Windows "Add Standard TCP/IP Port Wizard"\&. This option defines an external program to be executed when smbd receives a request to add a new Port to the system\&. The script is passed two parameters: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIport name\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdevice URI\fR +.RE +.sp +.RE +The deviceURI is in the format of socket://[:] or lpd:///\&. +.sp +Default: +\fI\fIaddport command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIaddport command\fR\fR\fI = \fR\fI/etc/samba/scripts/addport\&.sh\fR\fI \fR +.RE + +addprinter command (G) +.PP +.RS 4 +With the introduction of MS\-RPC based printing support for Windows NT/2000 clients in Samba 2\&.2, The MS Add Printer Wizard (APW) icon is now also available in the "Printers\&.\&.\&." folder displayed a share listing\&. The APW allows for printers to be add remotely to a Samba or Windows NT/2000 print server\&. +.sp +For a Samba host this means that the printer must be physically added to the underlying printing system\&. The +\fIaddprinter command\fR +defines a script to be run which will perform the necessary operations for adding the printer to the print system and to add the appropriate service definition to the +smb\&.conf +file in order that it can be shared by +\fBsmbd\fR(8)\&. +.sp +The +\fIaddprinter command\fR +is automatically invoked with the following parameter (in order): +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIprinter name\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshare name\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIport name\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdriver name\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIlocation\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIWindows 9x driver location\fR +.RE +.sp +.RE +All parameters are filled in from the PRINTER_INFO_2 structure sent by the Windows NT/2000 client with one exception\&. The "Windows 9x driver location" parameter is included for backwards compatibility only\&. The remaining fields in the structure are generated from answers to the APW questions\&. +.sp +Once the +\fIaddprinter command\fR +has been executed, +smbd +will reparse the +smb\&.conf +to determine if the share defined by the APW exists\&. If the sharename is still invalid, then +smbd +will return an ACCESS_DENIED error to the client\&. +.sp +The +\fIaddprinter command\fR +program can output a single line of text, which Samba will set as the port the new printer is connected to\&. If this line isn\*(Aqt output, Samba won\*(Aqt reload its printer shares\&. +.sp +Default: +\fI\fIaddprinter command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIaddprinter command\fR\fR\fI = \fR\fI/usr/bin/addprinter\fR\fI \fR +.RE + +add share command (G) +.PP +.RS 4 +Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The +\fIadd share command\fR +is used to define an external program or script which will add a new service definition to +smb\&.conf\&. +.sp +In order to successfully execute the +\fIadd share command\fR, +smbd +requires that the administrator connects using a root account (i\&.e\&. uid == 0) or has the +SeDiskOperatorPrivilege\&. Scripts defined in the +\fIadd share command\fR +parameter are executed as root\&. +.sp +When executed, +smbd +will automatically invoke the +\fIadd share command\fR +with five parameters\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIconfigFile\fR +\- the location of the global +smb\&.conf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshareName\fR +\- the name of the new share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpathName\fR +\- path to an **existing** directory on disk\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIcomment\fR +\- comment string to associate with the new share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fImax connections\fR +Number of maximum simultaneous connections to this share\&. +.RE +.sp +.RE +This parameter is only used to add file shares\&. To add printer shares, see the +\m[blue]\fBaddprinter command\fR\m[]\&. +.sp +Default: +\fI\fIadd share command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadd share command\fR\fR\fI = \fR\fI/usr/local/bin/addshare\fR\fI \fR +.RE + +add user script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run +\fIAS ROOT\fR +by +\fBsmbd\fR(8) +under special circumstances described below\&. +.sp +Normally, a Samba server requires that UNIX users are created for all users accessing files on this server\&. For sites that use Windows NT account databases as their primary user database creating these users and keeping the user list in sync with the Windows NT PDC is an onerous task\&. This option allows smbd to create the required UNIX users +\fION DEMAND\fR +when a user accesses the Samba server\&. +.sp +When the Windows user attempts to access the Samba server, at login (session setup in the SMB protocol) time, +\fBsmbd\fR(8) +contacts the +\m[blue]\fBpassword server\fR\m[] +and attempts to authenticate the given user with the given password\&. If the authentication succeeds then +smbd +attempts to find a UNIX user in the UNIX password database to map the Windows user into\&. If this lookup fails, and +\m[blue]\fBadd user script\fR\m[] +is set then +smbd +will call the specified script +\fIAS ROOT\fR, expanding any +\fI%u\fR +argument to be the user name to create\&. +.sp +If this script successfully creates the user then +smbd +will continue on as though the UNIX user already existed\&. In this way, UNIX users are dynamically created to match existing Windows NT accounts\&. +.sp +See also +\m[blue]\fBsecurity\fR\m[], +\m[blue]\fBpassword server\fR\m[], +\m[blue]\fBdelete user script\fR\m[]\&. +.sp +Default: +\fI\fIadd user script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadd user script\fR\fR\fI = \fR\fI/usr/local/samba/bin/add_user %u\fR\fI \fR +.RE + +add user to group script (G) +.PP +.RS 4 +Full path to the script that will be called when a user is added to a group using the Windows NT domain administration tools\&. It will be run by +\fBsmbd\fR(8) +\fIAS ROOT\fR\&. Any +\fI%g\fR +will be replaced with the group name and any +\fI%u\fR +will be replaced with the user name\&. +.sp +Note that the +adduser +command used in the example below does not support the used syntax on all systems\&. +.sp +Default: +\fI\fIadd user to group script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadd user to group script\fR\fR\fI = \fR\fI/usr/sbin/adduser %u %g\fR\fI \fR +.RE + +administrative share (S) +.PP +.RS 4 +If this parameter is set to +\fByes\fR +for a share, then the share will be an administrative share\&. The Administrative Shares are the default network shares created by all Windows NT\-based operating systems\&. These are shares like C$, D$ or ADMIN$\&. The type of these shares is STYPE_DISKTREE_HIDDEN\&. +.sp +See the section below on +\m[blue]\fBsecurity\fR\m[] +for more information about this option\&. +.sp +Default: +\fI\fIadministrative share\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +admin users (S) +.PP +.RS 4 +This is a list of users who will be granted administrative privileges on the share\&. This means that they will do all file operations as the super\-user (root)\&. +.sp +You should use this option very carefully, as any user in this list will be able to do anything they like on the share, irrespective of file permissions\&. +.sp +Default: +\fI\fIadmin users\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIadmin users\fR\fR\fI = \fR\fIjason\fR\fI \fR +.RE + +afs share (S) +.PP +.RS 4 +This parameter controls whether special AFS features are enabled for this share\&. If enabled, it assumes that the directory exported via the +\fIpath\fR +parameter is a local AFS import\&. The special AFS features include the attempt to hand\-craft an AFS token if you enabled \-\-with\-fake\-kaserver in configure\&. +.sp +Default: +\fI\fIafs share\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +afs token lifetime (G) +.PP +.RS 4 +This parameter controls the lifetime of tokens that the AFS fake\-kaserver claims\&. In reality these never expire but this lifetime controls when the afs client will forget the token\&. +.sp +Set this parameter to 0 to get +\fBNEVERDATE\fR\&. +.sp +Default: +\fI\fIafs token lifetime\fR\fR\fI = \fR\fI604800\fR\fI \fR +.RE + +afs username map (G) +.PP +.RS 4 +If you are using the fake kaserver AFS feature, you might want to hand\-craft the usernames you are creating tokens for\&. For example this is necessary if you have users from several domain in your AFS Protection Database\&. One possible scheme to code users as DOMAIN+User as it is done by winbind with the + as a separator\&. +.sp +The mapped user name must contain the cell name to log into, so without setting this parameter there will be no token\&. +.sp +Default: +\fI\fIafs username map\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIafs username map\fR\fR\fI = \fR\fI%u@afs\&.samba\&.org\fR\fI \fR +.RE + +aio max threads (G) +.PP +.RS 4 +The integer parameter specifies the maximum number of threads each smbd process will create when doing parallel asynchronous IO calls\&. If the number of outstanding calls is greater than this number the requests will not be refused but go onto a queue and will be scheduled in turn as outstanding requests complete\&. +.sp +Related command: +\m[blue]\fBaio read size\fR\m[] +.sp +Related command: +\m[blue]\fBaio write size\fR\m[] +.sp +Default: +\fI\fIaio max threads\fR\fR\fI = \fR\fI100\fR\fI \fR +.RE + +aio read size (S) +.PP +.RS 4 +If this integer parameter is set to a non\-zero value, Samba will read from files asynchronously when the request size is bigger than this value\&. Note that it happens only for non\-chained and non\-chaining reads and when not using write cache\&. +.sp +The only reasonable values for this parameter are 0 (no async I/O) and 1 (always do async I/O)\&. +.sp +Related command: +\m[blue]\fBwrite cache size\fR\m[] +.sp +Related command: +\m[blue]\fBaio write size\fR\m[] +.sp +Default: +\fI\fIaio read size\fR\fR\fI = \fR\fI1\fR\fI \fR +.sp +Example: +\fI\fIaio read size\fR\fR\fI = \fR\fI0 # Always do reads synchronously \fR\fI \fR +.RE + +aio write behind (S) +.PP +.RS 4 +If Samba has been built with asynchronous I/O support, Samba will not wait until write requests are finished before returning the result to the client for files listed in this parameter\&. Instead, Samba will immediately return that the write request has been finished successfully, no matter if the operation will succeed or not\&. This might speed up clients without aio support, but is really dangerous, because data could be lost and files could be damaged\&. +.sp +The syntax is identical to the +\m[blue]\fBveto files\fR\m[] +parameter\&. +.sp +Default: +\fI\fIaio write behind\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIaio write behind\fR\fR\fI = \fR\fI/*\&.tmp/\fR\fI \fR +.RE + +aio write size (S) +.PP +.RS 4 +If this integer parameter is set to a non\-zero value, Samba will write to files asynchronously when the request size is bigger than this value\&. Note that it happens only for non\-chained and non\-chaining reads and when not using write cache\&. +.sp +The only reasonable values for this parameter are 0 (no async I/O) and 1 (always do async I/O)\&. +.sp +Compared to +\m[blue]\fBaio read size\fR\m[] +this parameter has a smaller effect, most writes should end up in the file system cache\&. Writes that require space allocation might benefit most from going asynchronous\&. +.sp +Related command: +\m[blue]\fBwrite cache size\fR\m[] +.sp +Related command: +\m[blue]\fBaio read size\fR\m[] +.sp +Default: +\fI\fIaio write size\fR\fR\fI = \fR\fI1\fR\fI \fR +.sp +Example: +\fI\fIaio write size\fR\fR\fI = \fR\fI0 # Always do writes synchronously \fR\fI \fR +.RE + +algorithmic rid base (G) +.PP +.RS 4 +This determines how Samba will use its algorithmic mapping from uids/gid to the RIDs needed to construct NT Security Identifiers\&. +.sp +Setting this option to a larger value could be useful to sites transitioning from WinNT and Win2k, as existing user and group rids would otherwise clash with system users etc\&. +.sp +All UIDs and GIDs must be able to be resolved into SIDs for the correct operation of ACLs on the server\&. As such the algorithmic mapping can\*(Aqt be \*(Aqturned off\*(Aq, but pushing it \*(Aqout of the way\*(Aq should resolve the issues\&. Users and groups can then be assigned \*(Aqlow\*(Aq RIDs in arbitrary\-rid supporting backends\&. +.sp +Default: +\fI\fIalgorithmic rid base\fR\fR\fI = \fR\fI1000\fR\fI \fR +.sp +Example: +\fI\fIalgorithmic rid base\fR\fR\fI = \fR\fI100000\fR\fI \fR +.RE + +allocation roundup size (S) +.PP +.RS 4 +This parameter allows an administrator to tune the allocation size reported to Windows clients\&. This is only useful for old SMB1 clients because modern SMB dialects eliminated that bottleneck and have better performance by default\&. Using this parameter may cause difficulties for some applications, e\&.g\&. MS Visual Studio\&. If the MS Visual Studio compiler starts to crash with an internal error, set this parameter to zero for this share\&. Settings this parameter to a large value can also cause small files to allocate more space on the disk than needed\&. +.sp +This parameter is deprecated and will be removed in one of the next Samba releases\&. +.sp +The integer parameter specifies the roundup size in bytes\&. +.sp +Default: +\fI\fIallocation roundup size\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIallocation roundup size\fR\fR\fI = \fR\fI1048576 # (to set it to the former default of 1 MiB)\fR\fI \fR +.RE + +allow dcerpc auth level connect (G) +.PP +.RS 4 +This option controls whether DCERPC services are allowed to be used with DCERPC_AUTH_LEVEL_CONNECT, which provides authentication, but no per message integrity nor privacy protection\&. +.sp +Some interfaces like samr, lsarpc and netlogon have a hard\-coded default of +\fBno\fR +and epmapper, mgmt and rpcecho have a hard\-coded default of +\fByes\fR\&. +.sp +The behavior can be overwritten per interface name (e\&.g\&. lsarpc, netlogon, samr, srvsvc, winreg, wkssvc \&.\&.\&.) by using \*(Aqallow dcerpc auth level connect:interface = yes\*(Aq as option\&. +.sp +This option yields precedence to the implementation specific restrictions\&. E\&.g\&. the drsuapi and backupkey protocols require DCERPC_AUTH_LEVEL_PRIVACY\&. The dnsserver protocol requires DCERPC_AUTH_LEVEL_INTEGRITY\&. +.sp +Default: +\fI\fIallow dcerpc auth level connect\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIallow dcerpc auth level connect\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +allow dns updates (G) +.PP +.RS 4 +This option determines what kind of updates to the DNS are allowed\&. +.sp +DNS updates can either be disallowed completely by setting it to +\fBdisabled\fR, enabled over secure connections only by setting it to +\fBsecure only\fR +or allowed in all cases by setting it to +\fBnonsecure\fR\&. +.sp +Default: +\fI\fIallow dns updates\fR\fR\fI = \fR\fIsecure only\fR\fI \fR +.sp +Example: +\fI\fIallow dns updates\fR\fR\fI = \fR\fIdisabled\fR\fI \fR +.RE + +allow insecure wide links (G) +.PP +.RS 4 +In normal operation the option +\m[blue]\fBwide links\fR\m[] +which allows the server to follow symlinks outside of a share path is automatically disabled when +\m[blue]\fBunix extensions\fR\m[] +are enabled on a Samba server\&. This is done for security purposes to prevent UNIX clients creating symlinks to areas of the server file system that the administrator does not wish to export\&. +.sp +Setting +\m[blue]\fBallow insecure wide links\fR\m[] +to true disables the link between these two parameters, removing this protection and allowing a site to configure the server to follow symlinks (by setting +\m[blue]\fBwide links\fR\m[] +to "true") even when +\m[blue]\fBunix extensions\fR\m[] +is turned on\&. +.sp +It is not recommended to enable this option unless you fully understand the implications of allowing the server to follow symbolic links created by UNIX clients\&. For most normal Samba configurations this would be considered a security hole and setting this parameter is not recommended\&. +.sp +This option was added at the request of sites who had deliberately set Samba up in this way and needed to continue supporting this functionality without having to patch the Samba code\&. +.sp +Default: +\fI\fIallow insecure wide links\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +allow nt4 crypto (G) +.PP +.RS 4 +This option controls whether the netlogon server (currently only in \*(Aqactive directory domain controller\*(Aq mode), will reject clients which does not support NETLOGON_NEG_STRONG_KEYS nor NETLOGON_NEG_SUPPORTS_AES\&. +.sp +This option was added with Samba 4\&.2\&.0\&. It may lock out clients which worked fine with Samba versions up to 4\&.1\&.x\&. as the effective default was "yes" there, while it is "no" now\&. +.sp +If you have clients without RequireStrongKey = 1 in the registry, you may need to set "allow nt4 crypto = yes", until you have fixed all clients\&. +.sp +"allow nt4 crypto = yes" allows weak crypto to be negotiated, maybe via downgrade attacks\&. +.sp +This option yields precedence to the \*(Aqreject md5 clients\*(Aq option\&. +.sp +Default: +\fI\fIallow nt4 crypto\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +allow trusted domains (G) +.PP +.RS 4 +This option only takes effect when the +\m[blue]\fBsecurity\fR\m[] +option is set to +\fBserver\fR, +\fBdomain\fR +or +\fBads\fR\&. If it is set to no, then attempts to connect to a resource from a domain or workgroup other than the one which smbd is running in will fail, even if that domain is trusted by the remote server doing the authentication\&. +.sp +This is useful if you only want your Samba server to serve resources to users in the domain it is a member of\&. As an example, suppose that there are two domains DOMA and DOMB\&. DOMB is trusted by DOMA, which contains the Samba server\&. Under normal circumstances, a user with an account in DOMB can then access the resources of a UNIX account with the same account name on the Samba server even if they do not have an account in DOMA\&. This can make implementing a security boundary difficult\&. +.sp +Default: +\fI\fIallow trusted domains\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +allow unsafe cluster upgrade (G) +.PP +.RS 4 +If set to no (the default), smbd checks at startup if other smbd versions are running in the cluster and refuses to start if so\&. This is done to protect data corruption in internal data structures due to incompatible Samba versions running concurrently in the same cluster\&. Setting this parameter to +yes +disables this safety check\&. +.sp +Default: +\fI\fIallow unsafe cluster upgrade\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +apply group policies (G) +.PP +.RS 4 +This option controls whether winbind will execute the gpupdate command defined in +\m[blue]\fBgpo update command\fR\m[] +on the Group Policy update interval\&. The Group Policy update interval is defined as every 90 minutes, plus a random offset between 0 and 30 minutes\&. This applies Group Policy Machine polices to the client or KDC and machine policies to a server\&. +.sp +Default: +\fI\fIapply group policies\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIapply group policies\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +async dns timeout (G) +.PP +.RS 4 +The number of seconds the asynchronous DNS resolver code in Samba will wait for responses\&. Some of the Samba client library code uses internal asynchronous DNS resolution for A and AAAA records when trying to find Active Directory Domain controllers\&. This value prevents this name resolution code from waiting for DNS server timeouts\&. +.sp +The minimum value of this parameter is clamped at 1 second\&. +.sp +Default: +\fI\fIasync dns timeout\fR\fR\fI = \fR\fI10\fR\fI \fR +.sp +Example: +\fI\fIasync dns timeout\fR\fR\fI = \fR\fI20\fR\fI \fR +.RE + +async smb echo handler (G) +.PP +.RS 4 +This parameter specifies whether Samba should fork the async smb echo handler\&. It can be beneficial if your file system can block syscalls for a very long time\&. In some circumstances, it prolongs the timeout that Windows uses to determine whether a connection is dead\&. This parameter is only for SMB1\&. For SMB2 and above TCP keepalives can be used instead\&. +.sp +Default: +\fI\fIasync smb echo handler\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +auth event notification (G) +.PP +.RS 4 +When enabled, this option causes Samba (acting as an Active Directory Domain Controller) to stream authentication events across the internal message bus\&. Scripts built using Samba\*(Aqs python bindings can listen to these events by registering as the service +auth_event\&. +.sp +This is +\fInot\fR +needed for the audit logging described in +\m[blue]\fBlog level\fR\m[]\&. +.sp +Instead, this should instead be considered a developer option (it assists in the Samba testsuite) rather than a facility for external auditing, as message delivery is not guaranteed (a feature that the testsuite works around)\&. +.sp +The authentication events are also logged via the normal logging methods when the +\m[blue]\fBlog level\fR\m[] +is set appropriately, say to +auth_json_audit:3\&. +.sp +Default: +\fI\fIauth event notification\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +preload +.PP +.RS 4 +This parameter is a synonym for +auto services\&. +.RE + +auto services (G) +.PP +.RS 4 +This is a list of services that you want to be automatically added to the browse lists\&. This is most useful for homes and printers services that would otherwise not be visible\&. +.sp +Note that if you just want all printers in your printcap file loaded then the +\m[blue]\fBload printers\fR\m[] +option is easier\&. +.sp +Default: +\fI\fIauto services\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIauto services\fR\fR\fI = \fR\fIfred lp colorlp\fR\fI \fR +.RE + +available (S) +.PP +.RS 4 +This parameter lets you "turn off" a service\&. If +\fIavailable = no\fR, then +\fIALL\fR +attempts to connect to the service will fail\&. Such failures are logged\&. +.sp +Default: +\fI\fIavailable\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +bind dns directory +.PP +.RS 4 +This parameter is a synonym for +binddns dir\&. +.RE + +binddns dir (G) +.PP +.RS 4 +This parameters defines the directory samba will use to store the configuration files for bind, such as named\&.conf\&. NOTE: The bind dns directory needs to be on the same mount point as the private directory! +.sp +Default: +\fI\fIbinddns dir\fR\fR\fI = \fR\fI/var/db/samba4/bind\-dns\fR\fI \fR +.RE + +bind interfaces only (G) +.PP +.RS 4 +This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests\&. It affects file service +\fBsmbd\fR(8) +and name service +\fBnmbd\fR(8) +in a slightly different ways\&. +.sp +For name service it causes +nmbd +to bind to ports 137 and 138 on the interfaces listed in the +\m[blue]\fBinterfaces\fR\m[] +parameter\&. +nmbd +also binds to the "all addresses" interface (0\&.0\&.0\&.0) on ports 137 and 138 for the purposes of reading broadcast messages\&. If this option is not set then +nmbd +will service name requests on all of these sockets\&. If +\m[blue]\fBbind interfaces only\fR\m[] +is set then +nmbd +will check the source address of any packets coming in on the broadcast sockets and discard any that don\*(Aqt match the broadcast addresses of the interfaces in the +\m[blue]\fBinterfaces\fR\m[] +parameter list\&. As unicast packets are received on the other sockets it allows +nmbd +to refuse to serve names to machines that send packets that arrive through any interfaces not listed in the +\m[blue]\fBinterfaces\fR\m[] +list\&. IP Source address spoofing does defeat this simple check, however, so it must not be used seriously as a security feature for +nmbd\&. +.sp +For file service it causes +\fBsmbd\fR(8) +to bind only to the interface list given in the +\m[blue]\fBinterfaces\fR\m[] +parameter\&. This restricts the networks that +smbd +will serve, to packets coming in on those interfaces\&. Note that you should not use this parameter for machines that are serving PPP or other intermittent or non\-broadcast network interfaces as it will not cope with non\-permanent interfaces\&. +.sp +If +\m[blue]\fBbind interfaces only\fR\m[] +is set and the network address +\fI127\&.0\&.0\&.1\fR +is not added to the +\m[blue]\fBinterfaces\fR\m[] +parameter list +\fBsmbpasswd\fR(8) +may not work as expected due to the reasons covered below\&. +.sp +To change a users SMB password, the +smbpasswd +by default connects to the +\fIlocalhost \- 127\&.0\&.0\&.1\fR +address as an SMB client to issue the password change request\&. If +\m[blue]\fBbind interfaces only\fR\m[] +is set then unless the network address +\fI127\&.0\&.0\&.1\fR +is added to the +\m[blue]\fBinterfaces\fR\m[] +parameter list then +smbpasswd +will fail to connect in it\*(Aqs default mode\&. +smbpasswd +can be forced to use the primary IP interface of the local host by using its +\fBsmbpasswd\fR(8) +\fI\-r \fR\fI\fIremote machine\fR\fR +parameter, with +\fIremote machine\fR +set to the IP name of the primary interface of the local host\&. +.sp +Default: +\fI\fIbind interfaces only\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +blocking locks (S) +.PP +.RS 4 +This parameter controls the behavior of +\fBsmbd\fR(8) +when given a request by a client to obtain a byte range lock on a region of an open file, and the request has a time limit associated with it\&. +.sp +If this parameter is set and the lock range requested cannot be immediately satisfied, samba will internally queue the lock request, and periodically attempt to obtain the lock until the timeout period expires\&. +.sp +If this parameter is set to +\fBno\fR, then samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained\&. +.sp +Default: +\fI\fIblocking locks\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +block size (S) +.PP +.RS 4 +This parameter controls the behavior of +\fBsmbd\fR(8) +when reporting disk free sizes\&. By default, this reports a disk block size of 1024 bytes\&. +.sp +Changing this parameter may have some effect on the efficiency of client writes, this is not yet confirmed\&. This parameter was added to allow advanced administrators to change it (usually to a higher value) and test the effect it has on client write performance without re\-compiling the code\&. As this is an experimental option it may be removed in a future release\&. +.sp +Changing this option does not change the disk free reporting size, just the block size unit reported to the client\&. +.sp +Default: +\fI\fIblock size\fR\fR\fI = \fR\fI1024\fR\fI \fR +.sp +Example: +\fI\fIblock size\fR\fR\fI = \fR\fI4096\fR\fI \fR +.RE + +browsable +.PP +.RS 4 +This parameter is a synonym for +browseable\&. +.RE + +browseable (S) +.PP +.RS 4 +This controls whether this share is seen in the list of available shares in a net view and in the browse list\&. +.sp +Default: +\fI\fIbrowseable\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +browse list (G) +.PP +.RS 4 +This controls whether +\fBsmbd\fR(8) +will serve a browse list to a client doing a +NetServerEnum +call\&. Normally set to +\fByes\fR\&. You should never need to change this\&. +.sp +Default: +\fI\fIbrowse list\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +cache directory (G) +.PP +.RS 4 +Usually, most of the TDB files are stored in the +\fIlock directory\fR\&. Since Samba 3\&.4\&.0, it is possible to differentiate between TDB files with persistent data and TDB files with non\-persistent data using the +\fIstate directory\fR +and the +\fIcache directory\fR +options\&. +.sp +This option specifies the directory for storing TDB files containing non\-persistent data that will be kept across service restarts\&. The directory should be placed on persistent storage, but the data can be safely deleted by an administrator\&. +.sp +Default: +\fI\fIcache directory\fR\fR\fI = \fR\fI/var/db/samba4\fR\fI \fR +.sp +Example: +\fI\fIcache directory\fR\fR\fI = \fR\fI/var/run/samba/locks/cache\fR\fI \fR +.RE + +casesignames +.PP +.RS 4 +This parameter is a synonym for +case sensitive\&. +.RE + +case sensitive (S) +.PP +.RS 4 +See the discussion in the section +\m[blue]\fBname mangling\fR\m[]\&. +.sp +Default: +\fI\fIcase sensitive\fR\fR\fI = \fR\fIauto\fR\fI \fR +.RE + +change notify (G) +.PP +.RS 4 +This parameter specifies whether Samba should reply to a client\*(Aqs file change notify requests\&. +.sp +You should never need to change this parameter +.sp +Default: +\fI\fIchange notify\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +change share command (G) +.PP +.RS 4 +Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The +\fIchange share command\fR +is used to define an external program or script which will modify an existing service definition in +smb\&.conf\&. +.sp +In order to successfully execute the +\fIchange share command\fR, +smbd +requires that the administrator connects using a root account (i\&.e\&. uid == 0) or has the +SeDiskOperatorPrivilege\&. Scripts defined in the +\fIchange share command\fR +parameter are executed as root\&. +.sp +When executed, +smbd +will automatically invoke the +\fIchange share command\fR +with six parameters\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIconfigFile\fR +\- the location of the global +smb\&.conf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshareName\fR +\- the name of the new share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpathName\fR +\- path to an **existing** directory on disk\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIcomment\fR +\- comment string to associate with the new share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fImax connections\fR +Number of maximum simultaneous connections to this share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fICSC policy\fR +\- client side caching policy in string form\&. Valid values are: manual, documents, programs, disable\&. +.RE +.sp +.RE +This parameter is only used to modify existing file share definitions\&. To modify printer shares, use the "Printers\&.\&.\&." folder as seen when browsing the Samba host\&. +.sp +Default: +\fI\fIchange share command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIchange share command\fR\fR\fI = \fR\fI/usr/local/bin/changeshare\fR\fI \fR +.RE + +check parent directory delete on close (S) +.PP +.RS 4 +A Windows SMB server prevents the client from creating files in a directory that has the delete\-on\-close flag set\&. By default Samba doesn\*(Aqt perform this check as this check is a quite expensive operation in Samba\&. +.sp +Default: +\fI\fIcheck parent directory delete on close\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +check password script (G) +.PP +.RS 4 +The name of a program that can be used to check password complexity\&. The password is sent to the program\*(Aqs standard input\&. +.sp +The program must return 0 on a good password, or any other value if the password is bad\&. In case the password is considered weak (the program does not return 0) the user will be notified and the password change will fail\&. +.sp +In Samba AD, this script will be run +\fIAS ROOT\fR +by +\fBsamba\fR(8) +without any substitutions\&. +.sp +Note that starting with Samba 4\&.11 the following environment variables are exported to the script: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SAMBA_CPS_ACCOUNT_NAME is always present and contains the sAMAccountName of user, the is the same as the %u substitutions in the none AD DC case\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SAMBA_CPS_USER_PRINCIPAL_NAME is optional in the AD DC case if the userPrincipalName is present\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SAMBA_CPS_FULL_NAME is optional if the displayName is present\&. +.RE +.sp +.RE +Note: In the example directory is a sample program called +crackcheck +that uses cracklib to check the password quality\&. +.sp +Default: +\fI\fIcheck password script\fR\fR\fI = \fR\fI # Disabled\fR\fI \fR +.sp +Example: +\fI\fIcheck password script\fR\fR\fI = \fR\fI/usr/local/sbin/crackcheck\fR\fI \fR +.RE + +cldap port (G) +.PP +.RS 4 +This option controls the port used by the CLDAP protocol\&. +.sp +Default: +\fI\fIcldap port\fR\fR\fI = \fR\fI389\fR\fI \fR +.sp +Example: +\fI\fIcldap port\fR\fR\fI = \fR\fI3389\fR\fI \fR +.RE + +client ipc max protocol (G) +.PP +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported for IPC$ connections as DCERPC transport\&. +.sp +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol\&. +.sp +The value +\fBdefault\fR +refers to the latest supported protocol, currently +\fBSMB3_11\fR\&. +.sp +See +\m[blue]\fBclient max protocol\fR\m[] +for a full list of available protocols\&. The values CORE, COREPLUS, LANMAN1, LANMAN2 are silently upgraded to NT1\&. +.sp +Default: +\fI\fIclient ipc max protocol\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.sp +Example: +\fI\fIclient ipc max protocol\fR\fR\fI = \fR\fISMB2_10\fR\fI \fR +.RE + +client ipc min protocol (G) +.PP +.RS 4 +This setting controls the minimum protocol version that the will be attempted to use for IPC$ connections as DCERPC transport\&. +.sp +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol\&. +.sp +The value +\fBdefault\fR +refers to the higher value of +\fBNT1\fR +and the effective value of +\m[blue]\fBclient min protocol\fR\m[]\&. +.sp +See +\m[blue]\fBclient max protocol\fR\m[] +for a full list of available protocols\&. The values CORE, COREPLUS, LANMAN1, LANMAN2 are silently upgraded to NT1\&. +.sp +Default: +\fI\fIclient ipc min protocol\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.sp +Example: +\fI\fIclient ipc min protocol\fR\fR\fI = \fR\fISMB3_11\fR\fI \fR +.RE + +client ipc signing (G) +.PP +.RS 4 +This controls whether the client is allowed or required to use SMB signing for IPC$ connections as DCERPC transport\&. Possible values are +\fIdesired\fR, +\fIrequired\fR +and +\fIdisabled\fR\&. +.sp +When set to required or default, SMB signing is mandatory\&. +.sp +When set to desired, SMB signing is offered, but not enforced and if set to disabled, SMB signing is not offered either\&. +.sp +Connections from winbindd to Active Directory Domain Controllers always enforce signing\&. +.sp +Default: +\fI\fIclient ipc signing\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +client lanman auth (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for LanMan (as distinct from NTLM, NTLMv2 or Kerberos) authentication as a client will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +client NTLMv2 auth = yes +will be the enforced behaviour\&. +.sp +This parameter determines whether or not +\fBsmbclient\fR(8) +and other samba client tools will attempt to authenticate itself to servers using the weaker LANMAN password hash\&. If disabled, only server which support NT password hashes (e\&.g\&. Windows NT/2000, Samba, etc\&.\&.\&. but not Windows 95/98) will be able to be connected from the Samba client\&. +.sp +The LANMAN encrypted response is easily broken, due to its case\-insensitive nature, and the choice of algorithm\&. Clients without Windows 95/98 servers are advised to disable this option\&. +.sp +Disabling this option will also disable the +client plaintext auth +option\&. +.sp +Likewise, if the +client ntlmv2 auth +parameter is enabled, then only NTLMv2 logins will be attempted\&. +.sp +Default: +\fI\fIclient lanman auth\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +client ldap sasl wrapping (G) +.PP +.RS 4 +The +\m[blue]\fBclient ldap sasl wrapping\fR\m[] +defines whether ldap traffic will be signed or signed and encrypted (sealed)\&. Possible values are +\fIplain\fR, +\fIsign\fR +and +\fIseal\fR\&. +.sp +The values +\fIsign\fR +and +\fIseal\fR +are only available if Samba has been compiled against a modern OpenLDAP version (2\&.3\&.x or higher)\&. +.sp +This option is needed in the case of Domain Controllers enforcing the usage of signed LDAP connections (e\&.g\&. Windows 2000 SP3 or higher)\&. LDAP sign and seal can be controlled with the registry key "HKLM\eSystem\eCurrentControlSet\eServices\e +NTDS\eParameters\eLDAPServerIntegrity" on the Windows server side\&. +.sp +Depending on the used KRB5 library (MIT and older Heimdal versions) it is possible that the message "integrity only" is not supported\&. In this case, +\fIsign\fR +is just an alias for +\fIseal\fR\&. +.sp +The default value is +\fIsign\fR\&. That implies synchronizing the time with the KDC in the case of using +\fIKerberos\fR\&. +.sp +Default: +\fI\fIclient ldap sasl wrapping\fR\fR\fI = \fR\fIsign\fR\fI \fR +.RE + +client max protocol (G) +.PP +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Possible values are : +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBCORE\fR: Earliest version\&. No concept of user names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBCOREPLUS\fR: Slight improvements on CORE for efficiency\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBLANMAN1\fR: First +\fImodern\fR +version of the protocol\&. Long filename support\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBLANMAN2\fR: Updates to Lanman1 protocol\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBNT1\fR: Current up to date version of the protocol\&. Used by Windows NT\&. Known as CIFS\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2\fR: Re\-implementation of the SMB protocol\&. Used by Windows Vista and later versions of Windows\&. SMB2 has sub protocols available\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2_02\fR: The earliest SMB2 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2_10\fR: Windows 7 SMB2 version\&. +.RE +.sp +.RE +By default SMB2 selects the SMB2_10 variant\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3\fR: The same as SMB2\&. Used by Windows 8\&. SMB3 has sub protocols available\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_00\fR: Windows 8 SMB3 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_02\fR: Windows 8\&.1 SMB3 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_11\fR: Windows 10 SMB3 version\&. +.RE +.sp +.RE +By default SMB3 selects the SMB3_11 variant\&. +.RE +.sp +.RE +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol\&. +.sp +The value +\fBdefault\fR +refers to +\fBSMB3_11\fR\&. +.sp +IPC$ connections for DCERPC e\&.g\&. in winbindd, are handled by the +\m[blue]\fBclient ipc max protocol\fR\m[] +option\&. +.sp +Default: +\fI\fIclient max protocol\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.sp +Example: +\fI\fIclient max protocol\fR\fR\fI = \fR\fILANMAN1\fR\fI \fR +.RE + +client min protocol (G) +.PP +.RS 4 +This setting controls the minimum protocol version that the client will attempt to use\&. +.sp +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol unless you connect to a legacy SMB1\-only server\&. +.sp +See +Related command: \m[blue]\fBclient max protocol\fR\m[] +for a full list of available protocols\&. +.sp +IPC$ connections for DCERPC e\&.g\&. in winbindd, are handled by the +\m[blue]\fBclient ipc min protocol\fR\m[] +option\&. +.sp +Note that most command line tools support \-\-option=\*(Aqclient min protocol=NT1\*(Aq, so it may not be required to enable SMB1 protocols globally in smb\&.conf\&. +.sp +Default: +\fI\fIclient min protocol\fR\fR\fI = \fR\fISMB2_02\fR\fI \fR +.sp +Example: +\fI\fIclient min protocol\fR\fR\fI = \fR\fINT1\fR\fI \fR +.RE + +client NTLMv2 auth (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for NTLM and LanMan (as distinct from NTLMv2 or Kerberos authentication) will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +client NTLMv2 auth = yes +will be the enforced behaviour\&. +.sp +This parameter determines whether or not +\fBsmbclient\fR(8) +will attempt to authenticate itself to servers using the NTLMv2 encrypted password response\&. +.sp +If enabled, only an NTLMv2 and LMv2 response (both much more secure than earlier versions) will be sent\&. Older servers (including NT4 < SP4, Win9x and Samba 2\&.2) are not compatible with NTLMv2 when not in an NTLMv2 supporting domain +.sp +Similarly, if enabled, NTLMv1, +client lanman auth +and +client plaintext auth +authentication will be disabled\&. This also disables share\-level authentication\&. +.sp +If disabled, an NTLM response (and possibly a LANMAN response) will be sent by the client, depending on the value of +client lanman auth\&. +.sp +Note that Windows Vista and later versions already use NTLMv2 by default, and some sites (particularly those following \*(Aqbest practice\*(Aq security polices) only allow NTLMv2 responses, and not the weaker LM or NTLM\&. +.sp +When +\m[blue]\fBclient use spnego\fR\m[] +is also set to +\fByes\fR +extended security (SPNEGO) is required in order to use NTLMv2 only within NTLMSSP\&. This behavior was introduced with the patches for CVE\-2016\-2111\&. +.sp +Default: +\fI\fIclient NTLMv2 auth\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +client plaintext auth (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for plaintext (as distinct from NTLM, NTLMv2 or Kerberos authentication) will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +client plaintext auth = no +will be the enforced behaviour\&. +.sp +Specifies whether a client should send a plaintext password if the server does not support encrypted passwords\&. +.sp +Default: +\fI\fIclient plaintext auth\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +client protection (G) +.PP +.RS 4 +This parameter defines which protection Samba client tools should use by default\&. +.sp +Possible client settings are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdefault\fR +\- Use the individual default values of the options: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIclient signing\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIclient smb encrypt\fR +.RE +.sp +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIplain\fR +\- This will send everything just as plaintext, signing or encryption are turned off\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsign\fR +\- This will enable integrity checking\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIencrypt\fR +\- This will enable integrity checks and force encryption for privacy\&. +.RE +.sp +.RE +Default: +\fI\fIclient protection\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +client schannel (G) +.PP +.RS 4 +This option is deprecated with Samba 4\&.8 and will be removed in future\&. At the same time the default changed to yes, which will be the hardcoded behavior in future\&. +.sp +This controls whether the client offers or even demands the use of the netlogon schannel\&. +\m[blue]\fBclient schannel = no\fR\m[] +does not offer the schannel, +\m[blue]\fBclient schannel = auto\fR\m[] +offers the schannel but does not enforce it, and +\m[blue]\fBclient schannel = yes\fR\m[] +denies access if the server is not able to speak netlogon schannel\&. +.sp +Note that for active directory domains this is hardcoded to +\m[blue]\fBclient schannel = yes\fR\m[]\&. +.sp +This option yields precedence to the +\m[blue]\fBrequire strong key\fR\m[] +option\&. +.sp +Default: +\fI\fIclient schannel\fR\fR\fI = \fR\fIyes\fR\fI \fR +.sp +Example: +\fI\fIclient schannel\fR\fR\fI = \fR\fIauto\fR\fI \fR +.RE + +client signing (G) +.PP +.RS 4 +This controls whether the client is allowed or required to use SMB signing\&. Possible values are +\fIdesired\fR, +\fIrequired\fR +and +\fIdisabled\fR\&. +.sp +When set to desired or default, SMB signing is offered, but not enforced\&. +.sp +When set to required, SMB signing is mandatory and if set to disabled, SMB signing is not offered either\&. +.sp +IPC$ connections for DCERPC e\&.g\&. in winbindd, are handled by the +\m[blue]\fBclient ipc signing\fR\m[] +option\&. +.sp +Default: +\fI\fIclient signing\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +client smb encrypt (G) +.PP +.RS 4 +This parameter controls whether a client should try or is required to use SMB encryption\&. It has different effects depending on whether the connection uses SMB1 or SMB3: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the connection uses SMB1, then this option controls the use of a Samba\-specific extension to the SMB protocol introduced in Samba 3\&.2 that makes use of the Unix extensions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the connection uses SMB2 or newer, then this option controls the use of the SMB\-level encryption that is supported in SMB version 3\&.0 and above and available in Windows 8 and newer\&. +.RE +.sp +.RE +This parameter can be set globally\&. Possible values are +\fIoff\fR, +\fIif_required\fR, +\fIdesired\fR, and +\fIrequired\fR\&. A special value is +\fIdefault\fR +which is the implicit default setting of +\fIif_required\fR\&. +.PP +\fIEffects for SMB1\fR +.RS 4 +The Samba\-specific encryption of SMB1 connections is an extension to the SMB protocol negotiated as part of the UNIX extensions\&. SMB encryption uses the GSSAPI (SSPI on Windows) ability to encrypt and sign every request/response in a SMB protocol stream\&. When enabled it provides a secure method of SMB/CIFS communication, similar to an ssh protected session, but using SMB/CIFS authentication to negotiate encryption and signing keys\&. Currently this is only supported smbclient of by Samba 3\&.2 and newer\&. Windows does not support this feature\&. +.sp +When set to default, SMB encryption is probed, but not enforced\&. When set to required, SMB encryption is required and if set to disabled, SMB encryption can not be negotiated\&. +.RE +.PP +\fIEffects for SMB3 and newer\fR +.RS 4 +Native SMB transport encryption is available in SMB version 3\&.0 or newer\&. It is only used by Samba if +\fIclient max protocol\fR +is set to +\fISMB3\fR +or newer\&. +.sp +These features can be controlled with settings of +\fIclient smb encrypt\fR +as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Leaving it as default, explicitly setting +\fIdefault\fR, or setting it to +\fIif_required\fR +globally will enable negotiation of encryption but will not turn on data encryption globally\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIdesired\fR +globally will enable negotiation and will turn on data encryption on sessions and share connections for those servers that support it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIrequired\fR +globally will enable negotiation and turn on data encryption on sessions and share connections\&. Clients that do not support encryption will be denied access to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIoff\fR +globally will completely disable the encryption feature for all connections\&. +.RE +.sp +.RE +.RE +.sp +Default: +\fI\fIclient smb encrypt\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +client smb3 encryption algorithms (G) +.PP +.RS 4 +This parameter specifies the availability and order of encryption algorithms which are available for negotiation in the SMB3_11 dialect\&. +.sp +It is also possible to remove individual algorithms from the default list, by prefixing them with \*(Aq\-\*(Aq\&. This can avoid having to specify a hardcoded list\&. +.sp +Note: that the removal of AES\-128\-CCM from the list will result in SMB3_00 and SMB3_02 being unavailable, as it is the default and only available algorithm for these dialects\&. +.sp +Default: +\fI\fIclient smb3 encryption algorithms\fR\fR\fI = \fR\fIAES\-128\-GCM, AES\-128\-CCM, AES\-256\-GCM, AES\-256\-CCM\fR\fI \fR +.sp +Example: +\fI\fIclient smb3 encryption algorithms\fR\fR\fI = \fR\fIAES\-256\-GCM\fR\fI \fR +.sp +Example: +\fI\fIclient smb3 encryption algorithms\fR\fR\fI = \fR\fI\-AES\-128\-GCM \-AES\-128\-CCM\fR\fI \fR +.RE + +client smb3 signing algorithms (G) +.PP +.RS 4 +This parameter specifies the availability and order of signing algorithms which are available for negotiation in the SMB3_11 dialect\&. +.sp +It is also possible to remove individual algorithms from the default list, by prefixing them with \*(Aq\-\*(Aq\&. This can avoid having to specify a hardcoded list\&. +.sp +Note: that the removal of AES\-128\-CMAC from the list will result in SMB3_00 and SMB3_02 being unavailable, and the removal of HMAC\-SHA256 will result in SMB2_02 and SMB2_10 being unavailable, as these are the default and only available algorithms for these dialects\&. +.sp +Default: +\fI\fIclient smb3 signing algorithms\fR\fR\fI = \fR\fIAES\-128\-GMAC, AES\-128\-CMAC, HMAC\-SHA256\fR\fI \fR +.sp +Example: +\fI\fIclient smb3 signing algorithms\fR\fR\fI = \fR\fIAES\-128\-CMAC, HMAC\-SHA256\fR\fI \fR +.sp +Example: +\fI\fIclient smb3 signing algorithms\fR\fR\fI = \fR\fI\-AES\-128\-CMAC\fR\fI \fR +.RE + +client use kerberos (G) +.PP +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Possible option settings are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdesired\fR +\- Kerberos authentication will be tried first and if it fails it automatically fallback to NTLM\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIrequired\fR +\- Kerberos authentication will be required\&. There will be no falllback to NTLM or a different alternative\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIoff\fR +\- Don\*(Aqt use Kerberos, use NTLM instead or another alternative\&. +.RE +.sp +.RE +In case that weak cryptography is not allowed (e\&.g\&. FIPS mode) the default will be forced to +\fIrequired\fR\&. +.sp +Default: +\fI\fIclient use kerberos\fR\fR\fI = \fR\fIdesired\fR\fI \fR +.RE + +client use spnego principal (G) +.PP +.RS 4 +This parameter determines whether or not +\fBsmbclient\fR(8) +and other samba components acting as a client will attempt to use the server\-supplied principal sometimes given in the SPNEGO exchange\&. +.sp +If enabled, Samba can attempt to use Kerberos to contact servers known only by IP address\&. Kerberos relies on names, so ordinarily cannot function in this situation\&. +.sp +This is a VERY BAD IDEA for security reasons, and so this parameter SHOULD NOT BE USED\&. It will be removed in a future version of Samba\&. +.sp +If disabled, Samba will use the name used to look up the server when asking the KDC for a ticket\&. This avoids situations where a server may impersonate another, soliciting authentication as one principal while being known on the network as another\&. +.sp +Note that Windows XP SP2 and later versions already follow this behaviour, and Windows Vista and later servers no longer supply this \*(Aqrfc4178 hint\*(Aq principal on the server side\&. +.sp +This parameter is deprecated in Samba 4\&.2\&.1 and will be removed (along with the functionality) in a later release of Samba\&. +.sp +Default: +\fI\fIclient use spnego principal\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +client use spnego (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for NTLMv2, NTLM and LanMan authentication outside NTLMSSP will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +client use spnego = yes +will be the enforced behaviour\&. +.sp +This variable controls whether Samba clients will try to use Simple and Protected NEGOciation (as specified by rfc2478) with supporting servers (including WindowsXP, Windows2000 and Samba 3\&.0) to agree upon an authentication mechanism\&. This enables Kerberos authentication in particular\&. +.sp +When +\m[blue]\fBclient NTLMv2 auth\fR\m[] +is also set to +\fByes\fR +extended security (SPNEGO) is required in order to use NTLMv2 only within NTLMSSP\&. This behavior was introduced with the patches for CVE\-2016\-2111\&. +.sp +Default: +\fI\fIclient use spnego\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +cluster addresses (G) +.PP +.RS 4 +With this parameter you can add additional addresses that nmbd will register with a WINS server\&. Similarly, these addresses will be registered by default when +\fInet ads dns register\fR +is called with +\m[blue]\fBclustering = yes\fR\m[] +configured\&. +.sp +Default: +\fI\fIcluster addresses\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIcluster addresses\fR\fR\fI = \fR\fI10\&.0\&.0\&.1 10\&.0\&.0\&.2 10\&.0\&.0\&.3\fR\fI \fR +.RE + +clustering (G) +.PP +.RS 4 +This parameter specifies whether Samba should contact ctdb for accessing its tdb files and use ctdb as a backend for its messaging backend\&. +.sp +Set this parameter to +yes +only if you have a cluster setup with ctdb running\&. +.sp +Default: +\fI\fIclustering\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +comment (S) +.PP +.RS 4 +This is a text field that is seen next to a share when a client does a queries the server, either via the network neighborhood or via +net view +to list what shares are available\&. +.sp +If you want to set the string that is displayed next to the machine name then see the +\m[blue]\fBserver string\fR\m[] +parameter\&. +.sp +Default: +\fI\fIcomment\fR\fR\fI = \fR\fI # No comment\fR\fI \fR +.sp +Example: +\fI\fIcomment\fR\fR\fI = \fR\fIFred\*(Aqs Files\fR\fI \fR +.RE + +config backend (G) +.PP +.RS 4 +This controls the backend for storing the configuration\&. Possible values are +\fIfile\fR +(the default) and +\fIregistry\fR\&. When +\m[blue]\fBconfig backend = registry\fR\m[] +is encountered while loading +\fIsmb\&.conf\fR, the configuration read so far is dropped and the global options are read from registry instead\&. So this triggers a registry only configuration\&. Share definitions are not read immediately but instead +\fIregistry shares\fR +is set to +\fIyes\fR\&. +.sp +Note: This option can not be set inside the registry configuration itself\&. +.sp +Default: +\fI\fIconfig backend\fR\fR\fI = \fR\fIfile\fR\fI \fR +.sp +Example: +\fI\fIconfig backend\fR\fR\fI = \fR\fIregistry\fR\fI \fR +.RE + +config file (G) +.PP +.RS 4 +This allows you to override the config file to use, instead of the default (usually +smb\&.conf)\&. There is a chicken and egg problem here as this option is set in the config file! +.sp +For this reason, if the name of the config file has changed when the parameters are loaded then it will reload them from the new config file\&. +.sp +This option takes the usual substitutions, which can be very useful\&. +.sp +If the config file doesn\*(Aqt exist then it won\*(Aqt be loaded (allowing you to special case the config files of just a few clients)\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fIconfig file\fR\fR\fI = \fR\fI/usr/local/samba/lib/smb\&.conf\&.%m\fR\fI \fR +.RE + +copy (S) +.PP +.RS 4 +This parameter allows you to "clone" service entries\&. The specified service is simply duplicated under the current service\*(Aqs name\&. Any parameters specified in the current section will override those in the section being copied\&. +.sp +This feature lets you set up a \*(Aqtemplate\*(Aq service and create similar services easily\&. Note that the service being copied must occur earlier in the configuration file than the service doing the copying\&. +.sp +Default: +\fI\fIcopy\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIcopy\fR\fR\fI = \fR\fIotherservice\fR\fI \fR +.RE + +create krb5 conf (G) +.PP +.RS 4 +Setting this parameter to +no +prevents winbind from creating custom krb5\&.conf files\&. Winbind normally does this because the krb5 libraries are not AD\-site\-aware and thus would pick any domain controller out of potentially very many\&. Winbind is site\-aware and makes the krb5 libraries use a local DC by creating its own krb5\&.conf files\&. +.sp +Preventing winbind from doing this might become necessary if you have to add special options into your system\-krb5\&.conf that winbind does not see\&. +.sp +Default: +\fI\fIcreate krb5 conf\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +create mode +.PP +.RS 4 +This parameter is a synonym for +create mask\&. +.RE + +create mask (S) +.PP +.RS 4 +When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit\-wise \*(AqAND\*(Aqed with this parameter\&. This parameter may be thought of as a bit\-wise MASK for the UNIX modes of a file\&. Any bit +\fInot\fR +set here will be removed from the modes set on a file when it is created\&. +.sp +The default value of this parameter removes the +group +and +other +write and execute bits from the UNIX modes\&. +.sp +Following this Samba will bit\-wise \*(AqOR\*(Aq the UNIX mode created from this parameter with the value of the +\m[blue]\fBforce create mode\fR\m[] +parameter which is set to 000 by default\&. +.sp +This parameter does not affect directory masks\&. See the parameter +\m[blue]\fBdirectory mask\fR\m[] +for details\&. +.sp +Default: +\fI\fIcreate mask\fR\fR\fI = \fR\fI0744\fR\fI \fR +.sp +Example: +\fI\fIcreate mask\fR\fR\fI = \fR\fI0775\fR\fI \fR +.RE + +csc policy (S) +.PP +.RS 4 +This stands for +\fIclient\-side caching policy\fR, and specifies how clients capable of offline caching will cache the files in the share\&. The valid values are: manual, documents, programs, disable\&. +.sp +These values correspond to those used on Windows servers\&. +.sp +For example, shares containing roaming profiles can have offline caching disabled using +\m[blue]\fBcsc policy = disable\fR\m[]\&. +.sp +Default: +\fI\fIcsc policy\fR\fR\fI = \fR\fImanual\fR\fI \fR +.sp +Example: +\fI\fIcsc policy\fR\fR\fI = \fR\fIprograms\fR\fI \fR +.RE + +ctdbd socket (G) +.PP +.RS 4 +If you set +clustering=yes, you need to tell Samba where ctdbd listens on its unix domain socket\&. The default path as of ctdb 1\&.0 is /tmp/ctdb\&.socket which you have to explicitly set for Samba in smb\&.conf\&. +.sp +Default: +\fI\fIctdbd socket\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIctdbd socket\fR\fR\fI = \fR\fI/tmp/ctdb\&.socket\fR\fI \fR +.RE + +ctdb locktime warn threshold (G) +.PP +.RS 4 +In a cluster environment using Samba and ctdb it is critical that locks on central ctdb\-hosted databases like locking\&.tdb are not held for long\&. With the current Samba architecture it happens that Samba takes a lock and while holding that lock makes file system calls into the shared cluster file system\&. This option makes Samba warn if it detects that it has held locks for the specified number of milliseconds\&. If this happens, +\fIsmbd\fR +will emit a debug level 0 message into its logs and potentially into syslog\&. The most likely reason for such a log message is that an operation of the cluster file system Samba exports is taking longer than expected\&. The messages are meant as a debugging aid for potential cluster problems\&. +.sp +The default value of 0 disables this logging\&. +.sp +Default: +\fI\fIctdb locktime warn threshold\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +ctdb timeout (G) +.PP +.RS 4 +This parameter specifies a timeout in milliseconds for the connection between Samba and ctdb\&. It is only valid if you have compiled Samba with clustering and if you have set +\fIclustering=yes\fR\&. +.sp +When something in the cluster blocks, it can happen that we wait indefinitely long for ctdb, just adding to the blocking condition\&. In a well\-running cluster this should never happen, but there are too many components in a cluster that might have hickups\&. Choosing the right balance for this value is very tricky, because on a busy cluster long service times to transfer something across the cluster might be valid\&. Setting it too short will degrade the service your cluster presents, setting it too long might make the cluster itself not recover from something severely broken for too long\&. +.sp +Be aware that if you set this parameter, this needs to be in the file smb\&.conf, it is not really helpful to put this into a registry configuration (typical on a cluster), because to access the registry contact to ctdb is required\&. +.sp +Setting +\fIctdb timeout\fR +to n makes any process waiting longer than n milliseconds for a reply by the cluster panic\&. Setting it to 0 (the default) makes Samba block forever, which is the highly recommended default\&. +.sp +Default: +\fI\fIctdb timeout\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +cups connection timeout (G) +.PP +.RS 4 +This parameter is only applicable if +\m[blue]\fBprinting\fR\m[] +is set to +\fBcups\fR\&. +.sp +If set, this option specifies the number of seconds that smbd will wait whilst trying to contact to the CUPS server\&. The connection will fail if it takes longer than this number of seconds\&. +.sp +Default: +\fI\fIcups connection timeout\fR\fR\fI = \fR\fI30\fR\fI \fR +.sp +Example: +\fI\fIcups connection timeout\fR\fR\fI = \fR\fI60\fR\fI \fR +.RE + +cups encrypt (G) +.PP +.RS 4 +This parameter is only applicable if +\m[blue]\fBprinting\fR\m[] +is set to +\fBcups\fR +and if you use CUPS newer than 1\&.0\&.x\&.It is used to define whether or not Samba should use encryption when talking to the CUPS server\&. Possible values are +\fIauto\fR, +\fIyes\fR +and +\fIno\fR +.sp +When set to auto we will try to do a TLS handshake on each CUPS connection setup\&. If that fails, we will fall back to unencrypted operation\&. +.sp +Default: +\fI\fIcups encrypt\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +cups options (S) +.PP +.RS 4 +This parameter is only applicable if +\m[blue]\fBprinting\fR\m[] +is set to +\fBcups\fR\&. Its value is a free form string of options passed directly to the cups library\&. +.sp +You can pass any generic print option known to CUPS (as listed in the CUPS "Software Users\*(Aq Manual")\&. You can also pass any printer specific option (as listed in "lpoptions \-d printername \-l") valid for the target queue\&. Multiple parameters should be space\-delimited name/value pairs according to the PAPI text option ABNF specification\&. Collection values ("name={a=\&.\&.\&. b=\&.\&.\&. c=\&.\&.\&.}") are stored with the curley brackets intact\&. +.sp +You should set this parameter to +\fBraw\fR +if your CUPS server +error_log +file contains messages such as "Unsupported format \*(Aqapplication/octet\-stream\*(Aq" when printing from a Windows client through Samba\&. It is no longer necessary to enable system wide raw printing in +/etc/cups/mime\&.{convs,types}\&. +.sp +Default: +\fI\fIcups options\fR\fR\fI = \fR\fI""\fR\fI \fR +.sp +Example: +\fI\fIcups options\fR\fR\fI = \fR\fI"raw media=a4"\fR\fI \fR +.RE + +cups server (G) +.PP +.RS 4 +This parameter is only applicable if +\m[blue]\fBprinting\fR\m[] +is set to +\fBcups\fR\&. +.sp +If set, this option overrides the ServerName option in the CUPS +client\&.conf\&. This is necessary if you have virtual samba servers that connect to different CUPS daemons\&. +.sp +Optionally, a port can be specified by separating the server name and port number with a colon\&. If no port was specified, the default port for IPP (631) will be used\&. +.sp +Default: +\fI\fIcups server\fR\fR\fI = \fR\fI""\fR\fI \fR +.sp +Example: +\fI\fIcups server\fR\fR\fI = \fR\fImycupsserver\fR\fI \fR +.sp +Example: +\fI\fIcups server\fR\fR\fI = \fR\fImycupsserver:1631\fR\fI \fR +.RE + +dcerpc endpoint servers (G) +.PP +.RS 4 +Specifies which DCE/RPC endpoint servers should be run\&. +.sp +Default: +\fI\fIdcerpc endpoint servers\fR\fR\fI = \fR\fIepmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver\fR\fI \fR +.sp +Example: +\fI\fIdcerpc endpoint servers\fR\fR\fI = \fR\fIrpcecho\fR\fI \fR +.RE + +deadtime (G) +.PP +.RS 4 +The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected\&. The deadtime only takes effect if the number of open files is zero\&. +.sp +This is useful to stop a server\*(Aqs resources being exhausted by a large number of inactive connections\&. +.sp +Most clients have an auto\-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users\&. +.sp +Using this parameter with a timeout of a few minutes is recommended for most systems\&. +.sp +A deadtime of zero indicates that no auto\-disconnection should be performed\&. +.sp +Default: +\fI\fIdeadtime\fR\fR\fI = \fR\fI10080\fR\fI \fR +.sp +Example: +\fI\fIdeadtime\fR\fR\fI = \fR\fI15\fR\fI \fR +.RE + +debug class (G) +.PP +.RS 4 +With this boolean parameter enabled, the debug class (DBGC_CLASS) will be displayed in the debug header\&. +.sp +For more information about currently available debug classes, see section about +\m[blue]\fBlog level\fR\m[]\&. +.sp +Default: +\fI\fIdebug class\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug encryption (G) +.PP +.RS 4 +This option will make the smbd server and client code using libsmb (smbclient, smbget, smbspool, \&.\&.\&.) dump the Session Id, the decrypted Session Key, the Signing Key, the Application Key, the Encryption Key and the Decryption Key every time an SMB3+ session is established\&. This information will be printed in logs at level 0\&. +.sp +Warning: access to these values enables the decryption of any encrypted traffic on the dumped sessions\&. This option should only be enabled for debugging purposes\&. +.sp +Default: +\fI\fIdebug encryption\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug hires timestamp (G) +.PP +.RS 4 +Sometimes the timestamps in the log messages are needed with a resolution of higher that seconds, this boolean parameter adds microsecond resolution to the timestamp message header when turned on\&. +.sp +Note that the parameter +\m[blue]\fBdebug timestamp\fR\m[] +or +\m[blue]\fBdebug syslog format\fR\m[] +must be on for this to have an effect\&. +.sp +Default: +\fI\fIdebug hires timestamp\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +debug pid (G) +.PP +.RS 4 +When using only one log file for more then one forked +\fBsmbd\fR(8)\-process there may be hard to follow which process outputs which message\&. This boolean parameter is adds the process\-id to the timestamp message headers in the logfile when turned on\&. +.sp +Note that the parameter +\m[blue]\fBdebug timestamp\fR\m[] +must be on for this to have an effect\&. +.sp +Default: +\fI\fIdebug pid\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug prefix timestamp (G) +.PP +.RS 4 +With this option enabled, the timestamp message header is prefixed to the debug message without the filename and function information that is included with the +\m[blue]\fBdebug timestamp\fR\m[] +parameter\&. This gives timestamps to the messages without adding an additional line\&. +.sp +Note that this parameter overrides the +\m[blue]\fBdebug timestamp\fR\m[] +parameter\&. +.sp +Default: +\fI\fIdebug prefix timestamp\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug syslog format (G) +.PP +.RS 4 +With this option enabled, debug messages are printed in a single\-line format like that traditionally produced by syslog\&. The timestamp consists of an abbreviated month, space\-padded date, and time including seconds\&. This is followed by the hostname and the program name, with the process\-ID in square brackets\&. +.sp +If +\m[blue]\fBdebug hires timestamp\fR\m[] +is also enabled then an RFC5424 timestamp is used instead\&. +.sp +Default: +\fI\fIdebug syslog format\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug uid (G) +.PP +.RS 4 +Samba is sometimes run as root and sometime run as the connected user, this boolean parameter inserts the current euid, egid, uid and gid to the timestamp message headers in the log file if turned on\&. +.sp +Note that the parameter +\m[blue]\fBdebug timestamp\fR\m[] +must be on for this to have an effect\&. +.sp +Default: +\fI\fIdebug uid\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dedicated keytab file (G) +.PP +.RS 4 +Specifies the absolute path to the kerberos keytab file when +\m[blue]\fBkerberos method\fR\m[] +is set to "dedicated keytab"\&. +.sp +Default: +\fI\fIdedicated keytab file\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdedicated keytab file\fR\fR\fI = \fR\fI/usr/local/etc/krb5\&.keytab\fR\fI \fR +.RE + +default case (S) +.PP +.RS 4 +See the section on +\m[blue]\fBname mangling\fR\m[]\&. Also note the +\m[blue]\fBshort preserve case\fR\m[] +parameter\&. +.sp +Default: +\fI\fIdefault case\fR\fR\fI = \fR\fIlower\fR\fI \fR +.RE + +default devmode (S) +.PP +.RS 4 +This parameter is only applicable to +\m[blue]\fBprintable\fR\m[] +services\&. When smbd is serving Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba server has a Device Mode which defines things such as paper size and orientation and duplex settings\&. The device mode can only correctly be generated by the printer driver itself (which can only be executed on a Win32 platform)\&. Because smbd is unable to execute the driver code to generate the device mode, the default behavior is to set this field to NULL\&. +.sp +Most problems with serving printer drivers to Windows NT/2k/XP clients can be traced to a problem with the generated device mode\&. Certain drivers will do things such as crashing the client\*(Aqs Explorer\&.exe with a NULL devmode\&. However, other printer drivers can cause the client\*(Aqs spooler service (spoolsv\&.exe) to die if the devmode was not created by the driver itself (i\&.e\&. smbd generates a default devmode)\&. +.sp +This parameter should be used with care and tested with the printer driver in question\&. It is better to leave the device mode to NULL and let the Windows client set the correct values\&. Because drivers do not do this all the time, setting +default devmode = yes +will instruct smbd to generate a default one\&. +.sp +For more information on Windows NT/2k printing and Device Modes, see the +MSDN documentation\&. +.sp +Default: +\fI\fIdefault devmode\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +default +.PP +.RS 4 +This parameter is a synonym for +default service\&. +.RE + +default service (G) +.PP +.RS 4 +This parameter specifies the name of a service which will be connected to if the service actually requested cannot be found\&. Note that the square brackets are +\fINOT\fR +given in the parameter value (see example below)\&. +.sp +There is no default value for this parameter\&. If this parameter is not given, attempting to connect to a nonexistent service results in an error\&. +.sp +Typically the default service would be a +\m[blue]\fBguest ok\fR\m[], +\m[blue]\fBread\-only\fR\m[] +service\&. +.sp +Also note that the apparent service name will be changed to equal that of the requested service, this is very useful as it allows you to use macros like +\fI%S\fR +to make a wildcard service\&. +.sp +Note also that any "_" characters in the name of the service used in the default service will get mapped to a "/"\&. This allows for interesting things\&. +.sp +Default: +\fI\fIdefault service\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdefault service\fR\fR\fI = \fR\fIpub\fR\fI \fR +.RE + +defer sharing violations (G) +.PP +.RS 4 +Windows allows specifying how a file will be shared with other processes when it is opened\&. Sharing violations occur when a file is opened by a different process using options that violate the share settings specified by other processes\&. This parameter causes smbd to act as a Windows server does, and defer returning a "sharing violation" error message for up to one second, allowing the client to close the file causing the violation in the meantime\&. +.sp +UNIX by default does not have this behaviour\&. +.sp +There should be no reason to turn off this parameter, as it is designed to enable Samba to more correctly emulate Windows\&. +.sp +Default: +\fI\fIdefer sharing violations\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +delete group script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run +\fIAS ROOT\fR +by +\fBsmbd\fR(8) +when a group is requested to be deleted\&. It will expand any +\fI%g\fR +to the group name passed\&. This script is only useful for installations using the Windows NT domain administration tools\&. +.sp +Default: +\fI\fIdelete group script\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +deleteprinter command (G) +.PP +.RS 4 +With the introduction of MS\-RPC based printer support for Windows NT/2000 clients in Samba 2\&.2, it is now possible to delete a printer at run time by issuing the DeletePrinter() RPC call\&. +.sp +For a Samba host this means that the printer must be physically deleted from the underlying printing system\&. The +\m[blue]\fBdeleteprinter command\fR\m[] +defines a script to be run which will perform the necessary operations for removing the printer from the print system and from +smb\&.conf\&. +.sp +The +\m[blue]\fBdeleteprinter command\fR\m[] +is automatically called with only one parameter: +\m[blue]\fBprinter name\fR\m[]\&. +.sp +Once the +\m[blue]\fBdeleteprinter command\fR\m[] +has been executed, +smbd +will reparse the +smb\&.conf +to check that the associated printer no longer exists\&. If the sharename is still valid, then +smbd +will return an ACCESS_DENIED error to the client\&. +.sp +Default: +\fI\fIdeleteprinter command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdeleteprinter command\fR\fR\fI = \fR\fI/usr/bin/removeprinter\fR\fI \fR +.RE + +delete readonly (S) +.PP +.RS 4 +This parameter allows readonly files to be deleted\&. This is not normal DOS semantics, but is allowed by UNIX\&. +.sp +This option may be useful for running applications such as rcs, where UNIX file ownership prevents changing file permissions, and DOS semantics prevent deletion of a read only file\&. +.sp +Default: +\fI\fIdelete readonly\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +delete share command (G) +.PP +.RS 4 +Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The +\fIdelete share command\fR +is used to define an external program or script which will remove an existing service definition from +smb\&.conf\&. +.sp +In order to successfully execute the +\fIdelete share command\fR, +smbd +requires that the administrator connects using a root account (i\&.e\&. uid == 0) or has the +SeDiskOperatorPrivilege\&. Scripts defined in the +\fIdelete share command\fR +parameter are executed as root\&. +.sp +When executed, +smbd +will automatically invoke the +\fIdelete share command\fR +with two parameters\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIconfigFile\fR +\- the location of the global +smb\&.conf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshareName\fR +\- the name of the existing service\&. +.RE +.sp +.RE +This parameter is only used to remove file shares\&. To delete printer shares, see the +\m[blue]\fBdeleteprinter command\fR\m[]\&. +.sp +Default: +\fI\fIdelete share command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdelete share command\fR\fR\fI = \fR\fI/usr/local/bin/delshare\fR\fI \fR +.RE + +delete user from group script (G) +.PP +.RS 4 +Full path to the script that will be called when a user is removed from a group using the Windows NT domain administration tools\&. It will be run by +\fBsmbd\fR(8) +\fIAS ROOT\fR\&. Any +\fI%g\fR +will be replaced with the group name and any +\fI%u\fR +will be replaced with the user name\&. +.sp +Default: +\fI\fIdelete user from group script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdelete user from group script\fR\fR\fI = \fR\fI/usr/sbin/deluser %u %g\fR\fI \fR +.RE + +delete user script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run by +\fBsmbd\fR(8) +when managing users with remote RPC (NT) tools\&. +.sp +This script is called when a remote client removes a user from the server, normally using \*(AqUser Manager for Domains\*(Aq or +rpcclient\&. +.sp +This script should delete the given UNIX username\&. +.sp +Default: +\fI\fIdelete user script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdelete user script\fR\fR\fI = \fR\fI/usr/local/samba/bin/del_user %u\fR\fI \fR +.RE + +delete veto files (S) +.PP +.RS 4 +This option is used when Samba is attempting to delete a directory that contains one or more vetoed files or directories or non\-visible files or directories (such as dangling symlinks that point nowhere)\&. (see the +\m[blue]\fBveto files\fR\m[], +\m[blue]\fBhide special files\fR\m[], +\m[blue]\fBhide unreadable\fR\m[], +\m[blue]\fBhide unwriteable files\fR\m[] +options)\&. If this option is set to +\fBno\fR +(the default) then if a vetoed directory contains any non\-vetoed files or directories then the directory delete will fail\&. This is usually what you want\&. +.sp +If this option is set to +\fByes\fR, then Samba will attempt to recursively delete any files and directories within the vetoed directory\&. This can be useful for integration with file serving systems such as NetAtalk which create meta\-files within directories you might normally veto DOS/Windows users from seeing (e\&.g\&. +\&.AppleDouble) +.sp +Setting +\m[blue]\fBdelete veto files = yes\fR\m[] +allows these directories to be transparently deleted when the parent directory is deleted (so long as the user has permissions to do so)\&. +.sp +Default: +\fI\fIdelete veto files\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dfree cache time (S) +.PP +.RS 4 +The +\fIdfree cache time\fR +should only be used on systems where a problem occurs with the internal disk space calculations\&. This has been known to happen with Ultrix, but may occur with other operating systems\&. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing\&. +.sp +This is a new parameter introduced in Samba version 3\&.0\&.21\&. It specifies in seconds the time that smbd will cache the output of a disk free query\&. If set to zero (the default) no caching is done\&. This allows a heavily loaded server to prevent rapid spawning of +\m[blue]\fBdfree command\fR\m[] +scripts increasing the load\&. +.sp +By default this parameter is zero, meaning no caching will be done\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fIdfree cache time\fR\fR\fI = \fR\fI60\fR\fI \fR +.RE + +dfree command (S) +.PP +.RS 4 +The +\fIdfree command\fR +setting should only be used on systems where a problem occurs with the internal disk space calculations\&. This has been known to happen with Ultrix, but may occur with other operating systems\&. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing\&. +.sp +This setting allows the replacement of the internal routines to calculate the total disk space and amount available with an external routine\&. The example below gives a possible script that might fulfill this function\&. +.sp +In Samba version 3\&.0\&.21 this parameter has been changed to be a per\-share parameter, and in addition the parameter +\m[blue]\fBdfree cache time\fR\m[] +was added to allow the output of this script to be cached for systems under heavy load\&. +.sp +The external program will be passed a single parameter indicating a directory in the filesystem being queried\&. This will typically consist of the string +\&./\&. The script should return two integers in ASCII\&. The first should be the total disk space in blocks, and the second should be the number of available blocks\&. An optional third return value can give the block size in bytes\&. The default blocksize is 1024 bytes\&. +.sp +Note: Your script should +\fINOT\fR +be setuid or setgid and should be owned by (and writeable only by) root! +.sp +Where the script dfree (which must be made executable) could be: +.sp +.if n \{\ +.RS 4 +.\} +.nf + +#!/bin/sh +df "$1" | tail \-1 | awk \*(Aq{print $(NF\-4),$(NF\-2)}\*(Aq +.fi +.if n \{\ +.RE +.\} +.sp +or perhaps (on Sys V based systems): +.sp +.if n \{\ +.RS 4 +.\} +.nf + +#!/bin/sh +/usr/bin/df \-k "$1" | tail \-1 | awk \*(Aq{print $3" "$5}\*(Aq +.fi +.if n \{\ +.RE +.\} +.sp +Note that you may have to replace the command names with full path names on some systems\&. Also note the arguments passed into the script should be quoted inside the script in case they contain special characters such as spaces or newlines\&. +.sp +By default internal routines for determining the disk capacity and remaining space will be used\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fIdfree command\fR\fR\fI = \fR\fI/usr/local/samba/bin/dfree\fR\fI \fR +.RE + +dgram port (G) +.PP +.RS 4 +Specifies which ports the server should listen on for NetBIOS datagram traffic\&. +.sp +Default: +\fI\fIdgram port\fR\fR\fI = \fR\fI138\fR\fI \fR +.RE + +directory mode +.PP +.RS 4 +This parameter is a synonym for +directory mask\&. +.RE + +directory mask (S) +.PP +.RS 4 +This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories\&. +.sp +When a directory is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit\-wise \*(AqAND\*(Aqed with this parameter\&. This parameter may be thought of as a bit\-wise MASK for the UNIX modes of a directory\&. Any bit +\fInot\fR +set here will be removed from the modes set on a directory when it is created\&. +.sp +The default value of this parameter removes the \*(Aqgroup\*(Aq and \*(Aqother\*(Aq write bits from the UNIX mode, allowing only the user who owns the directory to modify it\&. +.sp +Following this Samba will bit\-wise \*(AqOR\*(Aq the UNIX mode created from this parameter with the value of the +\m[blue]\fBforce directory mode\fR\m[] +parameter\&. This parameter is set to 000 by default (i\&.e\&. no extra mode bits are added)\&. +.sp +Default: +\fI\fIdirectory mask\fR\fR\fI = \fR\fI0755\fR\fI \fR +.sp +Example: +\fI\fIdirectory mask\fR\fR\fI = \fR\fI0775\fR\fI \fR +.RE + +directory name cache size (S) +.PP +.RS 4 +This parameter specifies the size of the directory name cache for SMB1 connections\&. It is not used for SMB2\&. It will be needed to turn this off for *BSD systems\&. +.sp +Default: +\fI\fIdirectory name cache size\fR\fR\fI = \fR\fI100\fR\fI \fR +.RE + +directory security mask (S) +.PP +.RS 4 +This parameter has been removed for Samba 4\&.0\&.0\&. +.sp +\fINo default\fR +.RE + +disable netbios (G) +.PP +.RS 4 +Enabling this parameter will disable netbios support in Samba\&. Netbios is the only available form of browsing in all windows versions except for 2000 and XP\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Clients that only support netbios won\*(Aqt be able to see your samba server when netbios support is disabled\&. +.sp .5v +.RE +Default: +\fI\fIdisable netbios\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +disable spoolss (G) +.PP +.RS 4 +Enabling this parameter will disable Samba\*(Aqs support for the SPOOLSS set of MS\-RPC\*(Aqs and will yield identical behavior as Samba 2\&.0\&.x\&. Windows NT/2000 clients will downgrade to using Lanman style printing commands\&. Windows 9x/ME will be unaffected by the parameter\&. However, this will also disable the ability to upload printer drivers to a Samba server via the Windows NT Add Printer Wizard or by using the NT printer properties dialog window\&. It will also disable the capability of Windows NT/2000 clients to download print drivers from the Samba host upon demand\&. +\fIBe very careful about enabling this parameter\&.\fR +.sp +Default: +\fI\fIdisable spoolss\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dmapi support (S) +.PP +.RS 4 +This parameter specifies whether Samba should use DMAPI to determine whether a file is offline or not\&. This would typically be used in conjunction with a hierarchical storage system that automatically migrates files to tape\&. +.sp +Note that Samba infers the status of a file by examining the events that a DMAPI application has registered interest in\&. This heuristic is satisfactory for a number of hierarchical storage systems, but there may be system for which it will fail\&. In this case, Samba may erroneously report files to be offline\&. +.sp +This parameter is only available if a supported DMAPI implementation was found at compilation time\&. It will only be used if DMAPI is found to enabled on the system at run time\&. +.sp +Default: +\fI\fIdmapi support\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dns forwarder (G) +.PP +.RS 4 +This option specifies the list of DNS servers that DNS requests will be forwarded to if they can not be handled by Samba itself\&. +.sp +The DNS forwarder is only used if the internal DNS server in Samba is used\&. Port numbers can be appended by separating them from the address by using a colon (\*(Aq:\*(Aq)\&. When specifying a port, IPv6 addresses must be enclosed in square brackets (\*(Aq[\*(Aq and \*(Aq]\*(Aq)\&. IPv6 forwarder addresses with no port specified, don\*(Aqt need the square brackets, and default to port 53\&. +.sp +Default: +\fI\fIdns forwarder\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdns forwarder\fR\fR\fI = \fR\fI192\&.168\&.0\&.1 192\&.168\&.0\&.2 ::1 [2001:db8::1] [2001:db8:1:2::1]:54 \fR\fI \fR +.RE + +dns proxy (G) +.PP +.RS 4 +Specifies that +\fBnmbd\fR(8) +when acting as a WINS server and finding that a NetBIOS name has not been registered, should treat the NetBIOS name word\-for\-word as a DNS name and do a lookup with the DNS server for that name on behalf of the name\-querying client\&. +.sp +Note that the maximum length for a NetBIOS name is 15 characters, so the DNS name (or DNS alias) can likewise only be 15 characters, maximum\&. +.sp +nmbd +spawns a second copy of itself to do the DNS name lookup requests, as doing a name lookup is a blocking action\&. +.sp +Default: +\fI\fIdns proxy\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +dns update command (G) +.PP +.RS 4 +This option sets the command that is called when there are DNS updates\&. It should update the local machines DNS names using TSIG\-GSS\&. +.sp +Default: +\fI\fIdns update command\fR\fR\fI = \fR\fI/wrkdirs/usr/ports/net/samba416/work/samba\-4\&.16\&.4/source4/scripting/bin/samba_dnsupdate\fR\fI \fR +.sp +Example: +\fI\fIdns update command\fR\fR\fI = \fR\fI/usr/local/sbin/dnsupdate\fR\fI \fR +.RE + +dns zone scavenging (G) +.PP +.RS 4 +When enabled (the default is disabled) unused dynamic dns records are periodically removed\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +This option should not be enabled for installations created with versions of samba before 4\&.9\&. Doing this will result in the loss of static DNS entries\&. This is due to a bug in previous versions of samba (BUG 12451) which marked dynamic DNS records as static and static records as dynamic\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If one record for a DNS name is static (non\-aging) then no other record for that DNS name will be scavenged\&. +.sp .5v +.RE +Default: +\fI\fIdns zone scavenging\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dns zone transfer clients allow (G) +.PP +.RS 4 +This option specifies the list of IPs authorized to ask for dns zone transfer from bind DLZ module\&. +.sp +The IP list is comma and space separated and specified in the same syntax as used in +\m[blue]\fBhosts allow\fR\m[], specifically including IP address, IP prefixes and IP address masks\&. +.sp +As this is a DNS server option, hostnames are naturally not permitted\&. +.sp +The default behaviour is to deny any request\&. A request will be authorized only if the emitting client is identified in this list, and not in +\m[blue]\fBdns zone transfer clients deny\fR\m[] +.sp +Default: +\fI\fIdns zone transfer clients allow\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdns zone transfer clients allow\fR\fR\fI = \fR\fI192\&.168\&.0\&.1\fR\fI \fR +.RE + +dns zone transfer clients deny (G) +.PP +.RS 4 +This option specifies the list of IPs denied to ask for dns zone transfer from bind DLZ module\&. +.sp +The IP list is comma and space separated and specified in the same syntax as used in +\m[blue]\fBhosts allow\fR\m[], specifically including IP address, IP prefixes and IP address masks\&. +.sp +As this is a DNS server option, hostnames are naturally not permitted\&. +.sp +If a client identified in this list sends a zone transfer request, it will always be denied, even if they are in +\m[blue]\fBdns zone transfer clients allow\fR\m[]\&. This allows the definition of specific denied clients within an authorized subnet\&. +.sp +Default: +\fI\fIdns zone transfer clients deny\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdns zone transfer clients deny\fR\fR\fI = \fR\fI192\&.168\&.0\&.1\fR\fI \fR +.RE + +domain logons (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for NT4\-style domain logons(as distinct from the Samba AD DC) will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +domain logons = no +will be the enforced behaviour\&. +.sp +If set to +\fByes\fR, the Samba server will provide the netlogon service for Windows 9X network logons for the +\m[blue]\fBworkgroup\fR\m[] +it is in\&. This will also cause the Samba server to act as a domain controller for NT4 style domain services\&. For more details on setting up this feature see the Domain Control chapter of the Samba HOWTO Collection\&. +.sp +Default: +\fI\fIdomain logons\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +domain master (G) +.PP +.RS 4 +Tell +\fBsmbd\fR(8) +to enable WAN\-wide browse list collation\&. Setting this option causes +nmbd +to claim a special domain specific NetBIOS name that identifies it as a domain master browser for its given +\m[blue]\fBworkgroup\fR\m[]\&. Local master browsers in the same +\m[blue]\fBworkgroup\fR\m[] +on broadcast\-isolated subnets will give this +nmbd +their local browse lists, and then ask +\fBsmbd\fR(8) +for a complete copy of the browse list for the whole wide area network\&. Browser clients will then contact their local master browser, and will receive the domain\-wide browse list, instead of just the list for their broadcast\-isolated subnet\&. +.sp +Note that Windows NT Primary Domain Controllers expect to be able to claim this +\m[blue]\fBworkgroup\fR\m[] +specific special NetBIOS name that identifies them as domain master browsers for that +\m[blue]\fBworkgroup\fR\m[] +by default (i\&.e\&. there is no way to prevent a Windows NT PDC from attempting to do this)\&. This means that if this parameter is set and +nmbd +claims the special name for a +\m[blue]\fBworkgroup\fR\m[] +before a Windows NT PDC is able to do so then cross subnet browsing will behave strangely and may fail\&. +.sp +If +\m[blue]\fBdomain logons = yes\fR\m[], then the default behavior is to enable the +\m[blue]\fBdomain master\fR\m[] +parameter\&. If +\m[blue]\fBdomain logons\fR\m[] +is not enabled (the default setting), then neither will +\m[blue]\fBdomain master\fR\m[] +be enabled by default\&. +.sp +When +\m[blue]\fBdomain logons = Yes\fR\m[] +the default setting for this parameter is Yes, with the result that Samba will be a PDC\&. If +\m[blue]\fBdomain master = No\fR\m[], Samba will function as a BDC\&. In general, this parameter should be set to \*(AqNo\*(Aq only on a BDC\&. +.sp +Default: +\fI\fIdomain master\fR\fR\fI = \fR\fIauto\fR\fI \fR +.RE + +dont descend (S) +.PP +.RS 4 +There are certain directories on some systems (e\&.g\&., the +/proc +tree under Linux) that are either not of interest to clients or are infinitely deep (recursive)\&. This parameter allows you to specify a comma\-delimited list of directories that the server should always show as empty\&. +.sp +Note that Samba can be very fussy about the exact format of the "dont descend" entries\&. For example you may need +\&./proc +instead of just +/proc\&. Experimentation is the best policy :\-) +.sp +Default: +\fI\fIdont descend\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIdont descend\fR\fR\fI = \fR\fI/proc,/dev\fR\fI \fR +.RE + +dos charset (G) +.PP +.RS 4 +DOS SMB clients assume the server has the same charset as they do\&. This option specifies which charset Samba should talk to DOS clients\&. +.sp +The default depends on which charsets you have installed\&. Samba tries to use charset 850 but falls back to ASCII in case it is not available\&. Run +\fBtestparm\fR(1) +to check the default on your system\&. +.sp +\fINo default\fR +.RE + +dos filemode (S) +.PP +.RS 4 +The default behavior in Samba is to provide UNIX\-like behavior where only the owner of a file/directory is able to change the permissions on it\&. However, this behavior is often confusing to DOS/Windows users\&. Enabling this parameter allows a user who has write access to the file (by whatever means, including an ACL permission) to modify the permissions (including ACL) on it\&. Note that a user belonging to the group owning the file will not be allowed to change permissions if the group is only granted read access\&. Ownership of the file/directory may also be changed\&. Note that using the VFS modules acl_xattr or acl_tdb which store native Windows as meta\-data will automatically turn this option on for any share for which they are loaded, as they require this option to emulate Windows ACLs correctly\&. +.sp +Default: +\fI\fIdos filemode\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dos filetime resolution (S) +.PP +.RS 4 +Under the DOS and Windows FAT filesystem, the finest granularity on time resolution is two seconds\&. Setting this parameter for a share causes Samba to round the reported time down to the nearest two second boundary when a query call that requires one second resolution is made to +\fBsmbd\fR(8)\&. +.sp +This option is mainly used as a compatibility option for Visual C++ when used against Samba shares\&. If oplocks are enabled on a share, Visual C++ uses two different time reading calls to check if a file has changed since it was last read\&. One of these calls uses a one\-second granularity, the other uses a two second granularity\&. As the two second call rounds any odd second down, then if the file has a timestamp of an odd number of seconds then the two timestamps will not match and Visual C++ will keep reporting the file has changed\&. Setting this option causes the two timestamps to match, and Visual C++ is happy\&. +.sp +Default: +\fI\fIdos filetime resolution\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dos filetimes (S) +.PP +.RS 4 +Under DOS and Windows, if a user can write to a file they can change the timestamp on it\&. Under POSIX semantics, only the owner of the file or root may change the timestamp\&. By default, Samba emulates the DOS semantics and allows one to change the timestamp on a file if the user +smbd +is acting on behalf has write permissions\&. Due to changes in Microsoft Office 2000 and beyond, the default for this parameter has been changed from "no" to "yes" in Samba 3\&.0\&.14 and above\&. Microsoft Excel will display dialog box warnings about the file being changed by another user if this parameter is not set to "yes" and files are being shared between users\&. +.sp +Default: +\fI\fIdos filetimes\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +dsdb event notification (G) +.PP +.RS 4 +When enabled, this option causes Samba (acting as an Active Directory Domain Controller) to stream Samba database events across the internal message bus\&. Scripts built using Samba\*(Aqs python bindings can listen to these events by registering as the service +dsdb_event\&. +.sp +This is +\fInot\fR +needed for the audit logging described in +\m[blue]\fBlog level\fR\m[]\&. +.sp +Instead, this should instead be considered a developer option (it assists in the Samba testsuite) rather than a facility for external auditing, as message delivery is not guaranteed (a feature that the testsuite works around)\&. +.sp +The Samba database events are also logged via the normal logging methods when the +\m[blue]\fBlog level\fR\m[] +is set appropriately, say to +dsdb_json_audit:5\&. +.sp +Default: +\fI\fIdsdb event notification\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dsdb group change notification (G) +.PP +.RS 4 +When enabled, this option causes Samba (acting as an Active Directory Domain Controller) to stream group membership change events across the internal message bus\&. Scripts built using Samba\*(Aqs python bindings can listen to these events by registering as the service +dsdb_group_event\&. +.sp +This is +\fInot\fR +needed for the audit logging described in +\m[blue]\fBlog level\fR\m[]\&. +.sp +Instead, this should instead be considered a developer option (it assists in the Samba testsuite) rather than a facility for external auditing, as message delivery is not guaranteed (a feature that the testsuite works around)\&. +.sp +The Samba database events are also logged via the normal logging methods when the +\m[blue]\fBlog level\fR\m[] +is set appropriately, say to +dsdb_group_json_audit:5\&. +.sp +Default: +\fI\fIdsdb group change notification\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +dsdb password event notification (G) +.PP +.RS 4 +When enabled, this option causes Samba (acting as an Active Directory Domain Controller) to stream password change and reset events across the internal message bus\&. Scripts built using Samba\*(Aqs python bindings can listen to these events by registering as the service +password_event\&. +.sp +This is +\fInot\fR +needed for the audit logging described in +\m[blue]\fBlog level\fR\m[]\&. +.sp +Instead, this should instead be considered a developer option (it assists in the Samba testsuite) rather than a facility for external auditing, as message delivery is not guaranteed (a feature that the testsuite works around)\&. +.sp +The Samba database events are also logged via the normal logging methods when the +\m[blue]\fBlog level\fR\m[] +is set appropriately, say to +dsdb_password_json_audit:5\&. +.sp +Default: +\fI\fIdsdb password event notification\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +durable handles (S) +.PP +.RS 4 +This boolean parameter controls whether Samba can grant SMB2 durable file handles on a share\&. +.sp +Note that durable handles are only enabled if +\m[blue]\fBkernel oplocks = no\fR\m[], +\m[blue]\fBkernel share modes = no\fR\m[], and +\m[blue]\fBposix locking = no\fR\m[], i\&.e\&. if the share is configured for CIFS/SMB2 only access, not supporting interoperability features with local UNIX processes or NFS operations\&. +.sp +Also note that, for the time being, durability is not granted for a handle that has the delete on close flag set\&. +.sp +Default: +\fI\fIdurable handles\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ea support (S) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will allow clients to attempt to access extended attributes on a share\&. In order to enable this parameter on a setup with default VFS modules: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Samba must have been built with extended attributes support\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The underlying filesystem exposed by the share must support extended attributes (e\&.g\&. the getfattr(1) +/ setfattr(1) +utilities must work)\&. +.RE +.sp +.RE +Note that the SMB protocol allows setting attributes whose value is 64K bytes long, and that on NTFS, the maximum storage space for extended attributes per file is 64K\&. On most UNIX systems (Solaris and ZFS file system being the exception), the limits are much lower \- typically 4K\&. Worse, the same 4K space is often used to store system metadata such as POSIX ACLs, or Samba\*(Aqs NT ACLs\&. Giving clients access to this tight space via extended attribute support could consume all of it by unsuspecting client applications, which would prevent changing system metadata due to lack of space\&. The default has changed to yes in Samba release 4\&.9\&.0 and above to allow better Windows fileserver compatibility in a default install\&. +.sp +Default: +\fI\fIea support\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +elasticsearch:address (S) +.PP +.RS 4 +Specifies the name of the Elasticsearch server to use for Spotlight queries when using the Elasticsearch backend\&. +.sp +Default: +\fI\fIelasticsearch:address\fR\fR\fI = \fR\fIlocalhost\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:address\fR\fR\fI = \fR\fIneedle\&.haystack\&.samba\&.org\fR\fI \fR +.RE + +elasticsearch:ignore unknown attribute (G) +.PP +.RS 4 +Ignore unknown Spotlight attributes in search queries\&. An example query using the unsupported attribute +"kMDItemTopic" +would be +kMDItemTopic=="hotstuff"\&. By default any query using such a type would completely fail\&. By enabling this option, if the type match is a subexpression of a larger expression, then this subexpression is just ignored\&. +.sp +Default: +\fI\fIelasticsearch:ignore unknown attribute\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:ignore unknown attribute\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +elasticsearch:ignore unknown type (G) +.PP +.RS 4 +Ignore unknown Spotlight types in search queries\&. An example query using the unsupported type +"public\&.calendar\-event" +would be +kMDItemContentType=="public\&.calendar\-event"\&. By default any query using such a type would completely fail\&. By enabling this option, if the type match is a subexpression of a larger expression, then this subexpression is just ignored\&. +.sp +Default: +\fI\fIelasticsearch:ignore unknown type\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:ignore unknown type\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +elasticsearch:index (S) +.PP +.RS 4 +Specifies the name of the Elasticsearch index to use for Spotlight queries when using the Elasticsearch backend\&. The default value of "_all" is a special Elasticsearch value that performs the search operation on all indices\&. +.sp +Default: +\fI\fIelasticsearch:index\fR\fR\fI = \fR\fI_all\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:index\fR\fR\fI = \fR\fIspotlight\fR\fI \fR +.RE + +elasticsearch:mappings (G) +.PP +.RS 4 +Path to a file specifying metadata attribute mappings in JSON format\&. Use by the Elasticsearch backend of the Spotlight RPC service\&. +.sp +Default: +\fI\fIelasticsearch:mappings\fR\fR\fI = \fR\fI/usr/local/share/samba416/samba/elasticsearch_mappings\&.json\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:mappings\fR\fR\fI = \fR\fI/usr/share/foo/mymappings\&.json\fR\fI \fR +.RE + +elasticsearch:max results (S) +.PP +.RS 4 +Path to a file specifying metadata attribute mappings in JSON format\&. Used by the Elasticsearch backend of the Spotlight RPC service\&. A value of 0 means no limit\&. +.sp +Default: +\fI\fIelasticsearch:max results\fR\fR\fI = \fR\fI100\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:max results\fR\fR\fI = \fR\fI10\fR\fI \fR +.RE + +elasticsearch:port (S) +.PP +.RS 4 +Specifies the TCP port of the Elasticsearch server to use for Spotlight queries when using the Elasticsearch backend\&. +.sp +Default: +\fI\fIelasticsearch:port\fR\fR\fI = \fR\fI9200\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:port\fR\fR\fI = \fR\fI9201\fR\fI \fR +.RE + +elasticsearch:use tls (S) +.PP +.RS 4 +Specifies whether to use HTTPS when talking to the Elasticsearch server used for Spotlight queries when using the Elasticsearch backend\&. +.sp +Default: +\fI\fIelasticsearch:use tls\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIelasticsearch:use tls\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +enable asu support (G) +.PP +.RS 4 +Hosts running the "Advanced Server for Unix (ASU)" product require some special accommodations such as creating a builtin [ADMIN$] share that only supports IPC connections\&. The has been the default behavior in smbd for many years\&. However, certain Microsoft applications such as the Print Migrator tool require that the remote server support an [ADMIN$] file share\&. Disabling this parameter allows for creating an [ADMIN$] file share in smb\&.conf\&. +.sp +Default: +\fI\fIenable asu support\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +enable core files (G) +.PP +.RS 4 +This parameter specifies whether core dumps should be written on internal exits\&. Normally set to +\fByes\fR\&. You should never need to change this\&. +.sp +Default: +\fI\fIenable core files\fR\fR\fI = \fR\fIyes\fR\fI \fR +.sp +Example: +\fI\fIenable core files\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +enable privileges (G) +.PP +.RS 4 +This deprecated parameter controls whether or not smbd will honor privileges assigned to specific SIDs via either +net rpc rights +or one of the Windows user and group manager tools\&. This parameter is enabled by default\&. It can be disabled to prevent members of the Domain Admins group from being able to assign privileges to users or groups which can then result in certain smbd operations running as root that would normally run under the context of the connected user\&. +.sp +An example of how privileges can be used is to assign the right to join clients to a Samba controlled domain without providing root access to the server via smbd\&. +.sp +Please read the extended description provided in the Samba HOWTO documentation\&. +.sp +Default: +\fI\fIenable privileges\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +enable spoolss (G) +.PP +.RS 4 +Inverted synonym for +\m[blue]\fBdisable spoolss\fR\m[]\&. +.sp +Default: +\fI\fIenable spoolss\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +encrypt passwords (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.11 and support for plaintext (as distinct from NTLM, NTLMv2 or Kerberos authentication) will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +encrypt passwords = yes +will be the enforced behaviour\&. +.sp +This boolean controls whether encrypted passwords will be negotiated with the client\&. Note that Windows NT 4\&.0 SP3 and above and also Windows 98 will by default expect encrypted passwords unless a registry entry is changed\&. To use encrypted passwords in Samba see the chapter "User Database" in the Samba HOWTO Collection\&. +.sp +MS Windows clients that expect Microsoft encrypted passwords and that do not have plain text password support enabled will be able to connect only to a Samba server that has encrypted password support enabled and for which the user accounts have a valid encrypted password\&. Refer to the smbpasswd command man page for information regarding the creation of encrypted passwords for user accounts\&. +.sp +The use of plain text passwords is NOT advised as support for this feature is no longer maintained in Microsoft Windows products\&. If you want to use plain text passwords you must set this parameter to no\&. +.sp +In order for encrypted passwords to work correctly +\fBsmbd\fR(8) +must either have access to a local +\fBsmbpasswd\fR(5) +file (see the +\fBsmbpasswd\fR(8) +program for information on how to set up and maintain this file), or set the +\m[blue]\fBsecurity = [domain|ads]\fR\m[] +parameter which causes +smbd +to authenticate against another server\&. +.sp +Default: +\fI\fIencrypt passwords\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +enhanced browsing (G) +.PP +.RS 4 +This option enables a couple of enhancements to cross\-subnet browse propagation that have been added in Samba but which are not standard in Microsoft implementations\&. +.sp +The first enhancement to browse propagation consists of a regular wildcard query to a Samba WINS server for all Domain Master Browsers, followed by a browse synchronization with each of the returned DMBs\&. The second enhancement consists of a regular randomised browse synchronization with all currently known DMBs\&. +.sp +You may wish to disable this option if you have a problem with empty workgroups not disappearing from browse lists\&. Due to the restrictions of the browse protocols, these enhancements can cause a empty workgroup to stay around forever which can be annoying\&. +.sp +In general you should leave this option enabled as it makes cross\-subnet browse propagation much more reliable\&. +.sp +Default: +\fI\fIenhanced browsing\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +enumports command (G) +.PP +.RS 4 +The concept of a "port" is fairly foreign to UNIX hosts\&. Under Windows NT/2000 print servers, a port is associated with a port monitor and generally takes the form of a local port (i\&.e\&. LPT1:, COM1:, FILE:) or a remote port (i\&.e\&. LPD Port Monitor, etc\&.\&.\&.)\&. By default, Samba has only one port defined\-\-\fB"Samba Printer Port"\fR\&. Under Windows NT/2000, all printers must have a valid port name\&. If you wish to have a list of ports displayed (smbd +does not use a port name for anything) other than the default +\fB"Samba Printer Port"\fR, you can define +\fIenumports command\fR +to point to a program which should generate a list of ports, one per line, to standard output\&. This listing will then be used in response to the level 1 and 2 EnumPorts() RPC\&. +.sp +Default: +\fI\fIenumports command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIenumports command\fR\fR\fI = \fR\fI/usr/bin/listports\fR\fI \fR +.RE + +eventlog list (G) +.PP +.RS 4 +This option defines a list of log names that Samba will report to the Microsoft EventViewer utility\&. The listed eventlogs will be associated with tdb file on disk in the +$(statedir)/eventlog\&. +.sp +The administrator must use an external process to parse the normal Unix logs such as +/var/log/messages +and write then entries to the eventlog tdb files\&. Refer to the eventlogadm(8) utility for how to write eventlog entries\&. +.sp +Default: +\fI\fIeventlog list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIeventlog list\fR\fR\fI = \fR\fISecurity Application Syslog Apache\fR\fI \fR +.RE + +fake directory create times (S) +.PP +.RS 4 +NTFS and Windows VFAT file systems keep a create time for all files and directories\&. This is not the same as the ctime \- status change time \- that Unix keeps, so Samba by default reports the earliest of the various times Unix does keep\&. Setting this parameter for a share causes Samba to always report midnight 1\-1\-1980 as the create time for directories\&. +.sp +This option is mainly used as a compatibility option for Visual C++ when used against Samba shares\&. Visual C++ generated makefiles have the object directory as a dependency for each object file, and a make rule to create the directory\&. Also, when NMAKE compares timestamps it uses the creation time when examining a directory\&. Thus the object directory will be created if it does not exist, but once it does exist it will always have an earlier timestamp than the object files it contains\&. +.sp +However, Unix time semantics mean that the create time reported by Samba will be updated whenever a file is created or deleted in the directory\&. NMAKE finds all object files in the object directory\&. The timestamp of the last one built is then compared to the timestamp of the object directory\&. If the directory\*(Aqs timestamp if newer, then all object files will be rebuilt\&. Enabling this option ensures directories always predate their contents and an NMAKE build will proceed as expected\&. +.sp +Default: +\fI\fIfake directory create times\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +fake oplocks (S) +.PP +.RS 4 +Oplocks are the way that SMB clients get permission from a server to locally cache file operations\&. If a server grants an oplock (opportunistic lock) then the client is free to assume that it is the only one accessing the file and it will aggressively cache file data\&. With some oplock types the client may even cache file open/close operations\&. This can give enormous performance benefits\&. +.sp +When you set +fake oplocks = yes, +\fBsmbd\fR(8) +will always grant oplock requests no matter how many clients are using the file\&. +.sp +It is generally much better to use the real +\m[blue]\fBoplocks\fR\m[] +support rather than this parameter\&. +.sp +If you enable this option on all read\-only shares or shares that you know will only be accessed from one client at a time such as physically read\-only media like CDROMs, you will see a big performance improvement on many operations\&. If you enable this option on shares where multiple clients may be accessing the files read\-write at the same time you can get data corruption\&. Use this option carefully! +.sp +Default: +\fI\fIfake oplocks\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +follow symlinks (S) +.PP +.RS 4 +This parameter allows the Samba administrator to stop +\fBsmbd\fR(8) +from following symbolic links in a particular share\&. Setting this parameter to +\fBno\fR +prevents any file or directory that is a symbolic link from being followed (the user will get an error)\&. This option is very useful to stop users from adding a symbolic link to +/etc/passwd +in their home directory for instance\&. However it will slow filename lookups down slightly\&. +.sp +This option is enabled (i\&.e\&. +smbd +will follow symbolic links) by default\&. +.sp +Default: +\fI\fIfollow symlinks\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smbd force process locks (S) +.PP +.RS 4 +This boolean option tells +smbd +whether to forcefully disable the use of Open File Description locks on Linux\&. +.sp +This option should not be changed from the default unless you know what you\*(Aqre doing\&. +.sp +Default: +\fI\fIsmbd force process locks\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +force create mode (S) +.PP +.RS 4 +This parameter specifies a set of UNIX mode bit permissions that will +\fIalways\fR +be set on a file created by Samba\&. This is done by bitwise \*(AqOR\*(Aqing these bits onto the mode bits of a file that is being created\&. The default for this parameter is (in octal) 000\&. The modes in this parameter are bitwise \*(AqOR\*(Aqed onto the file mode after the mask set in the +\fIcreate mask\fR +parameter is applied\&. +.sp +The example below would force all newly created files to have read and execute permissions set for \*(Aqgroup\*(Aq and \*(Aqother\*(Aq as well as the read/write/execute bits set for the \*(Aquser\*(Aq\&. +.sp +Default: +\fI\fIforce create mode\fR\fR\fI = \fR\fI0000\fR\fI \fR +.sp +Example: +\fI\fIforce create mode\fR\fR\fI = \fR\fI0755\fR\fI \fR +.RE + +force directory mode (S) +.PP +.RS 4 +This parameter specifies a set of UNIX mode bit permissions that will +\fIalways\fR +be set on a directory created by Samba\&. This is done by bitwise \*(AqOR\*(Aqing these bits onto the mode bits of a directory that is being created\&. The default for this parameter is (in octal) 0000 which will not add any extra permission bits to a created directory\&. This operation is done after the mode mask in the parameter +\fIdirectory mask\fR +is applied\&. +.sp +The example below would force all created directories to have read and execute permissions set for \*(Aqgroup\*(Aq and \*(Aqother\*(Aq as well as the read/write/execute bits set for the \*(Aquser\*(Aq\&. +.sp +Default: +\fI\fIforce directory mode\fR\fR\fI = \fR\fI0000\fR\fI \fR +.sp +Example: +\fI\fIforce directory mode\fR\fR\fI = \fR\fI0755\fR\fI \fR +.RE + +force directory security mode (S) +.PP +.RS 4 +This parameter has been removed for Samba 4\&.0\&.0\&. +.sp +\fINo default\fR +.RE + +group +.PP +.RS 4 +This parameter is a synonym for +force group\&. +.RE + +force group (S) +.PP +.RS 4 +This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service\&. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking\&. Thus, by assigning permissions for this group to the files and directories within this service the Samba administrator can restrict or allow sharing of these files\&. +.sp +In Samba 2\&.0\&.5 and above this parameter has extended functionality in the following way\&. If the group name listed here has a \*(Aq+\*(Aq character prepended to it then the current user accessing the share only has the primary group default assigned to this group if they are already assigned as a member of that group\&. This allows an administrator to decide that only users who are already in a particular group will create files with group ownership set to that group\&. This gives a finer granularity of ownership assignment\&. For example, the setting +force group = +sys +means that only users who are already in group sys will have their default primary group assigned to sys when accessing this Samba share\&. All other users will retain their ordinary primary group\&. +.sp +If the +\m[blue]\fBforce user\fR\m[] +parameter is also set the group specified in +\fIforce group\fR +will override the primary group set in +\fIforce user\fR\&. +.sp +Default: +\fI\fIforce group\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIforce group\fR\fR\fI = \fR\fIagroup\fR\fI \fR +.RE + +force printername (S) +.PP +.RS 4 +When printing from Windows NT (or later), each printer in +smb\&.conf +has two associated names which can be used by the client\&. The first is the sharename (or shortname) defined in smb\&.conf\&. This is the only printername available for use by Windows 9x clients\&. The second name associated with a printer can be seen when browsing to the "Printers" (or "Printers and Faxes") folder on the Samba server\&. This is referred to simply as the printername (not to be confused with the +\fIprinter name\fR +option)\&. +.sp +When assigning a new driver to a printer on a remote Windows compatible print server such as Samba, the Windows client will rename the printer to match the driver name just uploaded\&. This can result in confusion for users when multiple printers are bound to the same driver\&. To prevent Samba from allowing the printer\*(Aqs printername to differ from the sharename defined in smb\&.conf, set +\fIforce printername = yes\fR\&. +.sp +Be aware that enabling this parameter may affect migrating printers from a Windows server to Samba since Windows has no way to force the sharename and printername to match\&. +.sp +It is recommended that this parameter\*(Aqs value not be changed once the printer is in use by clients as this could cause a user not be able to delete printer connections from their local Printers folder\&. +.sp +Default: +\fI\fIforce printername\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +force security mode (S) +.PP +.RS 4 +This parameter has been removed for Samba 4\&.0\&.0\&. +.sp +\fINo default\fR +.RE + +force unknown acl user (S) +.PP +.RS 4 +If this parameter is set, a Windows NT ACL that contains an unknown SID (security descriptor, or representation of a user or group id) as the owner or group owner of the file will be silently mapped into the current UNIX uid or gid of the currently connected user\&. +.sp +This is designed to allow Windows NT clients to copy files and folders containing ACLs that were created locally on the client machine and contain users local to that machine only (no domain users) to be copied to a Samba server (usually with XCOPY /O) and have the unknown userid and groupid of the file owner map to the current connected user\&. This can only be fixed correctly when winbindd allows arbitrary mapping from any Windows NT SID to a UNIX uid or gid\&. +.sp +Try using this parameter when XCOPY /O gives an ACCESS_DENIED error\&. +.sp +Default: +\fI\fIforce unknown acl user\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +force user (S) +.PP +.RS 4 +This specifies a UNIX user name that will be assigned as the default user for all users connecting to this service\&. This is useful for sharing files\&. You should also use it carefully as using it incorrectly can cause security problems\&. +.sp +This user name only gets used once a connection is established\&. Thus clients still need to connect as a valid user and supply a valid password\&. Once connected, all file operations will be performed as the "forced user", no matter what username the client connected as\&. This can be very useful\&. +.sp +In Samba 2\&.0\&.5 and above this parameter also causes the primary group of the forced user to be used as the primary group for all file activity\&. Prior to 2\&.0\&.5 the primary group was left as the primary group of the connecting user (this was a bug)\&. +.sp +Default: +\fI\fIforce user\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIforce user\fR\fR\fI = \fR\fIauser\fR\fI \fR +.RE + +fss: prune stale (G) +.PP +.RS 4 +When enabled, Samba\*(Aqs File Server Remote VSS Protocol (FSRVP) server checks all FSRVP initiated snapshots on startup, and removes any corresponding state (including share definitions) for nonexistent snapshot paths\&. +.sp +Default: +\fI\fIfss: prune stale\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIfss: prune stale\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +fss: sequence timeout (G) +.PP +.RS 4 +The File Server Remote VSS Protocol (FSRVP) server includes a message sequence timer to ensure cleanup on unexpected client disconnect\&. This parameter overrides the default timeout between FSRVP operations\&. FSRVP timeouts can be completely disabled via a value of 0\&. +.sp +Default: +\fI\fIfss: sequence timeout\fR\fR\fI = \fR\fI180 or 1800, depending on operation\fR\fI \fR +.sp +Example: +\fI\fIfss: sequence timeout\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +fstype (S) +.PP +.RS 4 +This parameter allows the administrator to configure the string that specifies the type of filesystem a share is using that is reported by +\fBsmbd\fR(8) +when a client queries the filesystem type for a share\&. The default type is +\fBNTFS\fR +for compatibility with Windows NT but this can be changed to other strings such as +\fBSamba\fR +or +\fBFAT\fR +if required\&. +.sp +Default: +\fI\fIfstype\fR\fR\fI = \fR\fINTFS\fR\fI \fR +.sp +Example: +\fI\fIfstype\fR\fR\fI = \fR\fISamba\fR\fI \fR +.RE + +get quota command (G) +.PP +.RS 4 +The +get quota command +should only be used whenever there is no operating system API available from the OS that samba can use\&. +.sp +This option is only available Samba was compiled with quotas support\&. +.sp +This parameter should specify the path to a script that queries the quota information for the specified user/group for the partition that the specified directory is on\&. +.sp +Such a script is being given 3 arguments: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +directory +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +type of query +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +uid of user or gid of group +.RE +.sp +.RE +The directory is actually mostly just "\&." \- It needs to be treated relatively to the current working directory that the script can also query\&. +.sp +The type of query can be one of: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1 \- user quotas +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2 \- user default quotas (uid = \-1) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3 \- group quotas +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +4 \- group default quotas (gid = \-1) +.RE +.sp +.RE +This script should print one line as output with spaces between the columns\&. The printed columns should be: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1 \- quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2 \- number of currently used blocks +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3 \- the softlimit number of blocks +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +4 \- the hardlimit number of blocks +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5 \- currently used number of inodes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +6 \- the softlimit number of inodes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +7 \- the hardlimit number of inodes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +8 (optional) \- the number of bytes in a block(default is 1024) +.RE +.sp +.RE +Default: +\fI\fIget quota command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIget quota command\fR\fR\fI = \fR\fI/usr/local/sbin/query_quota\fR\fI \fR +.RE + +getwd cache (G) +.PP +.RS 4 +This is a tuning option\&. When this is enabled a caching algorithm will be used to reduce the time taken for getwd() calls\&. This can have a significant impact on performance, especially when the +\m[blue]\fBwide links\fR\m[] +parameter is set to +\fBno\fR\&. +.sp +Default: +\fI\fIgetwd cache\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +gpo update command (G) +.PP +.RS 4 +This option sets the command that is called to apply GPO policies\&. The samba\-gpupdate script applies System Access and Kerberos Policies to the KDC\&. System Access policies set minPwdAge, maxPwdAge, minPwdLength, and pwdProperties in the samdb\&. Kerberos Policies set kdc:service ticket lifetime, kdc:user ticket lifetime, and kdc:renewal lifetime in smb\&.conf\&. +.sp +Default: +\fI\fIgpo update command\fR\fR\fI = \fR\fI/wrkdirs/usr/ports/net/samba416/work/samba\-4\&.16\&.4/source4/scripting/bin/samba\-gpupdate\fR\fI \fR +.sp +Example: +\fI\fIgpo update command\fR\fR\fI = \fR\fI/usr/local/sbin/gpoupdate\fR\fI \fR +.RE + +guest account (G) +.PP +.RS 4 +This is a username which will be used for access to services which are specified as +\m[blue]\fBguest ok\fR\m[] +(see below)\&. Whatever privileges this user has will be available to any client connecting to the guest service\&. This user must exist in the password file, but does not require a valid login\&. The user account "ftp" is often a good choice for this parameter\&. +.sp +On some systems the default guest account "nobody" may not be able to print\&. Use another account in this case\&. You should test this by trying to log in as your guest user (perhaps by using the +su \- +command) and trying to print using the system print command such as +lpr(1) +or +lp(1)\&. +.sp +This parameter does not accept % macros, because many parts of the system require this value to be constant for correct operation\&. +.sp +Default: +\fI\fIguest account\fR\fR\fI = \fR\fInobody # default can be changed at compile\-time\fR\fI \fR +.sp +Example: +\fI\fIguest account\fR\fR\fI = \fR\fIftp\fR\fI \fR +.RE + +public +.PP +.RS 4 +This parameter is a synonym for +guest ok\&. +.RE + +guest ok (S) +.PP +.RS 4 +If this parameter is +\fByes\fR +for a service, then no password is required to connect to the service\&. Privileges will be those of the +\m[blue]\fBguest account\fR\m[]\&. +.sp +This parameter nullifies the benefits of setting +\m[blue]\fBrestrict anonymous = 2\fR\m[] +.sp +See the section below on +\m[blue]\fBsecurity\fR\m[] +for more information about this option\&. +.sp +Default: +\fI\fIguest ok\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +only guest +.PP +.RS 4 +This parameter is a synonym for +guest only\&. +.RE + +guest only (S) +.PP +.RS 4 +If this parameter is +\fByes\fR +for a service, then only guest connections to the service are permitted\&. This parameter will have no effect if +\m[blue]\fBguest ok\fR\m[] +is not set for the service\&. +.sp +See the section below on +\m[blue]\fBsecurity\fR\m[] +for more information about this option\&. +.sp +Default: +\fI\fIguest only\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +hide dot files (S) +.PP +.RS 4 +This is a boolean parameter that controls whether files starting with a dot appear as hidden files\&. +.sp +Default: +\fI\fIhide dot files\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +hide files (S) +.PP +.RS 4 +This is a list of files or directories that are not visible but are accessible\&. The DOS \*(Aqhidden\*(Aq attribute is applied to any files or directories that match\&. +.sp +Each entry in the list must be separated by a \*(Aq/\*(Aq, which allows spaces to be included in the entry\&. \*(Aq*\*(Aq and \*(Aq?\*(Aq can be used to specify multiple files or directories as in DOS wildcards\&. +.sp +Each entry must be a Unix path, not a DOS path and must not include the Unix directory separator \*(Aq/\*(Aq\&. +.sp +Note that the case sensitivity option is applicable in hiding files\&. +.sp +Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned\&. +.sp +The example shown above is based on files that the Macintosh SMB client (DAVE) available from +Thursby +creates for internal use, and also still hides all files beginning with a dot\&. +.sp +An example of us of this parameter is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +hide files = /\&.*/DesktopFolderDB/TrashFor%m/resource\&.frk/ +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIhide files\fR\fR\fI = \fR\fI # no file are hidden\fR\fI \fR +.RE + +hide new files timeout (S) +.PP +.RS 4 +Setting this parameter to something but 0 hides files that have been modified less than N seconds ago\&. +.sp +It can be used for ingest/process queue style workloads\&. A processing application should only see files that are definitely finished\&. As many applications do not have proper external workflow control, this can be a way to make sure processing does not interfere with file ingest\&. +.sp +Default: +\fI\fIhide new files timeout\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +hide special files (S) +.PP +.RS 4 +This parameter prevents clients from seeing special files such as sockets, devices and fifo\*(Aqs in directory listings\&. +.sp +Default: +\fI\fIhide special files\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +hide unreadable (S) +.PP +.RS 4 +This parameter prevents clients from seeing the existence of files that cannot be read\&. Defaults to off\&. +.sp +Please note that enabling this can slow down listing large directories significantly\&. Samba has to evaluate the ACLs of all directory members, which can be a lot of effort\&. +.sp +Default: +\fI\fIhide unreadable\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +hide unwriteable files (S) +.PP +.RS 4 +This parameter prevents clients from seeing the existence of files that cannot be written to\&. Defaults to off\&. Note that unwriteable directories are shown as usual\&. +.sp +Please note that enabling this can slow down listing large directories significantly\&. Samba has to evaluate the ACLs of all directory members, which can be a lot of effort\&. +.sp +Default: +\fI\fIhide unwriteable files\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +honor change notify privilege (S) +.PP +.RS 4 +This option can be used to make use of the change notify privilege\&. By default notify results are not checked against the file system permissions\&. +.sp +If "honor change notify privilege" is enabled, a user will only receive notify results, if he has change notify privilege or sufficient file system permissions\&. If a user has the change notify privilege, he will receive all requested notify results, even if the user does not have the permissions on the file system\&. +.sp +Default: +\fI\fIhonor change notify privilege\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +host msdfs (G) +.PP +.RS 4 +If set to +\fByes\fR, Samba will act as a Dfs server, and allow Dfs\-aware clients to browse Dfs trees hosted on the server\&. +.sp +See also the +\m[blue]\fBmsdfs root\fR\m[] +share level parameter\&. For more information on setting up a Dfs tree on Samba, refer to the MSFDS chapter in the book Samba3\-HOWTO\&. +.sp +Default: +\fI\fIhost msdfs\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +hostname lookups (G) +.PP +.RS 4 +Specifies whether samba should use (expensive) hostname lookups or use the ip addresses instead\&. An example place where hostname lookups are currently used is when checking the +hosts deny +and +hosts allow\&. +.sp +Default: +\fI\fIhostname lookups\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIhostname lookups\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +allow hosts +.PP +.RS 4 +This parameter is a synonym for +hosts allow\&. +.RE + +hosts allow (S) +.PP +.RS 4 +A synonym for this parameter is +\m[blue]\fBallow hosts\fR\m[]\&. +.sp +This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service\&. +.sp +If specified in the [global] section then it will apply to all services, regardless of whether the individual service has a different setting\&. +.sp +You can specify the hosts by name or IP number\&. For example, you could restrict access to only the hosts on a Class C subnet with something like +allow hosts = 150\&.203\&.5\&.\&. The full syntax of the list is described in the man page +hosts_access(5)\&. Note that this man page may not be present on your system, so a brief description will be given here also\&. +.sp +Note that the localhost address 127\&.0\&.0\&.1 will always be allowed access unless specifically denied by a +\m[blue]\fBhosts deny\fR\m[] +option\&. +.sp +You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups\&. The +\fIEXCEPT\fR +keyword can also be used to limit a wildcard list\&. The following examples may provide some help: +.sp +Example 1: allow all IPs in 150\&.203\&.*\&.*; except one +.sp +hosts allow = 150\&.203\&. EXCEPT 150\&.203\&.6\&.66 +.sp +Example 2: allow hosts that match the given network/netmask +.sp +hosts allow = 150\&.203\&.15\&.0/255\&.255\&.255\&.0 +.sp +Example 3: allow a couple of hosts +.sp +hosts allow = lapland, arvidsjaur +.sp +Example 4: allow only hosts in NIS netgroup "foonet", but deny access from one particular host +.sp +hosts allow = @foonet +.sp +hosts deny = pirate +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Note that access still requires suitable user\-level passwords\&. +.sp .5v +.RE +See +\fBtestparm\fR(1) +for a way of testing your host access to see if it does what you expect\&. +.sp +Default: +\fI\fIhosts allow\fR\fR\fI = \fR\fI # none (i\&.e\&., all hosts permitted access)\fR\fI \fR +.sp +Example: +\fI\fIhosts allow\fR\fR\fI = \fR\fI150\&.203\&.5\&. myhost\&.mynet\&.edu\&.au\fR\fI \fR +.RE + +deny hosts +.PP +.RS 4 +This parameter is a synonym for +hosts deny\&. +.RE + +hosts deny (S) +.PP +.RS 4 +The opposite of +\fIhosts allow\fR +\- hosts listed here are +\fINOT\fR +permitted access to services unless the specific services have their own lists to override this one\&. Where the lists conflict, the +\fIallow\fR +list takes precedence\&. +.sp +In the event that it is necessary to deny all by default, use the keyword ALL (or the netmask +0\&.0\&.0\&.0/0) and then explicitly specify to the +\m[blue]\fBhosts allow = hosts allow\fR\m[] +parameter those hosts that should be permitted access\&. +.sp +Default: +\fI\fIhosts deny\fR\fR\fI = \fR\fI # none (i\&.e\&., no hosts specifically excluded)\fR\fI \fR +.sp +Example: +\fI\fIhosts deny\fR\fR\fI = \fR\fI150\&.203\&.4\&. badhost\&.mynet\&.edu\&.au\fR\fI \fR +.RE + +idmap backend (G) +.PP +.RS 4 +The idmap backend provides a plugin interface for Winbind to use varying backends to store SID/uid/gid mapping tables\&. +.sp +This option specifies the default backend that is used when no special configuration set, but it is now deprecated in favour of the new spelling +\m[blue]\fBidmap config * : backend\fR\m[]\&. +.sp +Default: +\fI\fIidmap backend\fR\fR\fI = \fR\fItdb\fR\fI \fR +.RE + +idmap cache time (G) +.PP +.RS 4 +This parameter specifies the number of seconds that Winbind\*(Aqs idmap interface will cache positive SID/uid/gid query results\&. By default, Samba will cache these results for one week\&. +.sp +Default: +\fI\fIidmap cache time\fR\fR\fI = \fR\fI604800\fR\fI \fR +.RE + +idmap config DOMAIN : OPTION (G) +.PP +.RS 4 +ID mapping in Samba is the mapping between Windows SIDs and Unix user and group IDs\&. This is performed by Winbindd with a configurable plugin interface\&. Samba\*(Aqs ID mapping is configured by options starting with the +\m[blue]\fBidmap config\fR\m[] +prefix\&. An idmap option consists of the +\m[blue]\fBidmap config\fR\m[] +prefix, followed by a domain name or the asterisk character (*), a colon, and the name of an idmap setting for the chosen domain\&. +.sp +The idmap configuration is hence divided into groups, one group for each domain to be configured, and one group with the asterisk instead of a proper domain name, which specifies the default configuration that is used to catch all domains that do not have an explicit idmap configuration of their own\&. +.sp +There are three general options available: +.PP +backend = backend_name +.RS 4 +This specifies the name of the idmap plugin to use as the SID/uid/gid backend for this domain\&. The standard backends are tdb (\fBidmap_tdb\fR(8)), tdb2 (\fBidmap_tdb2\fR(8)), ldap (\fBidmap_ldap\fR(8)), rid (\fBidmap_rid\fR(8)), hash (\fBidmap_hash\fR(8)), autorid (\fBidmap_autorid\fR(8)), ad (\fBidmap_ad\fR(8)) and nss (\fBidmap_nss\fR(8))\&. The corresponding manual pages contain the details, but here is a summary\&. +.sp +The first three of these create mappings of their own using internal unixid counters and store the mappings in a database\&. These are suitable for use in the default idmap configuration\&. The rid and hash backends use a pure algorithmic calculation to determine the unixid for a SID\&. The autorid module is a mixture of the tdb and rid backend\&. It creates ranges for each domain encountered and then uses the rid algorithm for each of these automatically configured domains individually\&. The ad backend uses unix ids stored in Active Directory via the standard schema extensions\&. The nss backend reverses the standard winbindd setup and gets the unix ids via names from nsswitch which can be useful in an ldap setup\&. +.RE +.PP +range = low \- high +.RS 4 +Defines the available matching uid and gid range for which the backend is authoritative\&. For allocating backends, this also defines the start and the end of the range for allocating new unique IDs\&. +.sp +winbind uses this parameter to find the backend that is authoritative for a unix ID to SID mapping, so it must be set for each individually configured domain and for the default configuration\&. The configured ranges must be mutually disjoint\&. +.sp +Note that the low value interacts with the +\m[blue]\fBmin domain uid\fR\m[] +option! +.RE +.PP +read only = yes|no +.RS 4 +This option can be used to turn the writing backends tdb, tdb2, and ldap into read only mode\&. This can be useful e\&.g\&. in cases where a pre\-filled database exists that should not be extended automatically\&. +.RE +.sp +The following example illustrates how to configure the +\fBidmap_ad\fR(8) +backend for the CORP domain and the +\fBidmap_tdb\fR(8) +backend for all other domains\&. This configuration assumes that the admin of CORP assigns unix ids below 1000000 via the SFU extensions, and winbind is supposed to use the next million entries for its own mappings from trusted domains and for local groups for example\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + idmap config * : backend = tdb + idmap config * : range = 1000000\-1999999 + + idmap config CORP : backend = ad + idmap config CORP : range = 1000\-999999 + +.fi +.if n \{\ +.RE +.\} +.sp +\fINo default\fR +.RE + +winbind gid +.PP +.RS 4 +This parameter is a synonym for +idmap gid\&. +.RE + +idmap gid (G) +.PP +.RS 4 +The idmap gid parameter specifies the range of group ids for the default idmap configuration\&. It is now deprecated in favour of +\m[blue]\fBidmap config * : range\fR\m[]\&. +.sp +See the +\m[blue]\fBidmap config\fR\m[] +option\&. +.sp +Default: +\fI\fIidmap gid\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIidmap gid\fR\fR\fI = \fR\fI10000\-20000\fR\fI \fR +.RE + +idmap negative cache time (G) +.PP +.RS 4 +This parameter specifies the number of seconds that Winbind\*(Aqs idmap interface will cache negative SID/uid/gid query results\&. +.sp +Default: +\fI\fIidmap negative cache time\fR\fR\fI = \fR\fI120\fR\fI \fR +.RE + +winbind uid +.PP +.RS 4 +This parameter is a synonym for +idmap uid\&. +.RE + +idmap uid (G) +.PP +.RS 4 +The idmap uid parameter specifies the range of user ids for the default idmap configuration\&. It is now deprecated in favour of +\m[blue]\fBidmap config * : range\fR\m[]\&. +.sp +See the +\m[blue]\fBidmap config\fR\m[] +option\&. +.sp +Default: +\fI\fIidmap uid\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIidmap uid\fR\fR\fI = \fR\fI10000\-20000\fR\fI \fR +.RE + +include (S) +.PP +.RS 4 +This allows you to include one config file inside another\&. The file is included literally, as though typed in place\&. +.sp +It takes the standard substitutions, except +\fI%u\fR, +\fI%P\fR +and +\fI%S\fR\&. +.sp +The parameter +\fIinclude = registry\fR +has a special meaning: It does +\fInot\fR +include a file named +\fIregistry\fR +from the current working directory, but instead reads the global configuration options from the registry\&. See the section on registry\-based configuration for details\&. Note that this option automatically activates registry shares\&. +.sp +Default: +\fI\fIinclude\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIinclude\fR\fR\fI = \fR\fI/usr/local/samba/lib/admin_smb\&.conf\fR\fI \fR +.RE + +include system krb5 conf (G) +.PP +.RS 4 +Setting this parameter to +no +will prevent winbind to include the system /etc/krb5\&.conf file into the krb5\&.conf file it creates\&. See also +\m[blue]\fBcreate krb5 conf\fR\m[]\&. This option only applies to Samba built with MIT Kerberos\&. +.sp +Default: +\fI\fIinclude system krb5 conf\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +inherit acls (S) +.PP +.RS 4 +This parameter can be used to ensure that if default acls exist on parent directories, they are always honored when creating a new file or subdirectory in these parent directories\&. The default behavior is to use the unix mode specified when creating the directory\&. Enabling this option sets the unix mode to 0777, thus guaranteeing that default directory acls are propagated\&. Note that using the VFS modules acl_xattr or acl_tdb which store native Windows as meta\-data will automatically turn this option on for any share for which they are loaded, as they require this option to emulate Windows ACLs correctly\&. +.sp +Default: +\fI\fIinherit acls\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +inherit owner (S) +.PP +.RS 4 +The ownership of new files and directories is normally governed by effective uid of the connected user\&. This option allows the Samba administrator to specify that the ownership for new files and directories should be controlled by the ownership of the parent directory\&. +.sp +Valid options are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBno\fR +\- Both the Windows (SID) owner and the UNIX (uid) owner of the file are governed by the identity of the user that created the file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwindows and unix\fR +\- The Windows (SID) owner and the UNIX (uid) owner of new files and directories are set to the respective owner of the parent directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fByes\fR +\- a synonym for +\fBwindows and unix\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBunix only\fR +\- Only the UNIX owner is set to the UNIX owner of the parent directory\&. +.RE +.sp +.RE +Common scenarios where this behavior is useful is in implementing drop\-boxes, where users can create and edit files but not delete them and ensuring that newly created files in a user\*(Aqs roaming profile directory are actually owned by the user\&. +.sp +The +\fBunix only\fR +option effectively breaks the tie between the Windows owner of a file and the UNIX owner\&. As a logical consequence, in this mode, setting the the Windows owner of a file does not modify the UNIX owner\&. Using this mode should typically be combined with a backing store that can emulate the full NT ACL model without affecting the POSIX permissions, such as the acl_xattr VFS module, coupled with +\m[blue]\fBacl_xattr:ignore system acls = yes\fR\m[]\&. This can be used to emulate folder quotas, when files are exposed only via SMB (without UNIX extensions)\&. The UNIX owner of a directory is locally set and inherited by all subdirectories and files, and they all consume the same quota\&. +.sp +Default: +\fI\fIinherit owner\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +inherit permissions (S) +.PP +.RS 4 +The permissions on new files and directories are normally governed by +\m[blue]\fBcreate mask\fR\m[], +\m[blue]\fBdirectory mask\fR\m[], +\m[blue]\fBforce create mode\fR\m[] +and +\m[blue]\fBforce directory mode\fR\m[] +but the boolean inherit permissions parameter overrides this\&. +.sp +New directories inherit the mode of the parent directory, including bits such as setgid\&. +.sp +New files inherit their read/write bits from the parent directory\&. Their execute bits continue to be determined by +\m[blue]\fBmap archive\fR\m[], +\m[blue]\fBmap hidden\fR\m[] +and +\m[blue]\fBmap system\fR\m[] +as usual\&. +.sp +Note that the setuid bit is +\fInever\fR +set via inheritance (the code explicitly prohibits this)\&. +.sp +This can be particularly useful on large systems with many users, perhaps several thousand, to allow a single [homes] share to be used flexibly by each user\&. +.sp +Default: +\fI\fIinherit permissions\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +init logon delay (G) +.PP +.RS 4 +This parameter specifies a delay in milliseconds for the hosts configured for delayed initial samlogon with +\m[blue]\fBinit logon delayed hosts\fR\m[]\&. +.sp +Default: +\fI\fIinit logon delay\fR\fR\fI = \fR\fI100\fR\fI \fR +.RE + +init logon delayed hosts (G) +.PP +.RS 4 +This parameter takes a list of host names, addresses or networks for which the initial samlogon reply should be delayed (so other DCs get preferred by XP workstations if there are any)\&. +.sp +The length of the delay can be specified with the +\m[blue]\fBinit logon delay\fR\m[] +parameter\&. +.sp +Default: +\fI\fIinit logon delayed hosts\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIinit logon delayed hosts\fR\fR\fI = \fR\fI150\&.203\&.5\&. myhost\&.mynet\&.de\fR\fI \fR +.RE + +interfaces (G) +.PP +.RS 4 +This option allows you to override the default network interfaces list that Samba will use for browsing, name registration and other NetBIOS over TCP/IP (NBT) traffic\&. By default Samba will query the kernel for the list of all active interfaces and use any interfaces except 127\&.0\&.0\&.1 that are broadcast capable\&. +.sp +The option takes a list of interface strings\&. Each string can be in any of the following forms: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +a network interface name (such as eth0)\&. This may include shell\-like wildcards so eth* will match any interface starting with the substring "eth" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +an IP address\&. In this case the netmask is determined from the list of interfaces obtained from the kernel +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +an IP/mask pair\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +a broadcast/mask pair\&. +.RE +.sp +.RE +The "mask" parameters can either be a bit length (such as 24 for a C class network) or a full netmask in dotted decimal form\&. +.sp +The "IP" parameters above can either be a full dotted decimal IP address or a hostname which will be looked up via the OS\*(Aqs normal hostname resolution mechanisms\&. +.sp +By default Samba enables all active interfaces that are broadcast capable except the loopback adaptor (IP address 127\&.0\&.0\&.1)\&. +.sp +In order to support SMB3 multi\-channel configurations, smbd understands some extra parameters which can be appended after the actual interface with this extended syntax (note that the quoting is important in order to handle the ; and , characters): +.sp +"interface[;key1=value1[,key2=value2[\&.\&.\&.]]]" +.sp +Known keys are speed, capability, and if_index\&. Speed is specified in bits per second\&. Known capabilities are RSS and RDMA\&. The if_index should be used with care: the values must not coincide with indexes used by the kernel\&. Note that these options are mainly intended for testing and development rather than for production use\&. At least on Linux systems, these values should be auto\-detected, but the settings can serve as last a resort when autodetection is not working or is not available\&. The specified values overwrite the auto\-detected values\&. +.sp +The first two example below configures three network interfaces corresponding to the eth0 device and IP addresses 192\&.168\&.2\&.10 and 192\&.168\&.3\&.10\&. The netmasks of the latter two interfaces would be set to 255\&.255\&.255\&.0\&. +.sp +The other examples show how per interface extra parameters can be specified\&. Notice the possible usage of "," and ";", which makes the double quoting necessary\&. +.sp +Default: +\fI\fIinterfaces\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fIeth0 192\&.168\&.2\&.10/24 192\&.168\&.3\&.10/255\&.255\&.255\&.0\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fIeth0, 192\&.168\&.2\&.10/24; 192\&.168\&.3\&.10/255\&.255\&.255\&.0\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fI"eth0;if_index=65,speed=1000000000,capability=RSS"\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fI"lo;speed=1000000000" "eth0;capability=RSS"\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fI"lo;speed=1000000000" , "eth0;capability=RSS"\fR\fI \fR +.sp +Example: +\fI\fIinterfaces\fR\fR\fI = \fR\fI"eth0;capability=RSS" , "rdma1;capability=RDMA" ; "rdma2;capability=RSS,capability=RDMA"\fR\fI \fR +.RE + +invalid users (S) +.PP +.RS 4 +This is a list of users that should not be allowed to login to this service\&. This is really a +\fIparanoid\fR +check to absolutely ensure an improper setting does not breach your security\&. +.sp +A name starting with a \*(Aq@\*(Aq is interpreted as an NIS netgroup first (if your system supports NIS), and then as a UNIX group if the name was not found in the NIS netgroup database\&. +.sp +A name starting with \*(Aq+\*(Aq is interpreted only by looking in the UNIX group database via the NSS getgrnam() interface\&. A name starting with \*(Aq&\*(Aq is interpreted only by looking in the NIS netgroup database (this requires NIS to be working on your system)\&. The characters \*(Aq+\*(Aq and \*(Aq&\*(Aq may be used at the start of the name in either order so the value +\fI+&group\fR +means check the UNIX group database, followed by the NIS netgroup database, and the value +\fI&+group\fR +means check the NIS netgroup database, followed by the UNIX group database (the same as the \*(Aq@\*(Aq prefix)\&. +.sp +The current servicename is substituted for +\fI%S\fR\&. This is useful in the [homes] section\&. +.sp +Default: +\fI\fIinvalid users\fR\fR\fI = \fR\fI # no invalid users\fR\fI \fR +.sp +Example: +\fI\fIinvalid users\fR\fR\fI = \fR\fIroot fred admin @wheel\fR\fI \fR +.RE + +iprint server (G) +.PP +.RS 4 +This parameter is only applicable if +\m[blue]\fBprinting\fR\m[] +is set to +\fBiprint\fR\&. +.sp +If set, this option overrides the ServerName option in the CUPS +client\&.conf\&. This is necessary if you have virtual samba servers that connect to different CUPS daemons\&. +.sp +Default: +\fI\fIiprint server\fR\fR\fI = \fR\fI""\fR\fI \fR +.sp +Example: +\fI\fIiprint server\fR\fR\fI = \fR\fIMYCUPSSERVER\fR\fI \fR +.RE + +kdc enable fast (G) +.PP +.RS 4 +With the Samba 4\&.16 the embedded Heimdal KDC brings support for RFC6113 FAST, which wasn\*(Aqt available in older Samba versions\&. +.sp +This option is mostly for testing and currently only applies if the embedded Heimdal KDC is used\&. +.sp +Default: +\fI\fIkdc enable fast\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +keepalive (G) +.PP +.RS 4 +The value of the parameter (an integer) represents the number of seconds between +\fIkeepalive\fR +packets\&. If this parameter is zero, no keepalive packets will be sent\&. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding\&. +.sp +Keepalives should, in general, not be needed if the socket has the SO_KEEPALIVE attribute set on it by default\&. (see +\m[blue]\fBsocket options\fR\m[])\&. Basically you should only use this option if you strike difficulties\&. +.sp +Please note this option only applies to SMB1 client connections, and has no effect on SMB2 clients\&. +.sp +Default: +\fI\fIkeepalive\fR\fR\fI = \fR\fI300\fR\fI \fR +.sp +Example: +\fI\fIkeepalive\fR\fR\fI = \fR\fI600\fR\fI \fR +.RE + +kerberos encryption types (G) +.PP +.RS 4 +This parameter determines the encryption types to use when operating as a Kerberos client\&. Possible values are +\fIall\fR, +\fIstrong\fR, and +\fIlegacy\fR\&. +.sp +Samba uses a Kerberos library (MIT or Heimdal) to obtain Kerberos tickets\&. This library is normally configured outside of Samba, using the krb5\&.conf file\&. This file may also include directives to configure the encryption types to be used\&. However, Samba implements Active Directory protocols and algorithms to locate a domain controller\&. In order to force the Kerberos library into using the correct domain controller, some Samba processes, such as +\fBwinbindd\fR(8) +and +\fBnet\fR(8), build a private krb5\&.conf file for use by the Kerberos library while being invoked from Samba\&. This private file controls all aspects of the Kerberos library operation, and this parameter controls how the encryption types are configured within this generated file, and therefore also controls the encryption types negotiable by Samba\&. +.sp +When set to +\fBall\fR, all active directory encryption types are allowed\&. +.sp +When set to +\fBstrong\fR, only AES\-based encryption types are offered\&. This can be used in hardened environments to prevent downgrade attacks\&. +.sp +When set to +\fBlegacy\fR, only RC4\-HMAC\-MD5 is allowed\&. Avoiding AES this way has one a very specific use\&. Normally, the encryption type is negotiated between the peers\&. However, there is one scenario in which a Windows read\-only domain controller (RODC) advertises AES encryption, but then proxies the request to a writeable DC which may not support AES encryption, leading to failure of the handshake\&. Setting this parameter to +\fBlegacy\fR +would cause samba not to negotiate AES encryption\&. It is assumed of course that the weaker legacy encryption types are acceptable for the setup\&. +.sp +Default: +\fI\fIkerberos encryption types\fR\fR\fI = \fR\fIall\fR\fI \fR +.RE + +kerberos method (G) +.PP +.RS 4 +Controls how kerberos tickets are verified\&. +.sp +Valid options are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +secrets only \- use only the secrets\&.tdb for ticket verification (default) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +system keytab \- use only the system keytab for ticket verification +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +dedicated keytab \- use a dedicated keytab for ticket verification +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +secrets and keytab \- use the secrets\&.tdb first, then the system keytab +.RE +.sp +.RE +The major difference between "system keytab" and "dedicated keytab" is that the latter method relies on kerberos to find the correct keytab entry instead of filtering based on expected principals\&. +.sp +When the kerberos method is in "dedicated keytab" mode, +\m[blue]\fBdedicated keytab file\fR\m[] +must be set to specify the location of the keytab file\&. +.sp +Default: +\fI\fIkerberos method\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +kernel change notify (G) +.PP +.RS 4 +This parameter specifies whether Samba should ask the kernel for change notifications in directories so that SMB clients can refresh whenever the data on the server changes\&. +.sp +This parameter is only used when your kernel supports change notification to user programs using the inotify interface\&. +.sp +Default: +\fI\fIkernel change notify\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +kernel oplocks (S) +.PP +.RS 4 +For UNIXes that support kernel based +\m[blue]\fBoplocks\fR\m[] +(currently only Linux), this parameter allows the use of them to be turned on or off\&. However, this disables Level II oplocks for clients as the Linux kernel does not support them properly\&. +.sp +Kernel oplocks support allows Samba +\fIoplocks \fR +to be broken whenever a local UNIX process or NFS operation accesses a file that +\fBsmbd\fR(8) +has oplocked\&. This allows complete data consistency between SMB/CIFS, NFS and local file access (and is a +\fIvery\fR +cool feature :\-)\&. +.sp +If you do not need this interaction, you should disable the parameter on Linux to get Level II oplocks and the associated performance benefit\&. +.sp +This parameter defaults to +\fBno\fR +and is translated to a no\-op on systems that do not have the necessary kernel support\&. +.sp +Default: +\fI\fIkernel oplocks\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +kernel share modes (S) +.PP +.RS 4 +This parameter controls whether SMB share modes are translated into file system specific sharemode calls\&. +.sp +Kernel share modes provide a minimal level of interoperability with local UNIX processes and NFS operations by preventing access corresponding to the SMB share modes\&. This requires a file system specific VFS module with proper support\&. +.sp +Note that in order to use SMB2 durable file handles on a share, you have to turn kernel share modes off\&. +.sp +This parameter defaults to +\fBno\fR\&. Setting it to +\fByes\fR +requires a file system module that supports file system sharemodes, otherwise attempts to access files will fail with a sharing violation\&. +.sp +Default: +\fI\fIkernel share modes\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +kpasswd port (G) +.PP +.RS 4 +Specifies which ports the Kerberos server should listen on for password changes\&. +.sp +Default: +\fI\fIkpasswd port\fR\fR\fI = \fR\fI464\fR\fI \fR +.RE + +krb5 port (G) +.PP +.RS 4 +Specifies which port the KDC should listen on for Kerberos traffic\&. +.sp +Default: +\fI\fIkrb5 port\fR\fR\fI = \fR\fI88\fR\fI \fR +.RE + +lanman auth (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.11 and support for LanMan (as distinct from NTLM, NTLMv2 or Kerberos authentication) will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +lanman auth = no +will be the enforced behaviour\&. +.sp +This parameter determines whether or not +\fBsmbd\fR(8) +will attempt to authenticate users or permit password changes using the LANMAN password hash\&. If disabled, only clients which support NT password hashes (e\&.g\&. Windows NT/2000 clients, smbclient, but not Windows 95/98 or the MS DOS network client) will be able to connect to the Samba host\&. +.sp +The LANMAN encrypted response is easily broken, due to its case\-insensitive nature, and the choice of algorithm\&. Servers without Windows 95/98/ME or MS DOS clients are advised to disable this option\&. +.sp +When this parameter is set to +no +this will also result in sambaLMPassword in Samba\*(Aqs passdb being blanked after the next password change\&. As a result of that lanman clients won\*(Aqt be able to authenticate, even if lanman auth is re\-enabled later on\&. +.sp +Unlike the +\fIencrypt passwords\fR +option, this parameter cannot alter client behaviour, and the LANMAN response will still be sent over the network\&. See the +client lanman auth +to disable this for Samba\*(Aqs clients (such as smbclient) +.sp +This parameter is overridden by +\fIntlm auth\fR, so unless that it is also set to +\fBntlmv1\-permitted\fR +or +\fByes\fR, then only NTLMv2 logins will be permitted and no LM hash will be stored\&. All modern clients support NTLMv2, and but some older clients require special configuration to use it\&. +.sp +Default: +\fI\fIlanman auth\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +large readwrite (G) +.PP +.RS 4 +This parameter determines whether or not +\fBsmbd\fR(8) +supports the new 64k streaming read and write variant SMB requests introduced with Windows 2000\&. Note that due to Windows 2000 client redirector bugs this requires Samba to be running on a 64\-bit capable operating system such as IRIX, Solaris or a Linux 2\&.4 kernel\&. Can improve performance by 10% with Windows 2000 clients\&. Defaults to on\&. Not as tested as some other Samba code paths\&. +.sp +Default: +\fI\fIlarge readwrite\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ldap admin dn (G) +.PP +.RS 4 +The +\m[blue]\fBldap admin dn\fR\m[] +defines the Distinguished Name (DN) name used by Samba to contact the ldap server when retrieving user account information\&. The +\m[blue]\fBldap admin dn\fR\m[] +is used in conjunction with the admin dn password stored in the +private/secrets\&.tdb +file\&. See the +\fBsmbpasswd\fR(8) +man page for more information on how to accomplish this\&. +.sp +The +\m[blue]\fBldap admin dn\fR\m[] +requires a fully specified DN\&. The +\m[blue]\fBldap suffix\fR\m[] +is not appended to the +\m[blue]\fBldap admin dn\fR\m[]\&. +.sp +\fINo default\fR +.RE + +ldap connection timeout (G) +.PP +.RS 4 +This parameter tells the LDAP library calls which timeout in seconds they should honor during initial connection establishments to LDAP servers\&. It is very useful in failover scenarios in particular\&. If one or more LDAP servers are not reachable at all, we do not have to wait until TCP timeouts are over\&. This feature must be supported by your LDAP library\&. +.sp +This parameter is different from +\m[blue]\fBldap timeout\fR\m[] +which affects operations on LDAP servers using an existing connection and not establishing an initial connection\&. +.sp +Default: +\fI\fIldap connection timeout\fR\fR\fI = \fR\fI2\fR\fI \fR +.RE + +ldap debug level (G) +.PP +.RS 4 +This parameter controls the debug level of the LDAP library calls\&. In the case of OpenLDAP, it is the same bit\-field as understood by the server and documented in the +\fBslapd.conf\fR(5) +manpage\&. A typical useful value will be +\fI1\fR +for tracing function calls\&. +.sp +The debug output from the LDAP libraries appears with the prefix [LDAP] in Samba\*(Aqs logging output\&. The level at which LDAP logging is printed is controlled by the parameter +\fIldap debug threshold\fR\&. +.sp +Default: +\fI\fIldap debug level\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIldap debug level\fR\fR\fI = \fR\fI1\fR\fI \fR +.RE + +ldap debug threshold (G) +.PP +.RS 4 +This parameter controls the Samba debug level at which the ldap library debug output is printed in the Samba logs\&. See the description of +\fIldap debug level\fR +for details\&. +.sp +Default: +\fI\fIldap debug threshold\fR\fR\fI = \fR\fI10\fR\fI \fR +.sp +Example: +\fI\fIldap debug threshold\fR\fR\fI = \fR\fI5\fR\fI \fR +.RE + +ldap delete dn (G) +.PP +.RS 4 +This parameter specifies whether a delete operation in the ldapsam deletes the complete entry or only the attributes specific to Samba\&. +.sp +Default: +\fI\fIldap delete dn\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +ldap deref (G) +.PP +.RS 4 +This option controls whether Samba should tell the LDAP library to use a certain alias dereferencing method\&. The default is +\fIauto\fR, which means that the default setting of the ldap client library will be kept\&. Other possible values are +\fInever\fR, +\fIfinding\fR, +\fIsearching\fR +and +\fIalways\fR\&. Grab your LDAP manual for more information\&. +.sp +Default: +\fI\fIldap deref\fR\fR\fI = \fR\fIauto\fR\fI \fR +.sp +Example: +\fI\fIldap deref\fR\fR\fI = \fR\fIsearching\fR\fI \fR +.RE + +ldap follow referral (G) +.PP +.RS 4 +This option controls whether to follow LDAP referrals or not when searching for entries in the LDAP database\&. Possible values are +\fIon\fR +to enable following referrals, +\fIoff\fR +to disable this, and +\fIauto\fR, to use the libldap default settings\&. libldap\*(Aqs choice of following referrals or not is set in /etc/openldap/ldap\&.conf with the REFERRALS parameter as documented in ldap\&.conf(5)\&. +.sp +Default: +\fI\fIldap follow referral\fR\fR\fI = \fR\fIauto\fR\fI \fR +.sp +Example: +\fI\fIldap follow referral\fR\fR\fI = \fR\fIoff\fR\fI \fR +.RE + +ldap group suffix (G) +.PP +.RS 4 +This parameter specifies the suffix that is used for groups when these are added to the LDAP directory\&. If this parameter is unset, the value of +\m[blue]\fBldap suffix\fR\m[] +will be used instead\&. The suffix string is pre\-pended to the +\m[blue]\fBldap suffix\fR\m[] +string so use a partial DN\&. +.sp +Default: +\fI\fIldap group suffix\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIldap group suffix\fR\fR\fI = \fR\fIou=Groups\fR\fI \fR +.RE + +ldap idmap suffix (G) +.PP +.RS 4 +This parameters specifies the suffix that is used when storing idmap mappings\&. If this parameter is unset, the value of +\m[blue]\fBldap suffix\fR\m[] +will be used instead\&. The suffix string is pre\-pended to the +\m[blue]\fBldap suffix\fR\m[] +string so use a partial DN\&. +.sp +Default: +\fI\fIldap idmap suffix\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIldap idmap suffix\fR\fR\fI = \fR\fIou=Idmap\fR\fI \fR +.RE + +ldap machine suffix (G) +.PP +.RS 4 +It specifies where machines should be added to the ldap tree\&. If this parameter is unset, the value of +\m[blue]\fBldap suffix\fR\m[] +will be used instead\&. The suffix string is pre\-pended to the +\m[blue]\fBldap suffix\fR\m[] +string so use a partial DN\&. +.sp +Default: +\fI\fIldap machine suffix\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIldap machine suffix\fR\fR\fI = \fR\fIou=Computers\fR\fI \fR +.RE + +ldap max anonymous request size (G) +.PP +.RS 4 +This parameter specifies the maximum permitted size (in bytes) for an LDAP request received on an anonymous connection\&. +.sp +If the request size exceeds this limit the request will be rejected\&. +.sp +Default: +\fI\fIldap max anonymous request size\fR\fR\fI = \fR\fI256000\fR\fI \fR +.sp +Example: +\fI\fIldap max anonymous request size\fR\fR\fI = \fR\fI500000\fR\fI \fR +.RE + +ldap max authenticated request size (G) +.PP +.RS 4 +This parameter specifies the maximum permitted size (in bytes) for an LDAP request received on an authenticated connection\&. +.sp +If the request size exceeds this limit the request will be rejected\&. +.sp +Default: +\fI\fIldap max authenticated request size\fR\fR\fI = \fR\fI16777216\fR\fI \fR +.sp +Example: +\fI\fIldap max authenticated request size\fR\fR\fI = \fR\fI4194304\fR\fI \fR +.RE + +ldap max search request size (G) +.PP +.RS 4 +This parameter specifies the maximum permitted size (in bytes) for an LDAP search request\&. +.sp +If the request size exceeds this limit the request will be rejected\&. +.sp +Default: +\fI\fIldap max search request size\fR\fR\fI = \fR\fI256000\fR\fI \fR +.sp +Example: +\fI\fIldap max search request size\fR\fR\fI = \fR\fI4194304\fR\fI \fR +.RE + +ldap page size (G) +.PP +.RS 4 +This parameter specifies the number of entries per page\&. +.sp +If the LDAP server supports paged results, clients can request subsets of search results (pages) instead of the entire list\&. This parameter specifies the size of these pages\&. +.sp +Default: +\fI\fIldap page size\fR\fR\fI = \fR\fI1000\fR\fI \fR +.sp +Example: +\fI\fIldap page size\fR\fR\fI = \fR\fI512\fR\fI \fR +.RE + +ldap password sync +.PP +.RS 4 +This parameter is a synonym for +ldap passwd sync\&. +.RE + +ldap passwd sync (G) +.PP +.RS 4 +This option is used to define whether or not Samba should sync the LDAP password with the NT and LM hashes for normal accounts (NOT for workstation, server or domain trusts) on a password change via SAMBA\&. +.sp +The +\m[blue]\fBldap passwd sync\fR\m[] +can be set to one of three values: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIYes\fR += Try to update the LDAP, NT and LM passwords and update the pwdLastSet time\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fINo\fR += Update NT and LM passwords and update the pwdLastSet time\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIOnly\fR += Only update the LDAP password and let the LDAP server do the rest\&. +.RE +.sp +.RE +Default: +\fI\fIldap passwd sync\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +ldap replication sleep (G) +.PP +.RS 4 +When Samba is asked to write to a read\-only LDAP replica, we are redirected to talk to the read\-write master server\&. This server then replicates our changes back to the \*(Aqlocal\*(Aq server, however the replication might take some seconds, especially over slow links\&. Certain client activities, particularly domain joins, can become confused by the \*(Aqsuccess\*(Aq that does not immediately change the LDAP back\-end\*(Aqs data\&. +.sp +This option simply causes Samba to wait a short time, to allow the LDAP server to catch up\&. If you have a particularly high\-latency network, you may wish to time the LDAP replication with a network sniffer, and increase this value accordingly\&. Be aware that no checking is performed that the data has actually replicated\&. +.sp +The value is specified in milliseconds, the maximum value is 5000 (5 seconds)\&. +.sp +Default: +\fI\fIldap replication sleep\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +ldapsam:editposix (G) +.PP +.RS 4 +Editposix is an option that leverages ldapsam:trusted to make it simpler to manage a domain controller eliminating the need to set up custom scripts to add and manage the posix users and groups\&. This option will instead directly manipulate the ldap tree to create, remove and modify user and group entries\&. This option also requires a running winbindd as it is used to allocate new uids/gids on user/group creation\&. The allocation range must be therefore configured\&. +.sp +To use this option, a basic ldap tree must be provided and the ldap suffix parameters must be properly configured\&. On virgin servers the default users and groups (Administrator, Guest, Domain Users, Domain Admins, Domain Guests) can be precreated with the command +net sam provision\&. To run this command the ldap server must be running, Winbindd must be running and the smb\&.conf ldap options must be properly configured\&. The typical ldap setup used with the +\m[blue]\fBldapsam:trusted = yes\fR\m[] +option is usually sufficient to use +\m[blue]\fBldapsam:editposix = yes\fR\m[] +as well\&. +.sp +An example configuration can be the following: +.sp +.if n \{\ +.RS 4 +.\} +.nf + encrypt passwords = true + passdb backend = ldapsam + + ldapsam:trusted=yes + ldapsam:editposix=yes + + ldap admin dn = cn=admin,dc=samba,dc=org + ldap delete dn = yes + ldap group suffix = ou=groups + ldap idmap suffix = ou=idmap + ldap machine suffix = ou=computers + ldap user suffix = ou=users + ldap suffix = dc=samba,dc=org + + idmap backend = ldap:"ldap://localhost" + + idmap uid = 5000\-50000 + idmap gid = 5000\-50000 + +.fi +.if n \{\ +.RE +.\} +.sp +This configuration assumes a directory layout like described in the following ldif: +.sp +.if n \{\ +.RS 4 +.\} +.nf + dn: dc=samba,dc=org + objectClass: top + objectClass: dcObject + objectClass: organization + o: samba\&.org + dc: samba + + dn: cn=admin,dc=samba,dc=org + objectClass: simpleSecurityObject + objectClass: organizationalRole + cn: admin + description: LDAP administrator + userPassword: secret + + dn: ou=users,dc=samba,dc=org + objectClass: top + objectClass: organizationalUnit + ou: users + + dn: ou=groups,dc=samba,dc=org + objectClass: top + objectClass: organizationalUnit + ou: groups + + dn: ou=idmap,dc=samba,dc=org + objectClass: top + objectClass: organizationalUnit + ou: idmap + + dn: ou=computers,dc=samba,dc=org + objectClass: top + objectClass: organizationalUnit + ou: computers + +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIldapsam:editposix\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +ldapsam:trusted (G) +.PP +.RS 4 +By default, Samba as a Domain Controller with an LDAP backend needs to use the Unix\-style NSS subsystem to access user and group information\&. Due to the way Unix stores user information in /etc/passwd and /etc/group this inevitably leads to inefficiencies\&. One important question a user needs to know is the list of groups he is member of\&. The plain UNIX model involves a complete enumeration of the file /etc/group and its NSS counterparts in LDAP\&. UNIX has optimized functions to enumerate group membership\&. Sadly, other functions that are used to deal with user and group attributes lack such optimization\&. +.sp +To make Samba scale well in large environments, the +\m[blue]\fBldapsam:trusted = yes\fR\m[] +option assumes that the complete user and group database that is relevant to Samba is stored in LDAP with the standard posixAccount/posixGroup attributes\&. It further assumes that the Samba auxiliary object classes are stored together with the POSIX data in the same LDAP object\&. If these assumptions are met, +\m[blue]\fBldapsam:trusted = yes\fR\m[] +can be activated and Samba can bypass the NSS system to query user group memberships\&. Optimized LDAP queries can greatly speed up domain logon and administration tasks\&. Depending on the size of the LDAP database a factor of 100 or more for common queries is easily achieved\&. +.sp +Default: +\fI\fIldapsam:trusted\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +ldap server require strong auth (G) +.PP +.RS 4 +The +\m[blue]\fBldap server require strong auth\fR\m[] +defines whether the ldap server requires ldap traffic to be signed or signed and encrypted (sealed)\&. Possible values are +\fIno\fR, +\fIallow_sasl_over_tls\fR +and +\fIyes\fR\&. +.sp +A value of +\fIno\fR +allows simple and sasl binds over all transports\&. +.sp +A value of +\fIallow_sasl_over_tls\fR +allows simple and sasl binds (without sign or seal) over TLS encrypted connections\&. Unencrypted connections only allow sasl binds with sign or seal\&. +.sp +A value of +\fIyes\fR +allows only simple binds over TLS encrypted connections\&. Unencrypted connections only allow sasl binds with sign or seal\&. +.sp +Default: +\fI\fIldap server require strong auth\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ldap ssl (G) +.PP +.RS 4 +This option is used to define whether or not Samba should use SSL when connecting to the ldap server This is +\fINOT\fR +related to Samba\*(Aqs previous SSL support which was enabled by specifying the +\-\-with\-ssl +option to the +configure +script\&. +.sp +LDAP connections should be secured where possible\&. This may be done setting +\fIeither\fR +this parameter to +\fIstart tls\fR +\fIor\fR +by specifying +\fIldaps://\fR +in the URL argument of +\m[blue]\fBpassdb backend\fR\m[]\&. +.sp +The +\m[blue]\fBldap ssl\fR\m[] +can be set to one of two values: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIOff\fR += Never use SSL when querying the directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIstart tls\fR += Use the LDAPv3 StartTLS extended operation (RFC2830) for communicating with the directory server\&. +.RE +.sp +.RE +Please note that this parameter does only affect +\fIrpc\fR +methods\&. +.sp +Default: +\fI\fIldap ssl\fR\fR\fI = \fR\fIstart tls\fR\fI \fR +.RE + +ldap suffix (G) +.PP +.RS 4 +Specifies the base for all ldap suffixes and for storing the sambaDomain object\&. +.sp +The ldap suffix will be appended to the values specified for the +\m[blue]\fBldap user suffix\fR\m[], +\m[blue]\fBldap group suffix\fR\m[], +\m[blue]\fBldap machine suffix\fR\m[], and the +\m[blue]\fBldap idmap suffix\fR\m[]\&. Each of these should be given only a DN relative to the +\m[blue]\fBldap suffix\fR\m[]\&. +.sp +Default: +\fI\fIldap suffix\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIldap suffix\fR\fR\fI = \fR\fIdc=samba,dc=org\fR\fI \fR +.RE + +ldap timeout (G) +.PP +.RS 4 +This parameter defines the number of seconds that Samba should use as timeout for LDAP operations\&. +.sp +Default: +\fI\fIldap timeout\fR\fR\fI = \fR\fI15\fR\fI \fR +.RE + +ldap user suffix (G) +.PP +.RS 4 +This parameter specifies where users are added to the tree\&. If this parameter is unset, the value of +\m[blue]\fBldap suffix\fR\m[] +will be used instead\&. The suffix string is pre\-pended to the +\m[blue]\fBldap suffix\fR\m[] +string so use a partial DN\&. +.sp +Default: +\fI\fIldap user suffix\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIldap user suffix\fR\fR\fI = \fR\fIou=people\fR\fI \fR +.RE + +level2 oplocks (S) +.PP +.RS 4 +This parameter controls whether Samba supports level2 (read\-only) oplocks on a share\&. +.sp +Level2, or read\-only oplocks allow Windows NT clients that have an oplock on a file to downgrade from a read\-write oplock to a read\-only oplock once a second client opens the file (instead of releasing all oplocks on a second open, as in traditional, exclusive oplocks)\&. This allows all openers of the file that support level2 oplocks to cache the file for read\-ahead only (ie\&. they may not cache writes or lock requests) and increases performance for many accesses of files that are not commonly written (such as application \&.EXE files)\&. +.sp +Once one of the clients which have a read\-only oplock writes to the file all clients are notified (no reply is needed or waited for) and told to break their oplocks to "none" and delete any read\-ahead caches\&. +.sp +It is recommended that this parameter be turned on to speed access to shared executables\&. +.sp +For more discussions on level2 oplocks see the CIFS spec\&. +.sp +Currently, if +\m[blue]\fBkernel oplocks\fR\m[] +are supported then level2 oplocks are not granted (even if this parameter is set to +\fByes\fR)\&. Note also, the +\m[blue]\fBoplocks\fR\m[] +parameter must be set to +\fByes\fR +on this share in order for this parameter to have any effect\&. +.sp +Default: +\fI\fIlevel2 oplocks\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +lm announce (G) +.PP +.RS 4 +This parameter determines if +\fBnmbd\fR(8) +will produce Lanman announce broadcasts that are needed by OS/2 clients in order for them to see the Samba server in their browse list\&. This parameter can have three values, +\fByes\fR, +\fBno\fR, or +\fBauto\fR\&. The default is +\fBauto\fR\&. If set to +\fBno\fR +Samba will never produce these broadcasts\&. If set to +\fByes\fR +Samba will produce Lanman announce broadcasts at a frequency set by the parameter +\m[blue]\fBlm interval\fR\m[]\&. If set to +\fBauto\fR +Samba will not send Lanman announce broadcasts by default but will listen for them\&. If it hears such a broadcast on the wire it will then start sending them at a frequency set by the parameter +\m[blue]\fBlm interval\fR\m[]\&. +.sp +Default: +\fI\fIlm announce\fR\fR\fI = \fR\fIauto\fR\fI \fR +.sp +Example: +\fI\fIlm announce\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +lm interval (G) +.PP +.RS 4 +If Samba is set to produce Lanman announce broadcasts needed by OS/2 clients (see the +\m[blue]\fBlm announce\fR\m[] +parameter) then this parameter defines the frequency in seconds with which they will be made\&. If this is set to zero then no Lanman announcements will be made despite the setting of the +\m[blue]\fBlm announce\fR\m[] +parameter\&. +.sp +Default: +\fI\fIlm interval\fR\fR\fI = \fR\fI60\fR\fI \fR +.sp +Example: +\fI\fIlm interval\fR\fR\fI = \fR\fI120\fR\fI \fR +.RE + +load printers (G) +.PP +.RS 4 +A boolean variable that controls whether all printers in the printcap will be loaded for browsing by default\&. See the +\m[blue]\fBprinters\fR\m[] +section for more details\&. +.sp +Default: +\fI\fIload printers\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +local master (G) +.PP +.RS 4 +This option allows +\fBnmbd\fR(8) +to try and become a local master browser on a subnet\&. If set to +\fBno\fR +then +nmbd +will not attempt to become a local master browser on a subnet and will also lose in all browsing elections\&. By default this value is set to +\fByes\fR\&. Setting this value to +\fByes\fR +doesn\*(Aqt mean that Samba will +\fIbecome\fR +the local master browser on a subnet, just that +nmbd +will +\fIparticipate\fR +in elections for local master browser\&. +.sp +Setting this value to +\fBno\fR +will cause +nmbd +\fInever\fR +to become a local master browser\&. +.sp +Default: +\fI\fIlocal master\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +lock dir +.PP +.RS 4 +This parameter is a synonym for +lock directory\&. +.RE + +lock directory (G) +.PP +.RS 4 +This option specifies the directory where lock files will be placed\&. The lock files are used to implement the +\m[blue]\fBmax connections\fR\m[] +option\&. +.sp +Note: This option can not be set inside registry configurations\&. +.sp +The files placed in this directory are not required across service restarts and can be safely placed on volatile storage (e\&.g\&. tmpfs in Linux) +.sp +Default: +\fI\fIlock directory\fR\fR\fI = \fR\fI/var/db/samba4\fR\fI \fR +.sp +Example: +\fI\fIlock directory\fR\fR\fI = \fR\fI/var/run/samba/locks\fR\fI \fR +.RE + +locking (S) +.PP +.RS 4 +This controls whether or not locking will be performed by the server in response to lock requests from the client\&. +.sp +If +locking = no, all lock and unlock requests will appear to succeed and all lock queries will report that the file in question is available for locking\&. +.sp +If +locking = yes, real locking will be performed by the server\&. +.sp +This option +\fImay\fR +be useful for read\-only filesystems which +\fImay\fR +not need locking (such as CDROM drives), although setting this parameter of +\fBno\fR +is not really recommended even in this case\&. +.sp +Be careful about disabling locking either globally or in a specific service, as lack of locking may result in data corruption\&. You should never need to set this parameter\&. +.sp +Default: +\fI\fIlocking\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +lock spin time (G) +.PP +.RS 4 +The time in milliseconds that smbd should keep waiting to see if a failed lock request can be granted\&. This parameter has changed in default value from Samba 3\&.0\&.23 from 10 to 200\&. The associated +\m[blue]\fBlock spin count\fR\m[] +parameter is no longer used in Samba 3\&.0\&.24\&. You should not need to change the value of this parameter\&. +.sp +Default: +\fI\fIlock spin time\fR\fR\fI = \fR\fI200\fR\fI \fR +.RE + +log file (G) +.PP +.RS 4 +This option allows you to override the name of the Samba log file (also known as the debug file)\&. +.sp +This option takes the standard substitutions, allowing you to have separate log files for each user or machine\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fIlog file\fR\fR\fI = \fR\fI/usr/local/samba/var/log\&.%m\fR\fI \fR +.RE + +logging (G) +.PP +.RS 4 +This parameter configures logging backends\&. Multiple backends can be specified at the same time, with different log levels for each backend\&. The parameter is a list of backends, where each backend is specified as backend[:option][@loglevel]\&. +.sp +The \*(Aqoption\*(Aq parameter can be used to pass backend\-specific options\&. +.sp +The log level for a backend is optional, if it is not set for a backend, all messages are sent to this backend\&. The parameter +\m[blue]\fBlog level\fR\m[] +determines overall log levels, while the log levels specified here define what is sent to the individual backends\&. +.sp +When +\m[blue]\fBlogging\fR\m[] +is set, it overrides the +\m[blue]\fBsyslog\fR\m[] +and +\m[blue]\fBsyslog only\fR\m[] +parameters\&. +.sp +Some backends are only available when Samba has been compiled with the additional libraries\&. The overall list of logging backends: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsyslog\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIfile\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsystemd\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIlttng\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIgpfs\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIringbuf\fR +.RE +.sp +.RE +The +\fIringbuf\fR +backend supports an optional size argument to change the buffer size used, the default is 1 MB: +\fIringbuf:size=NBYTES\fR +.sp +Default: +\fI\fIlogging\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIlogging\fR\fR\fI = \fR\fIsyslog@1 file\fR\fI \fR +.RE + +debuglevel +.PP +.RS 4 +This parameter is a synonym for +log level\&. +.RE + +log level (G) +.PP +.RS 4 +The value of the parameter (a string) allows the debug level (logging level) to be specified in the +smb\&.conf +file\&. +.sp +This parameter has been extended since the 2\&.2\&.x series, now it allows one to specify the debug level for multiple debug classes and distinct logfiles for debug classes\&. This is to give greater flexibility in the configuration of the system\&. The following debug classes are currently implemented: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIall\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fItdb\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIprintdrivers\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIlanman\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsmb\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIrpc_parse\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIrpc_srv\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIrpc_cli\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpassdb\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsam\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIauth\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIwinbind\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIvfs\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIidmap\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIquota\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIacls\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIlocking\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fImsdfs\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdmapi\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIregistry\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIscavenger\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdns\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIldb\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fItevent\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIauth_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIauth_json_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIkerberos\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdrs_repl\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsmb2\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIsmb2_credits\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_json_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_password_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_password_json_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_transaction_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_transaction_json_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_group_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdsdb_group_json_audit\fR +.RE +.sp +.RE +Various modules register dynamic debug classes at first usage: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIcatia\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIdfs_samba4\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIextd_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIfileid\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIfruit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIfull_audit\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fImedia_harmony\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIpreopen\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIrecycle\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshadow_copy\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIshadow_copy\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIunityed_media\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIvirusfilter\fR +.RE +.sp +.RE +To configure the logging for specific classes to go into a different file then +\m[blue]\fBlog file\fR\m[], you can append +\fI@PATH\fR +to the class, eg +\fIlog level = 1 full_audit:1@/var/log/audit\&.log\fR\&. +.sp +Authentication and authorization audit information is logged under the +\fIauth_audit\fR, and if Samba was not compiled with \-\-without\-json, a JSON representation is logged under +\fIauth_json_audit\fR\&. +.sp +Support is comprehensive for all authentication and authorisation of user accounts in the Samba Active Directory Domain Controller, as well as the implicit authentication in password changes\&. In the file server, NTLM authentication, SMB and RPC authorization is covered\&. +.sp +Log levels for +\fIauth_audit\fR +and +\fIauth_audit_json\fR +are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2: Authentication Failure +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3: Authentication Success +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +4: Authorization Success +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5: Anonymous Authentication and Authorization Success +.RE +.sp +.RE +Changes to the AD DC +sam\&.ldb +database are logged under the +\fIdsdb_audit\fR +and a JSON representation is logged under +\fIdsdb_json_audit\fR\&. +.sp +Group membership changes to the AD DC +sam\&.ldb +database are logged under the +\fIdsdb_group_audit\fR +and a JSON representation is logged under +\fIdsdb_group_json_audit\fR\&. +.sp +Log levels for +\fIdsdb_audit\fR, +\fIdsdb_json_audit\fR, +\fIdsdb_group_audit\fR, +\fIdsdb_group_json_audit\fR +and +\fIdsdb_json_audit\fR +are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5: Database modifications +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5: Replicated updates from another DC +.RE +.sp +.RE +Password changes and Password resets in the AD DC are logged under +\fIdsdb_password_audit\fR +and a JSON representation is logged under the +\fIdsdb_password_json_audit\fR\&. Password changes will also appears as authentication events via +\fIauth_audit\fR +and +\fIauth_audit_json\fR\&. +.sp +Log levels for +\fIdsdb_password_audit\fR +and +\fIdsdb_password_json_audit\fR +are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5: Successful password changes and resets +.RE +.sp +.RE +Transaction rollbacks and prepare commit failures are logged under the +\fIdsdb_transaction_audit\fR +and a JSON representation is logged under the +\fIdsdb_transaction_json_audit\fR\&. +.sp +Log levels for +\fIdsdb_transaction_audit\fR +and +\fIdsdb_transaction_json\fR +are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5: Transaction failure (rollback) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +10: Transaction success (commit) +.RE +.sp +.RE +Transaction roll\-backs are possible in Samba, and whilst they rarely reflect anything more than the failure of an individual operation (say due to the add of a conflicting record), they are possible\&. Audit logs are already generated and sent to the system logs before the transaction is complete\&. Logging the transaction details allows the identification of password and +sam\&.ldb +operations that have been rolled back, and so have not actually persisted\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Changes to +sam\&.ldb +made locally by the +root +user with direct access to the database are not logged to the system logs, but to the administrator\*(Aqs own console\&. While less than ideal, any user able to make such modifications could disable the audit logging in any case\&. +.sp .5v +.RE +Default: +\fI\fIlog level\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIlog level\fR\fR\fI = \fR\fI3 passdb:5 auth:10 winbind:2\fR\fI \fR +.sp +Example: +\fI\fIlog level\fR\fR\fI = \fR\fI1 full_audit:1@/var/log/audit\&.log winbind:2\fR\fI \fR +.RE + +log nt token command (G) +.PP +.RS 4 +This option can be set to a command that will be called when new nt tokens are created\&. +.sp +This is only useful for development purposes\&. +.sp +Default: +\fI\fIlog nt token command\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +logon drive (G) +.PP +.RS 4 +This parameter specifies the local path to which the home directory will be connected (see +\m[blue]\fBlogon home\fR\m[]) and is only used by NT Workstations\&. +.sp +Note that this option is only useful if Samba is set up as a logon server\&. +.sp +Default: +\fI\fIlogon drive\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIlogon drive\fR\fR\fI = \fR\fIh:\fR\fI \fR +.RE + +logon home (G) +.PP +.RS 4 +This parameter specifies the home directory location when a Win95/98 or NT Workstation logs into a Samba PDC\&. It allows you to do +.sp +C:\e>\fBNET USE H: /HOME\fR +.sp +from a command prompt, for example\&. +.sp +This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&. +.sp +This parameter can be used with Win9X workstations to ensure that roaming profiles are stored in a subdirectory of the user\*(Aqs home directory\&. This is done in the following way: +.sp +logon home = \e\e%N\e%U\eprofile +.sp +This tells Samba to return the above string, with substitutions made when a client requests the info, generally in a NetUserGetInfo request\&. Win9X clients truncate the info to \e\eserver\eshare when a user does +net use /home +but use the whole string when dealing with profiles\&. +.sp +Note that in prior versions of Samba, the +\m[blue]\fBlogon path\fR\m[] +was returned rather than +\fIlogon home\fR\&. This broke +net use /home +but allowed profiles outside the home directory\&. The current implementation is correct, and can be used for profiles if you use the above trick\&. +.sp +Disable this feature by setting +\m[blue]\fBlogon home = ""\fR\m[] +\- using the empty string\&. +.sp +This option is only useful if Samba is set up as a logon server\&. +.sp +Default: +\fI\fIlogon home\fR\fR\fI = \fR\fI\e\e%N\e%U\fR\fI \fR +.sp +Example: +\fI\fIlogon home\fR\fR\fI = \fR\fI\e\eremote_smb_server\e%U\fR\fI \fR +.RE + +logon path (G) +.PP +.RS 4 +This parameter specifies the directory where roaming profiles (Desktop, NTuser\&.dat, etc) are stored\&. Contrary to previous versions of these manual pages, it has nothing to do with Win 9X roaming profiles\&. To find out how to handle roaming profiles for Win 9X system, see the +\m[blue]\fBlogon home\fR\m[] +parameter\&. +.sp +This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&. It also specifies the directory from which the "Application Data", +desktop, +start menu, +network neighborhood, +programs +and other folders, and their contents, are loaded and displayed on your Windows NT client\&. +.sp +The share and the path must be readable by the user for the preferences and directories to be loaded onto the Windows NT client\&. The share must be writeable when the user logs in for the first time, in order that the Windows NT client can create the NTuser\&.dat and other directories\&. Thereafter, the directories and any of the contents can, if required, be made read\-only\&. It is not advisable that the NTuser\&.dat file be made read\-only \- rename it to NTuser\&.man to achieve the desired effect (a +\fIMAN\fRdatory profile)\&. +.sp +Windows clients can sometimes maintain a connection to the [homes] share, even though there is no user logged in\&. Therefore, it is vital that the logon path does not include a reference to the homes share (i\&.e\&. setting this parameter to \e\e%N\ehomes\eprofile_path will cause problems)\&. +.sp +This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Do not quote the value\&. Setting this as +\(lq\e\e%N\eprofile\e%U\(rq +will break profile handling\&. Where the tdbsam or ldapsam passdb backend is used, at the time the user account is created the value configured for this parameter is written to the passdb backend and that value will over\-ride the parameter value present in the smb\&.conf file\&. Any error present in the passdb backend account record must be editted using the appropriate tool (pdbedit on the command\-line, or any other locally provided system tool)\&. +.sp .5v +.RE +Note that this option is only useful if Samba is set up as a domain controller\&. +.sp +Disable the use of roaming profiles by setting the value of this parameter to the empty string\&. For example, +\m[blue]\fBlogon path = ""\fR\m[]\&. Take note that even if the default setting in the smb\&.conf file is the empty string, any value specified in the user account settings in the passdb backend will over\-ride the effect of setting this parameter to null\&. Disabling of all roaming profile use requires that the user account settings must also be blank\&. +.sp +An example of use is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +logon path = \e\ePROFILESERVER\ePROFILE\e%U +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIlogon path\fR\fR\fI = \fR\fI\e\e%N\e%U\eprofile\fR\fI \fR +.RE + +logon script (G) +.PP +.RS 4 +This parameter specifies the batch file (\&.bat) or NT command file (\&.cmd) to be downloaded and run on a machine when a user successfully logs in\&. The file must contain the DOS style CR/LF line endings\&. Using a DOS\-style editor to create the file is recommended\&. +.sp +The script must be a relative path to the +\fI[netlogon]\fR +service\&. If the [netlogon] service specifies a +\m[blue]\fBpath\fR\m[] +of +/usr/local/samba/netlogon, and +\m[blue]\fBlogon script = STARTUP\&.BAT\fR\m[], then the file that will be downloaded is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + /usr/local/samba/netlogon/STARTUP\&.BAT +.fi +.if n \{\ +.RE +.\} +.sp +The contents of the batch file are entirely your choice\&. A suggested command would be to add +NET TIME \e\eSERVER /SET /YES, to force every machine to synchronize clocks with the same time server\&. Another use would be to add +NET USE U: \e\eSERVER\eUTILS +for commonly used utilities, or +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBNET USE Q: \e\eSERVER\eISO9001_QA\fR +.fi +.if n \{\ +.RE +.\} +.sp +for example\&. +.sp +Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users write permission on the batch files in a secure environment, as this would allow the batch files to be arbitrarily modified and security to be breached\&. +.sp +This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&. +.sp +This option is only useful if Samba is set up as a logon server in a classic domain controller role\&. If Samba is set up as an Active Directory domain controller, LDAP attribute +scriptPath +is used instead\&. For configurations where +\m[blue]\fBpassdb backend = ldapsam\fR\m[] +is in use, this option only defines a default value in case LDAP attribute +sambaLogonScript +is missing\&. +.sp +Default: +\fI\fIlogon script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIlogon script\fR\fR\fI = \fR\fIscripts\e%U\&.bat\fR\fI \fR +.RE + +log writeable files on exit (G) +.PP +.RS 4 +When the network connection between a CIFS client and Samba dies, Samba has no option but to simply shut down the server side of the network connection\&. If this happens, there is a risk of data corruption because the Windows client did not complete all write operations that the Windows application requested\&. Setting this option to "yes" makes smbd log with a level 0 message a list of all files that have been opened for writing when the network connection died\&. Those are the files that are potentially corrupted\&. It is meant as an aid for the administrator to give him a list of files to do consistency checks on\&. +.sp +Default: +\fI\fIlog writeable files on exit\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +lppause command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to stop printing or spooling a specific print job\&. +.sp +This command should be a program or script which takes a printer name and job number to pause the print job\&. One way of implementing this is by using job priorities, where jobs having a too low priority won\*(Aqt be sent to the printer\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. A +\fI%j\fR +is replaced with the job number (an integer)\&. On HPUX (see +\fIprinting=hpux \fR), if the +\fI\-p%p\fR +option is added to the lpq command, the job will show up with the correct status, i\&.e\&. if the job priority is lower than the set fence priority it will have the PAUSED status, whereas if the priority is equal or higher it will have the SPOOLED or PRINTING status\&. +.sp +Note that it is good practice to include the absolute path in the lppause command as the PATH may not be available to the server\&. +.sp +Currently no default value is given to this string, unless the value of the +\m[blue]\fBprinting\fR\m[] +parameter is +\fBSYSV\fR, in which case the default is : +lp \-i %p\-%j \-H hold +or if the value of the +\fIprinting\fR +parameter is +\fBSOFTQ\fR, then the default is: +qstat \-s \-j%j \-h\&. +.sp +Default: +\fI\fIlppause command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.sp +Example: +\fI\fIlppause command\fR\fR\fI = \fR\fI/usr/bin/lpalt %p\-%j \-p0\fR\fI \fR +.RE + +lpq cache time (G) +.PP +.RS 4 +This controls how long lpq info will be cached for to prevent the +lpq +command being called too often\&. A separate cache is kept for each variation of the +lpq +command used by the system, so if you use different +lpq +commands for different users then they won\*(Aqt share cache information\&. +.sp +The cache files are stored in +/tmp/lpq\&.xxxx +where xxxx is a hash of the +lpq +command in use\&. +.sp +The default is 30 seconds, meaning that the cached results of a previous identical +lpq +command will be used if the cached data is less than 30 seconds old\&. A large value may be advisable if your +lpq +command is very slow\&. +.sp +A value of 0 will disable caching completely\&. +.sp +Default: +\fI\fIlpq cache time\fR\fR\fI = \fR\fI30\fR\fI \fR +.sp +Example: +\fI\fIlpq cache time\fR\fR\fI = \fR\fI10\fR\fI \fR +.RE + +lpq command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to obtain +lpq\-style printer status information\&. +.sp +This command should be a program or script which takes a printer name as its only parameter and outputs printer status information\&. +.sp +Currently nine styles of printer status information are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ\&. This covers most UNIX systems\&. You control which type is expected using the +\fIprinting =\fR +option\&. +.sp +Some clients (notably Windows for Workgroups) may not correctly send the connection number for the printer they are requesting status information about\&. To get around this, the server reports on the first printer service connected to by the client\&. This only happens if the connection number sent is invalid\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&. +.sp +Note that it is good practice to include the absolute path in the +\fIlpq command\fR +as the +\fB$PATH \fR +may not be available to the server\&. When compiled with the CUPS libraries, no +\fIlpq command\fR +is needed because smbd will make a library call to obtain the print queue listing\&. +.sp +Default: +\fI\fIlpq command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.sp +Example: +\fI\fIlpq command\fR\fR\fI = \fR\fI/usr/bin/lpq \-P%p\fR\fI \fR +.RE + +lpresume command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to restart or continue printing or spooling a specific print job\&. +.sp +This command should be a program or script which takes a printer name and job number to resume the print job\&. See also the +\m[blue]\fBlppause command\fR\m[] +parameter\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. A +\fI%j\fR +is replaced with the job number (an integer)\&. +.sp +Note that it is good practice to include the absolute path in the +\fIlpresume command\fR +as the PATH may not be available to the server\&. +.sp +See also the +\m[blue]\fBprinting\fR\m[] +parameter\&. +.sp +Default: Currently no default value is given to this string, unless the value of the +\fIprinting\fR +parameter is +\fBSYSV\fR, in which case the default is: +.sp +lp \-i %p\-%j \-H resume +.sp +or if the value of the +\fIprinting\fR +parameter is +\fBSOFTQ\fR, then the default is: +.sp +qstat \-s \-j%j \-r +.sp +Default: +\fI\fIlpresume command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.sp +Example: +\fI\fIlpresume command\fR\fR\fI = \fR\fI/usr/bin/lpalt %p\-%j \-p2\fR\fI \fR +.RE + +lprm command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to delete a print job\&. +.sp +This command should be a program or script which takes a printer name and job number, and deletes the print job\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. A +\fI%j\fR +is replaced with the job number (an integer)\&. +.sp +Note that it is good practice to include the absolute path in the +\fIlprm command\fR +as the PATH may not be available to the server\&. +.sp +Examples of use are: +.sp +.if n \{\ +.RS 4 +.\} +.nf +lprm command = /usr/bin/lprm \-P%p %j + +or + +lprm command = /usr/bin/cancel %p\-%j +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIlprm command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.RE + +lsa over netlogon (G) +.PP +.RS 4 +Setting this deprecated option will allow the RPC server in the AD DC to answer the LSARPC interface on the +\epipe\enetlogon +IPC pipe\&. +.sp +When enabled, this matches the behaviour of Microsoft\*(Aqs Windows, due to their internal implementation choices\&. +.sp +If it is disabled (the default), the AD DC can offer improved performance, as the netlogon server is decoupled and can run as multiple processes\&. +.sp +Default: +\fI\fIlsa over netlogon\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +machine password timeout (G) +.PP +.RS 4 +If a Samba server is a member of a Windows NT or Active Directory Domain (see the +\m[blue]\fBsecurity = domain\fR\m[] +and +\m[blue]\fBsecurity = ads\fR\m[] +parameters), then periodically a running winbindd process will try and change the MACHINE ACCOUNT PASSWORD stored in the TDB called +secrets\&.tdb\&. This parameter specifies how often this password will be changed, in seconds\&. The default is one week (expressed in seconds), the same as a Windows NT Domain member server\&. +.sp +See also +\fBsmbpasswd\fR(8), and the +\m[blue]\fBsecurity = domain\fR\m[] +and +\m[blue]\fBsecurity = ads\fR\m[] +parameters\&. +.sp +Default: +\fI\fImachine password timeout\fR\fR\fI = \fR\fI604800\fR\fI \fR +.RE + +magic output (S) +.PP +.RS 4 +This parameter specifies the name of a file which will contain output created by a magic script (see the +\m[blue]\fBmagic script\fR\m[] +parameter below)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +If two clients use the same +\fImagic script \fR +in the same directory the output file content is undefined\&. +.sp .5v +.RE +Default: +\fI\fImagic output\fR\fR\fI = \fR\fI # \&.out\fR\fI \fR +.sp +Example: +\fI\fImagic output\fR\fR\fI = \fR\fImyfile\&.txt\fR\fI \fR +.RE + +magic script (S) +.PP +.RS 4 +This parameter specifies the name of a file which, if opened, will be executed by the server when the file is closed\&. This allows a UNIX script to be sent to the Samba host and executed on behalf of the connected user\&. +.sp +Scripts executed in this way will be deleted upon completion assuming that the user has the appropriate level of privilege and the file permissions allow the deletion\&. +.sp +If the script generates output, output will be sent to the file specified by the +\m[blue]\fBmagic output\fR\m[] +parameter (see above)\&. +.sp +Note that some shells are unable to interpret scripts containing CR/LF instead of CR as the end\-of\-line marker\&. Magic scripts must be executable +\fIas is\fR +on the host, which for some hosts and some shells will require filtering at the DOS end\&. +.sp +Magic scripts are +\fIEXPERIMENTAL\fR +and should +\fINOT\fR +be relied upon\&. +.sp +Default: +\fI\fImagic script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fImagic script\fR\fR\fI = \fR\fIuser\&.csh\fR\fI \fR +.RE + +mangled names (S) +.PP +.RS 4 +This controls whether non\-DOS names under UNIX should be mapped to DOS\-compatible names ("mangled") and made visible, or whether non\-DOS names should simply be ignored\&. +.sp +See the section on +\m[blue]\fBname mangling\fR\m[] +for details on how to control the mangling process\&. +.sp +Possible option settings are +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIyes\fR +\- enables name mangling for all not DOS 8\&.3 conforming names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIno\fR +\- disables any name mangling\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIillegal (default)\fR +\- does mangling for names with illegal NTFS characters\&. This is the most sensible setting for modern clients that don\*(Aqt use the shortname anymore\&. +.RE +.sp +.RE +If mangling is used then the mangling method is as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The first (up to) five alphanumeric characters before the rightmost dot of the filename are preserved, forced to upper case, and appear as the first (up to) five characters of the mangled name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A tilde "~" is appended to the first part of the mangled name, followed by a two\-character unique sequence, based on the original root name (i\&.e\&., the original filename minus its final extension)\&. The final extension is included in the hash calculation only if it contains any upper case characters or is longer than three characters\&. +.sp +Note that the character to use may be specified using the +\m[blue]\fBmangling char\fR\m[] +option, if you don\*(Aqt like \*(Aq~\*(Aq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Files whose UNIX name begins with a dot will be presented as DOS hidden files\&. The mangled name will be created as for other filenames, but with the leading dot removed and "___" as its extension regardless of actual original extension (that\*(Aqs three underscores)\&. +.RE +.sp +.RE +The two\-digit hash value consists of upper case alphanumeric characters\&. +.sp +This algorithm can cause name collisions only if files in a directory share the same first five alphanumeric characters\&. The probability of such a clash is 1/1300\&. +.sp +The name mangling (if enabled) allows a file to be copied between UNIX directories from Windows/DOS while retaining the long UNIX filename\&. UNIX files can be renamed to a new extension from Windows/DOS and will retain the same basename\&. Mangled names do not change between sessions\&. +.sp +Default: +\fI\fImangled names\fR\fR\fI = \fR\fIillegal\fR\fI \fR +.sp +Example: +\fI\fImangled names\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +mangle prefix (G) +.PP +.RS 4 +controls the number of prefix characters from the original name used when generating the mangled names\&. A larger value will give a weaker hash and therefore more name collisions\&. The minimum value is 1 and the maximum value is 6\&. +.sp +mangle prefix is effective only when mangling method is hash2\&. +.sp +Default: +\fI\fImangle prefix\fR\fR\fI = \fR\fI1\fR\fI \fR +.sp +Example: +\fI\fImangle prefix\fR\fR\fI = \fR\fI4\fR\fI \fR +.RE + +mangling char (S) +.PP +.RS 4 +This controls what character is used as the +\fImagic\fR +character in +\m[blue]\fBname mangling\fR\m[]\&. The default is a \*(Aq~\*(Aq but this may interfere with some software\&. Use this option to set it to whatever you prefer\&. This is effective only when mangling method is hash\&. +.sp +Default: +\fI\fImangling char\fR\fR\fI = \fR\fI~\fR\fI \fR +.sp +Example: +\fI\fImangling char\fR\fR\fI = \fR\fI^\fR\fI \fR +.RE + +mangling method (G) +.PP +.RS 4 +controls the algorithm used for the generating the mangled names\&. Can take two different values, "hash" and "hash2"\&. "hash" is the algorithm that was used in Samba for many years and was the default in Samba 2\&.2\&.x "hash2" is now the default and is newer and considered a better algorithm (generates less collisions) in the names\&. Many Win32 applications store the mangled names and so changing to algorithms must not be done lightly as these applications may break unless reinstalled\&. +.sp +Default: +\fI\fImangling method\fR\fR\fI = \fR\fIhash2\fR\fI \fR +.sp +Example: +\fI\fImangling method\fR\fR\fI = \fR\fIhash\fR\fI \fR +.RE + +map acl inherit (S) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will attempt to map the \*(Aqinherit\*(Aq and \*(Aqprotected\*(Aq access control entry flags stored in Windows ACLs into an extended attribute called user\&.SAMBA_PAI (POSIX ACL Inheritance)\&. This parameter requires supports for extended attributes on the filesystem and allows the Windows ACL editor to store inheritance information while NT ACLs are mapped best\-effort to the POSIX ACLs\&. +.sp +Default: +\fI\fImap acl inherit\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +map archive (S) +.PP +.RS 4 +This controls whether the DOS archive attribute should be mapped to the UNIX owner execute bit\&. The DOS archive bit is set when a file has been modified since its last backup\&. One motivation for this option is to keep Samba/your PC from making any file it touches from becoming executable under UNIX\&. This can be quite annoying for shared source code, documents, etc\&.\&.\&. +.sp +Note that this parameter will be ignored if the +\m[blue]\fBstore dos attributes\fR\m[] +parameter is set, as the DOS archive attribute will then be stored inside a UNIX extended attribute\&. +.sp +Note that this requires the +\m[blue]\fBcreate mask\fR\m[] +parameter to be set such that owner execute bit is not masked out (i\&.e\&. it must include 100)\&. See the parameter +\m[blue]\fBcreate mask\fR\m[] +for details\&. +.sp +Default: +\fI\fImap archive\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +map hidden (S) +.PP +.RS 4 +This controls whether DOS style hidden files should be mapped to the UNIX world execute bit\&. +.sp +Note that this parameter will be ignored if the +\m[blue]\fBstore dos attributes\fR\m[] +parameter is set, as the DOS hidden attribute will then be stored inside a UNIX extended attribute\&. +.sp +Note that this requires the +\m[blue]\fBcreate mask\fR\m[] +to be set such that the world execute bit is not masked out (i\&.e\&. it must include 001)\&. See the parameter +\m[blue]\fBcreate mask\fR\m[] +for details\&. +.sp +Default: +\fI\fImap hidden\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +map readonly (S) +.PP +.RS 4 +This controls how the DOS read only attribute should be mapped from a UNIX filesystem\&. +.sp +This parameter can take three different values, which tell +\fBsmbd\fR(8) +how to display the read only attribute on files, where either +\m[blue]\fBstore dos attributes\fR\m[] +is set to +\fBNo\fR, or no extended attribute is present\&. If +\m[blue]\fBstore dos attributes\fR\m[] +is set to +\fByes\fR +then this parameter is +\fIignored\fR\&. This is a new parameter introduced in Samba version 3\&.0\&.21\&. +.sp +The three settings are : +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBYes\fR +\- The read only DOS attribute is mapped to the inverse of the user or owner write bit in the unix permission mode set\&. If the owner write bit is not set, the read only attribute is reported as being set on the file\&. If the read only DOS attribute is set, Samba sets the owner, group and others write bits to zero\&. Write bits set in an ACL are ignored by Samba\&. If the read only DOS attribute is unset, Samba simply sets the write bit of the owner to one\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBPermissions\fR +\- The read only DOS attribute is mapped to the effective permissions of the connecting user, as evaluated by +\fBsmbd\fR(8) +by reading the unix permissions and POSIX ACL (if present)\&. If the connecting user does not have permission to modify the file, the read only attribute is reported as being set on the file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBNo\fR +\- The read only DOS attribute is unaffected by permissions, and can only be set by the +\m[blue]\fBstore dos attributes\fR\m[] +method\&. This may be useful for exporting mounted CDs\&. +.RE +.sp +.RE +Note that this parameter will be ignored if the +\m[blue]\fBstore dos attributes\fR\m[] +parameter is set, as the DOS \*(Aqread\-only\*(Aq attribute will then be stored inside a UNIX extended attribute\&. +.sp +The default has changed to no in Samba release 4\&.9\&.0 and above to allow better Windows fileserver compatibility in a default install\&. In addition the default setting of +\m[blue]\fBstore dos attributes\fR\m[] +has been changed to +\fBYes\fR +in Samba release 4\&.9\&.0 and above\&. +.sp +Default: +\fI\fImap readonly\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +map system (S) +.PP +.RS 4 +This controls whether DOS style system files should be mapped to the UNIX group execute bit\&. +.sp +Note that this parameter will be ignored if the +\m[blue]\fBstore dos attributes\fR\m[] +parameter is set, as the DOS system attribute will then be stored inside a UNIX extended attribute\&. +.sp +Note that this requires the +\m[blue]\fBcreate mask\fR\m[] +to be set such that the group execute bit is not masked out (i\&.e\&. it must include 010)\&. See the parameter +\m[blue]\fBcreate mask\fR\m[] +for details\&. +.sp +Default: +\fI\fImap system\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +map to guest (G) +.PP +.RS 4 +This parameter can take four different values, which tell +\fBsmbd\fR(8) +what to do with user login requests that don\*(Aqt match a valid UNIX user in some way\&. +.sp +The four settings are : +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBNever\fR +\- Means user login requests with an invalid password are rejected\&. This is the default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBBad User\fR +\- Means user logins with an invalid password are rejected, unless the username does not exist, in which case it is treated as a guest login and mapped into the +\m[blue]\fBguest account\fR\m[]\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBBad Password\fR +\- Means user logins with an invalid password are treated as a guest login and mapped into the +\m[blue]\fBguest account\fR\m[]\&. Note that this can cause problems as it means that any user incorrectly typing their password will be silently logged on as "guest" \- and will not know the reason they cannot access files they think they should \- there will have been no message given to them that they got their password wrong\&. Helpdesk services will +\fIhate\fR +you if you set the +\fImap to guest\fR +parameter this way :\-)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBBad Uid\fR +\- Is only applicable when Samba is configured in some type of domain mode security (security = {domain|ads}) and means that user logins which are successfully authenticated but which have no valid Unix user account (and smbd is unable to create one) should be mapped to the defined guest account\&. This was the default behavior of Samba 2\&.x releases\&. Note that if a member server is running winbindd, this option should never be required because the nss_winbind library will export the Windows domain users and groups to the underlying OS via the Name Service Switch interface\&. +.RE +.sp +.RE +Note that this parameter is needed to set up "Guest" share services\&. This is because in these modes the name of the resource being requested is +\fInot\fR +sent to the server until after the server has successfully authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for "Guest" shares\&. +.sp +Default: +\fI\fImap to guest\fR\fR\fI = \fR\fINever\fR\fI \fR +.sp +Example: +\fI\fImap to guest\fR\fR\fI = \fR\fIBad User\fR\fI \fR +.RE + +max connections (S) +.PP +.RS 4 +This option allows the number of simultaneous connections to a service to be limited\&. If +\fImax connections\fR +is greater than 0 then connections will be refused if this number of connections to the service are already open\&. A value of zero mean an unlimited number of connections may be made\&. +.sp +Record lock files are used to implement this feature\&. The lock files will be stored in the directory specified by the +\m[blue]\fBlock directory\fR\m[] +option\&. +.sp +Default: +\fI\fImax connections\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fImax connections\fR\fR\fI = \fR\fI10\fR\fI \fR +.RE + +max disk size (G) +.PP +.RS 4 +This option allows you to put an upper limit on the apparent size of disks\&. If you set this option to 100 then all shares will appear to be not larger than 100 MB in size\&. +.sp +Note that this option does not limit the amount of data you can put on the disk\&. In the above case you could still store much more than 100 MB on the disk, but if a client ever asks for the amount of free disk space or the total disk size then the result will be bounded by the amount specified in +\fImax disk size\fR\&. +.sp +This option is primarily useful to work around bugs in some pieces of software that can\*(Aqt handle very large disks, particularly disks over 1GB in size\&. +.sp +A +\fImax disk size\fR +of 0 means no limit\&. +.sp +Default: +\fI\fImax disk size\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fImax disk size\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +max log size (G) +.PP +.RS 4 +This option (an integer in kilobytes) specifies the max size the log file should grow to\&. Samba periodically checks the size and if it is exceeded it will rename the file, adding a +\&.old +extension\&. +.sp +A size of 0 means no limit\&. +.sp +Default: +\fI\fImax log size\fR\fR\fI = \fR\fI5000\fR\fI \fR +.sp +Example: +\fI\fImax log size\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +max mux (G) +.PP +.RS 4 +This option controls the maximum number of outstanding simultaneous SMB operations that Samba tells the client it will allow\&. You should never need to set this parameter\&. +.sp +Default: +\fI\fImax mux\fR\fR\fI = \fR\fI50\fR\fI \fR +.RE + +max open files (G) +.PP +.RS 4 +This parameter limits the maximum number of open files that one +\fBsmbd\fR(8) +file serving process may have open for a client at any one time\&. This parameter can be set very high (16384) as Samba uses only one bit per unopened file\&. Setting this parameter lower than 16384 will cause Samba to complain and set this value back to the minimum of 16384, as Windows 7 depends on this number of open file handles being available\&. +.sp +The limit of the number of open files is usually set by the UNIX per\-process file descriptor limit rather than this parameter so you should never need to touch this parameter\&. +.sp +Default: +\fI\fImax open files\fR\fR\fI = \fR\fI16384\fR\fI \fR +.RE + +max print jobs (S) +.PP +.RS 4 +This parameter limits the maximum number of jobs allowable in a Samba printer queue at any given moment\&. If this number is exceeded, +\fBsmbd\fR(8) +will remote "Out of Space" to the client\&. +.sp +Default: +\fI\fImax print jobs\fR\fR\fI = \fR\fI1000\fR\fI \fR +.sp +Example: +\fI\fImax print jobs\fR\fR\fI = \fR\fI5000\fR\fI \fR +.RE + +max reported print jobs (S) +.PP +.RS 4 +This parameter limits the maximum number of jobs displayed in a port monitor for Samba printer queue at any given moment\&. If this number is exceeded, the excess jobs will not be shown\&. A value of zero means there is no limit on the number of print jobs reported\&. +.sp +Default: +\fI\fImax reported print jobs\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fImax reported print jobs\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +max smbd processes (G) +.PP +.RS 4 +This parameter limits the maximum number of +\fBsmbd\fR(8) +processes concurrently running on a system and is intended as a stopgap to prevent degrading service to clients in the event that the server has insufficient resources to handle more than this number of connections\&. Remember that under normal operating conditions, each user will have an +\fBsmbd\fR(8) +associated with him or her to handle connections to all shares from a given host\&. +.sp +For a Samba ADDC running the standard process model this option limits the number of processes forked to handle requests\&. Currently new processes are only forked for ldap and netlogon requests\&. +.sp +Default: +\fI\fImax smbd processes\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fImax smbd processes\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +max stat cache size (G) +.PP +.RS 4 +This parameter limits the size in memory of any +\fIstat cache\fR +being used to speed up case insensitive name mappings\&. It represents the number of kilobyte (1024) units the stat cache can use\&. A value of zero, meaning unlimited, is not advisable due to increased memory usage\&. You should not need to change this parameter\&. +.sp +Default: +\fI\fImax stat cache size\fR\fR\fI = \fR\fI512\fR\fI \fR +.sp +Example: +\fI\fImax stat cache size\fR\fR\fI = \fR\fI100\fR\fI \fR +.RE + +max ttl (G) +.PP +.RS 4 +This option tells +\fBnmbd\fR(8) +what the default \*(Aqtime to live\*(Aq of NetBIOS names should be (in seconds) when +nmbd +is requesting a name using either a broadcast packet or from a WINS server\&. You should never need to change this parameter\&. The default is 3 days\&. +.sp +Default: +\fI\fImax ttl\fR\fR\fI = \fR\fI259200\fR\fI \fR +.RE + +max wins ttl (G) +.PP +.RS 4 +This option tells +\fBsmbd\fR(8) +when acting as a WINS server (\m[blue]\fBwins support = yes\fR\m[]) what the maximum \*(Aqtime to live\*(Aq of NetBIOS names that +nmbd +will grant will be (in seconds)\&. You should never need to change this parameter\&. The default is 6 days (518400 seconds)\&. +.sp +Default: +\fI\fImax wins ttl\fR\fR\fI = \fR\fI518400\fR\fI \fR +.RE + +max xmit (G) +.PP +.RS 4 +This option controls the maximum packet size that will be negotiated by Samba\*(Aqs +\fBsmbd\fR(8) +for the SMB1 protocol\&. The default is 16644, which matches the behavior of Windows 2000\&. A value below 2048 is likely to cause problems\&. You should never need to change this parameter from its default value\&. +.sp +Default: +\fI\fImax xmit\fR\fR\fI = \fR\fI16644\fR\fI \fR +.sp +Example: +\fI\fImax xmit\fR\fR\fI = \fR\fI8192\fR\fI \fR +.RE + +mdns name (G) +.PP +.RS 4 +This parameter controls the name that multicast DNS support advertises as its\*(Aq hostname\&. +.sp +The default is to use the NETBIOS name which is typically the hostname in all capital letters\&. +.sp +A setting of mdns will defer the hostname configuration to the MDNS library that is used\&. +.sp +Default: +\fI\fImdns name\fR\fR\fI = \fR\fInetbios\fR\fI \fR +.RE + +message command (G) +.PP +.RS 4 +This specifies what command to run when the server receives a WinPopup style message\&. +.sp +This would normally be a command that would deliver the message somehow\&. How this is to be done is up to your imagination\&. +.sp +An example is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +message command = csh \-c \*(Aqxedit %s;rm %s\*(Aq & +.fi +.if n \{\ +.RE +.\} +.sp +This delivers the message using +xedit, then removes it afterwards\&. +\fINOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN IMMEDIATELY\fR\&. That\*(Aqs why I have the \*(Aq&\*(Aq on the end\&. If it doesn\*(Aqt return immediately then your PCs may freeze when sending messages (they should recover after 30 seconds, hopefully)\&. +.sp +All messages are delivered as the global guest user\&. The command takes the standard substitutions, although +\fI %u\fR +won\*(Aqt work (\fI%U\fR +may be better in this case)\&. +.sp +Apart from the standard substitutions, some additional ones apply\&. In particular: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%s\fR += the filename containing the message\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%t\fR += the destination that the message was sent to (probably the server name)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%f\fR += who the message is from\&. +.RE +.sp +.RE +You could make this command send mail, or whatever else takes your fancy\&. Please let us know of any really interesting ideas you have\&. +.sp +Here\*(Aqs a way of sending the messages as mail to root: +.sp +.if n \{\ +.RS 4 +.\} +.nf +message command = /bin/mail \-s \*(Aqmessage from %f on %m\*(Aq root < %s; rm %s +.fi +.if n \{\ +.RE +.\} +.sp +If you don\*(Aqt have a message command then the message won\*(Aqt be delivered and Samba will tell the sender there was an error\&. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered\&. +.sp +If you want to silently delete it then try: +.sp +.if n \{\ +.RS 4 +.\} +.nf +message command = rm %s +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fImessage command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fImessage command\fR\fR\fI = \fR\fIcsh \-c \*(Aqxedit %s; rm %s\*(Aq &\fR\fI \fR +.RE + +min domain uid (G) +.PP +.RS 4 +The integer parameter specifies the minimum uid allowed when mapping a local account to a domain account\&. +.sp +Note that this option interacts with the configured +\fIidmap ranges\fR! +.sp +Default: +\fI\fImin domain uid\fR\fR\fI = \fR\fI1000\fR\fI \fR +.RE + +min print space (S) +.PP +.RS 4 +This sets the minimum amount of free disk space that must be available before a user will be able to spool a print job\&. It is specified in kilobytes\&. The default is 0, which means a user can always spool a print job\&. +.sp +Default: +\fI\fImin print space\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fImin print space\fR\fR\fI = \fR\fI2000\fR\fI \fR +.RE + +min receivefile size (G) +.PP +.RS 4 +This option changes the behavior of +\fBsmbd\fR(8) +when processing SMBwriteX calls\&. Any incoming SMBwriteX call on a non\-signed SMB/CIFS connection greater than this value will not be processed in the normal way but will be passed to any underlying kernel recvfile or splice system call (if there is no such call Samba will emulate in user space)\&. This allows zero\-copy writes directly from network socket buffers into the filesystem buffer cache, if available\&. It may improve performance but user testing is recommended\&. If set to zero Samba processes SMBwriteX calls in the normal way\&. To enable POSIX large write support (SMB/CIFS writes up to 16Mb) this option must be nonzero\&. The maximum value is 128k\&. Values greater than 128k will be silently set to 128k\&. +.sp +Note this option will have NO EFFECT if set on a SMB signed connection\&. +.sp +The default is zero, which disables this option\&. +.sp +Default: +\fI\fImin receivefile size\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +min wins ttl (G) +.PP +.RS 4 +This option tells +\fBnmbd\fR(8) +when acting as a WINS server (\m[blue]\fBwins support = yes\fR\m[]) what the minimum \*(Aqtime to live\*(Aq of NetBIOS names that +nmbd +will grant will be (in seconds)\&. You should never need to change this parameter\&. The default is 6 hours (21600 seconds)\&. +.sp +Default: +\fI\fImin wins ttl\fR\fR\fI = \fR\fI21600\fR\fI \fR +.RE + +mit kdc command (G) +.PP +.RS 4 +This option specifies the path to the MIT kdc binary\&. +.sp +If the KDC is not installed in the default location and wasn\*(Aqt correctly detected during build then you should modify this variable and point it to the correct binary\&. +.sp +Default: +\fI\fImit kdc command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fImit kdc command\fR\fR\fI = \fR\fI/opt/mit/sbin/krb5kdc\fR\fI \fR +.RE + +msdfs proxy (S) +.PP +.RS 4 +This parameter indicates that the share is a stand\-in for another CIFS share whose location is specified by the value of the parameter\&. When clients attempt to connect to this share, they are redirected to one or multiple, comma separated proxied shares using the SMB\-Dfs protocol\&. +.sp +Only Dfs roots can act as proxy shares\&. Take a look at the +\m[blue]\fBmsdfs root\fR\m[] +and +\m[blue]\fBhost msdfs\fR\m[] +options to find out how to set up a Dfs root share\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fImsdfs proxy\fR\fR\fI = \fR\fI\eotherserver\esomeshare,\eotherserver2\esomeshare\fR\fI \fR +.RE + +msdfs root (S) +.PP +.RS 4 +If set to +\fByes\fR, Samba treats the share as a Dfs root and allows clients to browse the distributed file system tree rooted at the share directory\&. Dfs links are specified in the share directory by symbolic links of the form +msdfs:serverA\e\eshareA,serverB\e\eshareB +and so on\&. For more information on setting up a Dfs tree on Samba, refer to the MSDFS chapter in the Samba3\-HOWTO book\&. +.sp +Default: +\fI\fImsdfs root\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +msdfs shuffle referrals (S) +.PP +.RS 4 +If set to +\fByes\fR, Samba will shuffle Dfs referrals for a given Dfs link if multiple are available, allowing for load balancing across clients\&. For more information on setting up a Dfs tree on Samba, refer to the MSDFS chapter in the Samba3\-HOWTO book\&. +.sp +Default: +\fI\fImsdfs shuffle referrals\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +multicast dns register (G) +.PP +.RS 4 +If compiled with proper support for it, Samba will announce itself with multicast DNS services like for example provided by the Avahi daemon\&. +.sp +This parameter allows disabling Samba to register itself\&. +.sp +Default: +\fI\fImulticast dns register\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +name cache timeout (G) +.PP +.RS 4 +Specifies the number of seconds it takes before entries in samba\*(Aqs hostname resolve cache time out\&. If the timeout is set to 0\&. the caching is disabled\&. +.sp +Default: +\fI\fIname cache timeout\fR\fR\fI = \fR\fI660\fR\fI \fR +.sp +Example: +\fI\fIname cache timeout\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +name resolve order (G) +.PP +.RS 4 +This option is used by the programs in the Samba suite to determine what naming services to use and in what order to resolve host names to IP addresses\&. Its main purpose to is to control how netbios name resolution is performed\&. The option takes a space separated string of name resolution options\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR +: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the manpage for lmhosts for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR +: Do a standard host name to IP address resolution, using the system +/etc/hosts +or DNS lookups\&. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file\&. Note that this method is used only if the NetBIOS name type being queried is the 0x20 (server) name type or 0x1c (domain controllers)\&. The latter case is only useful for active directory domains and results in a DNS query for the SRV RR entry matching _ldap\&._tcp\&.domain\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR +: Query a name with the IP address listed in the +\m[blue]\fBWINSSERVER\fR\m[] +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR +: Do a broadcast on each of the known local interfaces listed in the +\m[blue]\fBinterfaces\fR\m[] +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +The example below will cause the local lmhosts file to be examined first, followed by a broadcast attempt, followed by a normal system hostname lookup\&. +.sp +When Samba is functioning in ADS security mode (security = ads) it is advised to use following settings for +\fIname resolve order\fR: +.sp +name resolve order = wins bcast +.sp +DC lookups will still be done via DNS, but fallbacks to netbios names will not inundate your DNS servers with needless queries for DOMAIN<0x1c> lookups\&. +.sp +Default: +\fI\fIname resolve order\fR\fR\fI = \fR\fIlmhosts wins host bcast\fR\fI \fR +.sp +Example: +\fI\fIname resolve order\fR\fR\fI = \fR\fIlmhosts bcast host\fR\fI \fR +.RE + +socket address +.PP +.RS 4 +This parameter is a synonym for +nbt client socket address\&. +.RE + +nbt client socket address (G) +.PP +.RS 4 +This option allows you to control what address Samba will send NBT client packets from, and process replies using, including in nmbd\&. +.sp +Setting this option should never be necessary on usual Samba servers running only one nmbd\&. +.sp +By default Samba will send UDP packets from the OS default address for the destination, and accept replies on 0\&.0\&.0\&.0\&. +.sp +This parameter is deprecated\&. See +\m[blue]\fBbind interfaces only = Yes\fR\m[] +and +\m[blue]\fBinterfaces\fR\m[] +for the previous behaviour of controlling the normal listening sockets\&. +.sp +Default: +\fI\fInbt client socket address\fR\fR\fI = \fR\fI0\&.0\&.0\&.0\fR\fI \fR +.sp +Example: +\fI\fInbt client socket address\fR\fR\fI = \fR\fI192\&.168\&.2\&.20\fR\fI \fR +.RE + +nbtd:wins_prepend1Bto1Cqueries (G) +.PP +.RS 4 +Normally queries for 0x1C names (all logon servers for a domain) will return the first address of the 0x1B names (domain master browser and PDC) as first address in the result list\&. As many client only use the first address in the list by default, all clients will use the same server (the PDC)\&. Windows servers have an option to disable this behavior (since Windows 2000 Service Pack 2)\&. +.sp +Default: +\fI\fInbtd:wins_prepend1Bto1Cqueries\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +nbtd:wins_wins_randomize1Clist (G) +.PP +.RS 4 +Normally queries for 0x1C names will return the addresses in the same order as they\*(Aqre stored in the database, that means first all addresses which have been directly registered at the local wins server and then all addresses registered at other servers\&. Windows servers have an option to change this behavior and randomize the returned addresses\&. Set this parameter to "yes" and Samba will sort the address list depending on the client address and the matching bits of the addresses, the first address is randomized based on depending on the "nbtd:wins_randomize1Clist_mask" parameter\&. +.sp +Default: +\fI\fInbtd:wins_wins_randomize1Clist\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +nbtd:wins_randomize1Clist_mask (G) +.PP +.RS 4 +If the "nbtd:wins_randomize1Clist" parameter is set to "yes", then randomizing of the first returned address is based on the specified netmask\&. If there are addresses which are in the same subnet as the client address, the first returned address is randomly chosen out them\&. Otherwise the first returned address is randomly chosen out of all addresses\&. +.sp +Default: +\fI\fInbtd:wins_randomize1Clist_mask\fR\fR\fI = \fR\fI255\&.255\&.255\&.0\fR\fI \fR +.RE + +nbt port (G) +.PP +.RS 4 +Specifies which port the server should use for NetBIOS over IP name services traffic\&. +.sp +Default: +\fI\fInbt port\fR\fR\fI = \fR\fI137\fR\fI \fR +.RE + +ncalrpc dir (G) +.PP +.RS 4 +This directory will hold a series of named pipes to allow RPC over inter\-process communication\&. +.sp +This will allow Samba and other unix processes to interact over DCE/RPC without using TCP/IP\&. Additionally a sub\-directory \*(Aqnp\*(Aq has restricted permissions, and allows a trusted communication channel between Samba processes +.sp +Default: +\fI\fIncalrpc dir\fR\fR\fI = \fR\fI/var/run/samba4/ncalrpc\fR\fI \fR +.sp +Example: +\fI\fIncalrpc dir\fR\fR\fI = \fR\fI/var/run/samba/ncalrpc\fR\fI \fR +.RE + +netbios aliases (G) +.PP +.RS 4 +This is a list of NetBIOS names that nmbd will advertise as additional names by which the Samba server is known\&. This allows one machine to appear in browse lists under multiple names\&. If a machine is acting as a browse server or logon server none of these names will be advertised as either browse server or logon servers, only the primary name of the machine will be advertised with these capabilities\&. +.sp +Default: +\fI\fInetbios aliases\fR\fR\fI = \fR\fI # empty string (no additional names)\fR\fI \fR +.sp +Example: +\fI\fInetbios aliases\fR\fR\fI = \fR\fITEST TEST1 TEST2\fR\fI \fR +.RE + +netbios name (G) +.PP +.RS 4 +This sets the NetBIOS name by which a Samba server is known\&. By default it is the same as the first component of the host\*(Aqs DNS name\&. If a machine is a browse server or logon server this name (or the first component of the hosts DNS name) will be the name that these services are advertised under\&. +.sp +Note that the maximum length for a NetBIOS name is 15 characters\&. +.sp +There is a bug in Samba that breaks operation of browsing and access to shares if the netbios name is set to the literal name +PIPE\&. To avoid this problem, do not name your Samba server +PIPE\&. +.sp +Default: +\fI\fInetbios name\fR\fR\fI = \fR\fI # machine DNS name\fR\fI \fR +.sp +Example: +\fI\fInetbios name\fR\fR\fI = \fR\fIMYNAME\fR\fI \fR +.RE + +netbios scope (G) +.PP +.RS 4 +This sets the NetBIOS scope that Samba will operate under\&. This should not be set unless every machine on your LAN also sets this value\&. +.sp +Default: +\fI\fInetbios scope\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +neutralize nt4 emulation (G) +.PP +.RS 4 +This option controls whether winbindd sends the NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION flag in order to bypass the NT4 emulation of a domain controller\&. +.sp +Typically you should not need set this\&. It can be useful for upgrades from NT4 to AD domains\&. +.sp +The behavior can be controlled per netbios domain by using \*(Aqneutralize nt4 emulation:NETBIOSDOMAIN = yes\*(Aq as option\&. +.sp +Default: +\fI\fIneutralize nt4 emulation\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +nmbd bind explicit broadcast (G) +.PP +.RS 4 +This option causes +\fBnmbd\fR(8) +to explicitly bind to the broadcast address of the local subnets\&. This is needed to make nmbd work correctly in combination with the +\m[blue]\fBsocket address\fR\m[] +option\&. You should not need to unset this option\&. +.sp +Default: +\fI\fInmbd bind explicit broadcast\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +nsupdate command (G) +.PP +.RS 4 +This option sets the path to the +nsupdate +command which is used for GSS\-TSIG dynamic DNS updates\&. +.sp +Default: +\fI\fInsupdate command\fR\fR\fI = \fR\fI/usr/bin/nsupdate \-g\fR\fI \fR +.RE + +nt acl support (S) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will attempt to map UNIX permissions into Windows NT access control lists\&. The UNIX permissions considered are the traditional UNIX owner and group permissions, as well as POSIX ACLs set on any files or directories\&. This parameter was formally a global parameter in releases prior to 2\&.2\&.2\&. +.sp +Default: +\fI\fInt acl support\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ntlm auth (G) +.PP +.RS 4 +This parameter determines whether or not +\fBsmbd\fR(8) +will attempt to authenticate users using the NTLM encrypted password response for this local passdb (SAM or account database)\&. +.sp +If disabled, both NTLM and LanMan authencication against the local passdb is disabled\&. +.sp +Note that these settings apply only to local users, authentication will still be forwarded to and NTLM authentication accepted against any domain we are joined to, and any trusted domain, even if disabled or if NTLMv2\-only is enforced here\&. To control NTLM authentiation for domain users, this must option must be configured on each DC\&. +.sp +By default with +ntlm auth +set to +\fBntlmv2\-only\fR +only NTLMv2 logins will be permitted\&. All modern clients support NTLMv2 by default, but some older clients will require special configuration to use it\&. +.sp +The primary user of NTLMv1 is MSCHAPv2 for VPNs and 802\&.1x\&. +.sp +The available settings are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBntlmv1\-permitted\fR +(alias +\fByes\fR) \- Allow NTLMv1 and above for all clients\&. +.sp +This is the required setting for to enable the +\fIlanman auth\fR +parameter\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBntlmv2\-only\fR +(alias +\fBno\fR) \- Do not allow NTLMv1 to be used, but permit NTLMv2\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmschapv2\-and\-ntlmv2\-only\fR +\- Only allow NTLMv1 when the client promises that it is providing MSCHAPv2 authentication (such as the +ntlm_auth +tool)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBdisabled\fR +\- Do not accept NTLM (or LanMan) authentication of any level, nor permit NTLM password changes\&. +.RE +.sp +.RE +The default changed from +\fByes\fR +to +\fBno\fR +with Samba 4\&.5\&. The default changed again to +\fBntlmv2\-only\fR +with Samba 4\&.7, however the behaviour is unchanged\&. +.sp +Default: +\fI\fIntlm auth\fR\fR\fI = \fR\fIntlmv2\-only\fR\fI \fR +.RE + +nt pipe support (G) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will allow Windows NT clients to connect to the NT SMB specific +\fBIPC$\fR +pipes\&. This is a developer debugging option and can be left alone\&. +.sp +Default: +\fI\fInt pipe support\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ntp signd socket directory (G) +.PP +.RS 4 +This setting controls the location of the socket that the NTP daemon uses to communicate with Samba for signing packets\&. +.sp +If a non\-default path is specified here, then it is also necessary to make NTP aware of the new path using the +\fBntpsigndsocket\fR +directive in +ntp\&.conf\&. +.sp +Default: +\fI\fIntp signd socket directory\fR\fR\fI = \fR\fI/var/run/samba4/ntp_signd\fR\fI \fR +.RE + +nt status support (G) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will negotiate NT specific status support with Windows NT/2k/XP clients\&. This is a developer debugging option and should be left alone\&. If this option is set to +\fBno\fR +then Samba offers exactly the same DOS error codes that versions prior to Samba 2\&.2\&.3 reported\&. +.sp +You should not need to ever disable this parameter\&. +.sp +Default: +\fI\fInt status support\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +ntvfs handler (S) +.PP +.RS 4 +This specifies the NTVFS handlers for this share\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +unixuid: Sets up user credentials based on POSIX gid/uid\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +cifs: Proxies a remote CIFS FS\&. Mainly useful for testing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +nbench: Filter module that saves data useful to the nbench benchmark suite\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ipc: Allows using SMB for inter process communication\&. Only used for the IPC$ share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +posix: Maps POSIX FS semantics to NT semantics +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +print: Allows printing over SMB\&. This is LANMAN\-style printing, not the be confused with the spoolss DCE/RPC interface used by later versions of Windows\&. +.RE +.sp +.RE +Note that this option is only used when the NTVFS file server is in use\&. It is not used with the (default) s3fs file server\&. +.sp +Default: +\fI\fIntvfs handler\fR\fR\fI = \fR\fIunixuid, default\fR\fI \fR +.RE + +null passwords (G) +.PP +.RS 4 +Allow or disallow client access to accounts that have null passwords\&. +.sp +See also +\fBsmbpasswd\fR(5)\&. +.sp +Default: +\fI\fInull passwords\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +obey pam restrictions (G) +.PP +.RS 4 +When Samba 3\&.0 is configured to enable PAM support (i\&.e\&. \-\-with\-pam), this parameter will control whether or not Samba should obey PAM\*(Aqs account and session management directives\&. The default behavior is to use PAM for clear text authentication only and to ignore any account or session management\&. Note that Samba always ignores PAM for authentication in the case of +\m[blue]\fBencrypt passwords = yes\fR\m[]\&. The reason is that PAM modules cannot support the challenge/response authentication mechanism needed in the presence of SMB password encryption\&. +.sp +Default: +\fI\fIobey pam restrictions\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +old password allowed period (G) +.PP +.RS 4 +Number of minutes to permit an NTLM login after a password change or reset using the old password\&. This allows the user to re\-cache the new password on multiple clients without disrupting a network reconnection in the meantime\&. +.sp +This parameter only applies when +\m[blue]\fBserver role\fR\m[] +is set to Active Directory Domain Controller\&. +.sp +Default: +\fI\fIold password allowed period\fR\fR\fI = \fR\fI60\fR\fI \fR +.RE + +oplock break wait time (G) +.PP +.RS 4 +This is a tuning parameter added due to bugs in both Windows 9x and WinNT\&. If Samba responds to a client too quickly when that client issues an SMB that can cause an oplock break request, then the network client can fail and not respond to the break request\&. This tuning parameter (which is set in milliseconds) is the amount of time Samba will wait before sending an oplock break request to such (broken) clients\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE\&. +.sp .5v +.RE +Default: +\fI\fIoplock break wait time\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +oplocks (S) +.PP +.RS 4 +This boolean option tells +smbd +whether to issue oplocks (opportunistic locks) to file open requests on this share\&. The oplock code can dramatically (approx\&. 30% or more) improve the speed of access to files on Samba servers\&. It allows the clients to aggressively cache files locally and you may want to disable this option for unreliable network environments (it is turned on by default in Windows NT Servers)\&. +.sp +Oplocks may be selectively turned off on certain files with a share\&. See the +\m[blue]\fBveto oplock files\fR\m[] +parameter\&. On some systems oplocks are recognized by the underlying operating system\&. This allows data synchronization between all access to oplocked files, whether it be via Samba or NFS or a local UNIX process\&. See the +\m[blue]\fBkernel oplocks\fR\m[] +parameter for details\&. +.sp +Default: +\fI\fIoplocks\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +os2 driver map (G) +.PP +.RS 4 +The parameter is used to define the absolute path to a file containing a mapping of Windows NT printer driver names to OS/2 printer driver names\&. The format is: +.sp + = \&. +.sp +For example, a valid entry using the HP LaserJet 5 printer driver would appear as +HP LaserJet 5L = LASERJET\&.HP LaserJet 5L\&. +.sp +The need for the file is due to the printer driver namespace problem described in the chapter on Classical Printing in the Samba3\-HOWTO book\&. For more details on OS/2 clients, please refer to chapter on other clients in the Samba3\-HOWTO book\&. +.sp +Default: +\fI\fIos2 driver map\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +os level (G) +.PP +.RS 4 +This integer value controls what level Samba advertises itself as for browse elections\&. The value of this parameter determines whether +\fBnmbd\fR(8) +has a chance of becoming a local master browser for the +\m[blue]\fBworkgroup\fR\m[] +in the local broadcast area\&. +.sp +\fI Note:\fR +By default, Samba will win a local master browsing election over all Microsoft operating systems except a Windows NT 4\&.0/2000 Domain Controller\&. This means that a misconfigured Samba host can effectively isolate a subnet for browsing purposes\&. This parameter is largely auto\-configured in the Samba\-3 release series and it is seldom necessary to manually override the default setting\&. Please refer to the chapter on Network Browsing in the Samba\-3 HOWTO document for further information regarding the use of this parameter\&. +\fINote:\fR +The maximum value for this parameter is 255\&. If you use higher values, counting will start at 0! +.sp +Default: +\fI\fIos level\fR\fR\fI = \fR\fI20\fR\fI \fR +.sp +Example: +\fI\fIos level\fR\fR\fI = \fR\fI65\fR\fI \fR +.RE + +pam password change (G) +.PP +.RS 4 +With the addition of better PAM support in Samba 2\&.2, this parameter, it is possible to use PAM\*(Aqs password change control flag for Samba\&. If enabled, then PAM will be used for password changes when requested by an SMB client instead of the program listed in +\m[blue]\fBpasswd program\fR\m[]\&. It should be possible to enable this without changing your +\m[blue]\fBpasswd chat\fR\m[] +parameter for most setups\&. +.sp +Default: +\fI\fIpam password change\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +panic action (G) +.PP +.RS 4 +This is a Samba developer option that allows a system command to be called when either +\fBsmbd\fR(8) +or +\fBnmbd\fR(8) +crashes\&. This is usually used to draw attention to the fact that a problem occurred\&. +.sp +Default: +\fI\fIpanic action\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpanic action\fR\fR\fI = \fR\fI/bin/sleep 90000\fR\fI \fR +.RE + +passdb backend (G) +.PP +.RS 4 +This option allows the administrator to chose which backend will be used for storing user and possibly group information\&. This allows you to swap between different storage mechanisms without recompile\&. +.sp +The parameter value is divided into two parts, the backend\*(Aqs name, and a \*(Aqlocation\*(Aq string that has meaning only to that particular backed\&. These are separated by a : character\&. +.sp +Available backends can include: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +smbpasswd +\- The old plaintext passdb backend\&. Some Samba features will not work if this passdb backend is used\&. Takes a path to the smbpasswd file as an optional argument\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +tdbsam +\- The TDB based password storage backend\&. Takes a path to the TDB as an optional argument (defaults to passdb\&.tdb in the +\m[blue]\fBprivate dir\fR\m[] +directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ldapsam +\- The LDAP based passdb backend\&. Takes an LDAP URL as an optional argument (defaults to +ldap://localhost) +.sp +LDAP connections should be secured where possible\&. This may be done using either Start\-TLS (see +\m[blue]\fBldap ssl\fR\m[]) or by specifying +\fIldaps://\fR +in the URL argument\&. +.sp +Multiple servers may also be specified in double\-quotes\&. Whether multiple servers are supported or not and the exact syntax depends on the LDAP library you use\&. +.RE +.sp +.RE + + Examples of use are: +.sp +.if n \{\ +.RS 4 +.\} +.nf +passdb backend = tdbsam:/etc/samba/private/passdb\&.tdb + +or multi server LDAP URL with OpenLDAP library: + +passdb backend = ldapsam:"ldap://ldap\-1\&.example\&.com ldap://ldap\-2\&.example\&.com" + +or multi server LDAP URL with Netscape based LDAP library: + +passdb backend = ldapsam:"ldap://ldap\-1\&.example\&.com ldap\-2\&.example\&.com" +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIpassdb backend\fR\fR\fI = \fR\fItdbsam\fR\fI \fR +.RE + +passdb expand explicit (G) +.PP +.RS 4 +This parameter controls whether Samba substitutes %\-macros in the passdb fields if they are explicitly set\&. We used to expand macros here, but this turned out to be a bug because the Windows client can expand a variable %G_osver% in which %G would have been substituted by the user\*(Aqs primary group\&. +.sp +Default: +\fI\fIpassdb expand explicit\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +passwd chat (G) +.PP +.RS 4 +This string controls the +\fI"chat"\fR +conversation that takes places between +\fBsmbd\fR(8) +and the local password changing program to change the user\*(Aqs password\&. The string describes a sequence of response\-receive pairs that +\fBsmbd\fR(8) +uses to determine what to send to the +\m[blue]\fBpasswd program\fR\m[] +and what to expect back\&. If the expected output is not received then the password is not changed\&. +.sp +This chat sequence is often quite site specific, depending on what local methods are used for password control\&. +.sp +Note that this parameter only is used if the +\m[blue]\fBunix password sync\fR\m[] +parameter is set to +\fByes\fR\&. This sequence is then called +\fIAS ROOT\fR +when the SMB password in the smbpasswd file is being changed, without access to the old password cleartext\&. This means that root must be able to reset the user\*(Aqs password without knowing the text of the previous password\&. +.sp +The string can contain the macro +\fI%n\fR +which is substituted for the new password\&. The old password (\fI%o\fR) is only available when +\m[blue]\fBencrypt passwords\fR\m[] +has been disabled\&. The chat sequence can also contain the standard macros \en, \er, \et and \es to give line\-feed, carriage\-return, tab and space\&. The chat sequence string can also contain a \*(Aq*\*(Aq which matches any sequence of characters\&. Double quotes can be used to collect strings with spaces in them into a single string\&. +.sp +If the send string in any part of the chat sequence is a full stop "\&.", then no string is sent\&. Similarly, if the expect string is a full stop then no string is expected\&. +.sp +If the +\m[blue]\fBpam password change\fR\m[] +parameter is set to +\fByes\fR, the chat pairs may be matched in any order, and success is determined by the PAM result, not any particular output\&. The \en macro is ignored for PAM conversions\&. +.sp +Default: +\fI\fIpasswd chat\fR\fR\fI = \fR\fI*new*password* %n\en *new*password* %n\en *changed*\fR\fI \fR +.sp +Example: +\fI\fIpasswd chat\fR\fR\fI = \fR\fI"*Enter NEW password*" %n\en "*Reenter NEW password*" %n\en "*Password changed*"\fR\fI \fR +.RE + +passwd chat debug (G) +.PP +.RS 4 +This boolean specifies if the passwd chat script parameter is run in +\fIdebug\fR +mode\&. In this mode the strings passed to and received from the passwd chat are printed in the +\fBsmbd\fR(8) +log with a +\m[blue]\fBdebug level\fR\m[] +of 100\&. This is a dangerous option as it will allow plaintext passwords to be seen in the +smbd +log\&. It is available to help Samba admins debug their +\fIpasswd chat\fR +scripts when calling the +\fIpasswd program\fR +and should be turned off after this has been done\&. This option has no effect if the +\m[blue]\fBpam password change\fR\m[] +parameter is set\&. This parameter is off by default\&. +.sp +Default: +\fI\fIpasswd chat debug\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +passwd chat timeout (G) +.PP +.RS 4 +This integer specifies the number of seconds smbd will wait for an initial answer from a passwd chat script being run\&. Once the initial answer is received the subsequent answers must be received in one tenth of this time\&. The default it two seconds\&. +.sp +Default: +\fI\fIpasswd chat timeout\fR\fR\fI = \fR\fI2\fR\fI \fR +.RE + +passwd program (G) +.PP +.RS 4 +The name of a program that can be used to set UNIX user passwords\&. Any occurrences of +\fI%u\fR +will be replaced with the user name\&. The user name is checked for existence before calling the password changing program\&. +.sp +Also note that many passwd programs insist in +\fIreasonable \fR +passwords, such as a minimum length, or the inclusion of mixed case chars and digits\&. This can pose a problem as some clients (such as Windows for Workgroups) uppercase the password before sending it\&. +.sp +\fINote\fR +that if the +\fIunix password sync\fR +parameter is set to +\fByes \fR +then this program is called +\fIAS ROOT\fR +before the SMB password in the smbpasswd file is changed\&. If this UNIX password change fails, then +smbd +will fail to change the SMB password also (this is by design)\&. +.sp +If the +\fIunix password sync\fR +parameter is set this parameter +\fIMUST USE ABSOLUTE PATHS\fR +for +\fIALL\fR +programs called, and must be examined for security implications\&. Note that by default +\fIunix password sync\fR +is set to +\fBno\fR\&. +.sp +Default: +\fI\fIpasswd program\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpasswd program\fR\fR\fI = \fR\fI/bin/passwd %u\fR\fI \fR +.RE + +password hash gpg key ids (G) +.PP +.RS 4 +If +samba +is running as an active directory domain controller, it is possible to store the cleartext password of accounts in a PGP/OpenGPG encrypted form\&. +.sp +You can specify one or more recipients by key id or user id\&. Note that 32bit key ids are not allowed, specify at least 64bit\&. +.sp +The value is stored as \*(AqPrimary:SambaGPG\*(Aq in the +supplementalCredentials +attribute\&. +.sp +As password changes can occur on any domain controller, you should configure this on each of them\&. Note that this feature is currently available only on Samba domain controllers\&. +.sp +This option is only available if +samba +was compiled with +gpgme +support\&. +.sp +You may need to export the +GNUPGHOME +environment variable before starting +samba\&. +\fIIt is strongly recommended to only store the public key in this location\&. The private key is not used for encryption and should be only stored where decryption is required\&.\fR +.sp +Being able to restore the cleartext password helps, when they need to be imported into other authentication systems later (see +samba\-tool user getpassword) or you want to keep the passwords in sync with another system, e\&.g\&. an OpenLDAP server (see +samba\-tool user syncpasswords)\&. +.sp +While this option needs to be configured on all domain controllers, the +samba\-tool user syncpasswords +command should run on a single domain controller only (typically the PDC\-emulator)\&. +.sp +Default: +\fI\fIpassword hash gpg key ids\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpassword hash gpg key ids\fR\fR\fI = \fR\fI4952E40301FAB41A\fR\fI \fR +.sp +Example: +\fI\fIpassword hash gpg key ids\fR\fR\fI = \fR\fIselftest@samba\&.example\&.com\fR\fI \fR +.sp +Example: +\fI\fIpassword hash gpg key ids\fR\fR\fI = \fR\fIselftest@samba\&.example\&.com, 4952E40301FAB41A\fR\fI \fR +.RE + +password hash userPassword schemes (G) +.PP +.RS 4 +This parameter determines whether or not +\fBsamba\fR(8) +acting as an Active Directory Domain Controller will attempt to store additional passwords hash types for the user +.sp +The values are stored as \*(AqPrimary:userPassword\*(Aq in the +supplementalCredentials +attribute\&. The value of this option is a hash type\&. +.sp +The currently supported hash types are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBCryptSHA256\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBCryptSHA512\fR +.RE +.sp +.RE +Multiple instances of a hash type may be computed and stored\&. The password hashes are calculated using the +\fBcrypt\fR(3) +call\&. The number of rounds used to compute the hash can be specified by adding \*(Aq:rounds=xxxx\*(Aq to the hash type, i\&.e\&. CryptSHA512:rounds=4500 would calculate an SHA512 hash using 4500 rounds\&. If not specified the Operating System defaults for +\fBcrypt\fR(3) +are used\&. +.sp +As password changes can occur on any domain controller, you should configure this on each of them\&. Note that this feature is currently available only on Samba domain controllers\&. +.sp +Currently the NT Hash of the password is recorded when these hashes are calculated and stored\&. When retrieving the hashes the current value of the NT Hash is checked against the stored NT Hash\&. This detects password changes that have not updated the password hashes\&. In this case +samba\-tool user +will ignore the stored hash values\&. +.sp +Being able to obtain the hashed password helps, when they need to be imported into other authentication systems later (see +samba\-tool user getpassword) or you want to keep the passwords in sync with another system, e\&.g\&. an OpenLDAP server (see +samba\-tool user syncpasswords)\&. +.sp +Related command: +\m[blue]\fBunix password sync\fR\m[] +.sp +Default: +\fI\fIpassword hash userPassword schemes\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpassword hash userPassword schemes\fR\fR\fI = \fR\fICryptSHA256\fR\fI \fR +.sp +Example: +\fI\fIpassword hash userPassword schemes\fR\fR\fI = \fR\fICryptSHA256 CryptSHA512\fR\fI \fR +.sp +Example: +\fI\fIpassword hash userPassword schemes\fR\fR\fI = \fR\fICryptSHA256:rounds=5000 CryptSHA512:rounds=7000\fR\fI \fR +.RE + +password server (G) +.PP +.RS 4 +By specifying the name of a domain controller with this option, and using +security = [ads|domain] +it is possible to get Samba to do all its username/password validation using a specific remote server\&. +.sp +Ideally, this option +\fIshould not\fR +be used, as the default \*(Aq*\*(Aq indicates to Samba to determine the best DC to contact dynamically, just as all other hosts in an AD domain do\&. This allows the domain to be maintained (addition and removal of domain controllers) without modification to the smb\&.conf file\&. The cryptographic protection on the authenticated RPC calls used to verify passwords ensures that this default is safe\&. +.sp +\fIIt is strongly recommended that you use the default of \*(Aq*\*(Aq\fR, however if in your particular environment you have reason to specify a particular DC list, then the list of machines in this option must be a list of names or IP addresses of Domain controllers for the Domain\&. If you use the default of \*(Aq*\*(Aq, or list several hosts in the +\fIpassword server\fR +option then +smbd +will try each in turn till it finds one that responds\&. This is useful in case your primary server goes down\&. +.sp +If the list of servers contains both names/IP\*(Aqs and the \*(Aq*\*(Aq character, the list is treated as a list of preferred domain controllers, but an auto lookup of all remaining DC\*(Aqs will be added to the list as well\&. Samba will not attempt to optimize this list by locating the closest DC\&. +.sp +If parameter is a name, it is looked up using the parameter +\m[blue]\fBname resolve order\fR\m[] +and so may resolved by any method and order described in that parameter\&. +.sp +Default: +\fI\fIpassword server\fR\fR\fI = \fR\fI*\fR\fI \fR +.sp +Example: +\fI\fIpassword server\fR\fR\fI = \fR\fINT\-PDC, NT\-BDC1, NT\-BDC2, *\fR\fI \fR +.sp +Example: +\fI\fIpassword server\fR\fR\fI = \fR\fIwindc\&.mydomain\&.com:389 192\&.168\&.1\&.101 *\fR\fI \fR +.RE + +directory +.PP +.RS 4 +This parameter is a synonym for +path\&. +.RE + +path (S) +.PP +.RS 4 +This parameter specifies a directory to which the user of the service is to be given access\&. In the case of printable services, this is where print data will spool prior to being submitted to the host for printing\&. +.sp +For a printable service offering guest access, the service should be readonly and the path should be world\-writeable and have the sticky bit set\&. This is not mandatory of course, but you probably won\*(Aqt get the results you expect if you do otherwise\&. +.sp +Any occurrences of +\fI%u\fR +in the path will be replaced with the UNIX username that the client is using on this connection\&. Any occurrences of +\fI%m\fR +will be replaced by the NetBIOS name of the machine they are connecting from\&. These replacements are very useful for setting up pseudo home directories for users\&. +.sp +Note that this path will be based on +\m[blue]\fBroot dir\fR\m[] +if one was specified\&. +.sp +Default: +\fI\fIpath\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpath\fR\fR\fI = \fR\fI/home/fred\fR\fI \fR +.RE + +perfcount module (G) +.PP +.RS 4 +This parameter specifies the perfcount backend to be used when monitoring SMB operations\&. Only one perfcount module may be used, and it must implement all of the apis contained in the smb_perfcount_handler structure defined in smb\&.h\&. +.sp +\fINo default\fR +.RE + +pid directory (G) +.PP +.RS 4 +This option specifies the directory where pid files will be placed\&. +.sp +Default: +\fI\fIpid directory\fR\fR\fI = \fR\fI/var/run/samba4\fR\fI \fR +.sp +Example: +\fI\fIpid directory\fR\fR\fI = \fR\fI/var/run/\fR\fI \fR +.RE + +posix locking (S) +.PP +.RS 4 +The +\fBsmbd\fR(8) +daemon maintains an database of file locks obtained by SMB clients\&. The default behavior is to map this internal database to POSIX locks\&. This means that file locks obtained by SMB clients are consistent with those seen by POSIX compliant applications accessing the files via a non\-SMB method (e\&.g\&. NFS or local file access)\&. It is very unlikely that you need to set this parameter to "no", unless you are sharing from an NFS mount, which is not a good idea in the first place\&. +.sp +Default: +\fI\fIposix locking\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +postexec (S) +.PP +.RS 4 +This option specifies a command to be run whenever the service is disconnected\&. It takes the usual substitutions\&. The command may be run as the root on some systems\&. +.sp +An interesting example may be to unmount server resources: +.sp +postexec = /etc/umount /cdrom +.sp +Default: +\fI\fIpostexec\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpostexec\fR\fR\fI = \fR\fIecho \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log\fR\fI \fR +.RE + +exec +.PP +.RS 4 +This parameter is a synonym for +preexec\&. +.RE + +preexec (S) +.PP +.RS 4 +This option specifies a command to be run whenever the service is connected to\&. It takes the usual substitutions\&. +.sp +An interesting example is to send the users a welcome message every time they log in\&. Maybe a message of the day? Here is an example: +.sp +preexec = csh \-c \*(Aqecho \e"Welcome to %S!\e" | /usr/local/samba/bin/smbclient \-M %m \-I %I\*(Aq & +.sp +Of course, this could get annoying after a while :\-) +.sp +See also +\m[blue]\fBpreexec close\fR\m[] +and +\m[blue]\fBpostexec\fR\m[]\&. +.sp +Default: +\fI\fIpreexec\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpreexec\fR\fR\fI = \fR\fIecho \e"%u connected to %S from %m (%I)\e" >> /tmp/log\fR\fI \fR +.RE + +preexec close (S) +.PP +.RS 4 +This boolean option controls whether a non\-zero return code from +\m[blue]\fBpreexec\fR\m[] +should close the service being connected to\&. +.sp +Default: +\fI\fIpreexec close\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +prefered master +.PP +.RS 4 +This parameter is a synonym for +preferred master\&. +.RE + +preferred master (G) +.PP +.RS 4 +This boolean parameter controls if +\fBnmbd\fR(8) +is a preferred master browser for its workgroup\&. +.sp +If this is set to +\fByes\fR, on startup, +nmbd +will force an election, and it will have a slight advantage in winning the election\&. It is recommended that this parameter is used in conjunction with +\m[blue]\fBdomain master = yes\fR\m[], so that +nmbd +can guarantee becoming a domain master\&. +.sp +Use this option with caution, because if there are several hosts (whether Samba servers, Windows 95 or NT) that are preferred master browsers on the same subnet, they will each periodically and continuously attempt to become the local master browser\&. This will result in unnecessary broadcast traffic and reduced browsing capabilities\&. +.sp +Default: +\fI\fIpreferred master\fR\fR\fI = \fR\fIauto\fR\fI \fR +.RE + +prefork backoff increment (G) +.PP +.RS 4 +This option specifies the number of seconds added to the delay before a prefork master or worker process is restarted\&. The restart is initially zero, the prefork backoff increment is added to the delay on each restart up to the value specified by "prefork maximum backoff"\&. +.sp +Additionally the the backoff for an individual service by using "prefork backoff increment: service name" i\&.e\&. "prefork backoff increment:ldap = 2" to set the backoff increment to 2\&. +.sp +If the backoff increment is 2 and the maximum backoff is 5\&. There will be a zero second delay for the first restart\&. A two second delay for the second restart\&. A four second delay for the third and any subsequent restarts +.sp +Default: +\fI\fIprefork backoff increment\fR\fR\fI = \fR\fI10\fR\fI \fR +.RE + +prefork children (G) +.PP +.RS 4 +This option controls the number of worker processes that are started for each service when prefork process model is enabled (see +\fBsamba\fR(8) +\-M) The prefork children are only started for those services that support prefork (currently ldap, kdc and netlogon)\&. For processes that don\*(Aqt support preforking all requests are handled by a single process for that service\&. +.sp +This should be set to a small multiple of the number of CPU\*(Aqs available on the server +.sp +Additionally the number of prefork children can be specified for an individual service by using "prefork children: service name" i\&.e\&. "prefork children:ldap = 8" to set the number of ldap worker processes\&. +.sp +Default: +\fI\fIprefork children\fR\fR\fI = \fR\fI4\fR\fI \fR +.RE + +prefork maximum backoff (G) +.PP +.RS 4 +This option controls the maximum delay before a failed pre\-fork process is restarted\&. +.sp +Default: +\fI\fIprefork maximum backoff\fR\fR\fI = \fR\fI120\fR\fI \fR +.RE + +preload modules (G) +.PP +.RS 4 +This is a list of paths to modules that should be loaded into smbd before a client connects\&. This improves the speed of smbd when reacting to new connections somewhat\&. +.sp +Default: +\fI\fIpreload modules\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIpreload modules\fR\fR\fI = \fR\fI/usr/lib/samba/passdb/mysql\&.so\fR\fI \fR +.RE + +preserve case (S) +.PP +.RS 4 +This controls if new filenames are created with the case that the client passes, or if they are forced to be the +\m[blue]\fBdefault case\fR\m[]\&. +.sp +See the section on +NAME MANGLING +for a fuller discussion\&. +.sp +Default: +\fI\fIpreserve case\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +print ok +.PP +.RS 4 +This parameter is a synonym for +printable\&. +.RE + +printable (S) +.PP +.RS 4 +If this parameter is +\fByes\fR, then clients may open, write to and submit spool files on the directory specified for the service\&. +.sp +Note that a printable service will ALWAYS allow writing to the service path (user privileges permitting) via the spooling of print data\&. The +\m[blue]\fBread only\fR\m[] +parameter controls only non\-printing access to the resource\&. +.sp +Default: +\fI\fIprintable\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +printcap cache time (G) +.PP +.RS 4 +This option specifies the number of seconds before the printing subsystem is again asked for the known printers\&. +.sp +Setting this parameter to 0 disables any rescanning for new or removed printers after the initial startup\&. +.sp +Default: +\fI\fIprintcap cache time\fR\fR\fI = \fR\fI750\fR\fI \fR +.sp +Example: +\fI\fIprintcap cache time\fR\fR\fI = \fR\fI600\fR\fI \fR +.RE + +printcap +.PP +.RS 4 +This parameter is a synonym for +printcap name\&. +.RE + +printcap name (G) +.PP +.RS 4 +This parameter may be used to override the compiled\-in default printcap name used by the server (usually +/etc/printcap)\&. See the discussion of the +[printers] +section above for reasons why you might want to do this\&. +.sp +To use the CUPS printing interface set +printcap name = cups\&. This should be supplemented by an additional setting +\m[blue]\fBprinting = cups\fR\m[] +in the [global] section\&. +printcap name = cups +will use the "dummy" printcap created by CUPS, as specified in your CUPS configuration file\&. +.sp +On System V systems that use +lpstat +to list available printers you can use +printcap name = lpstat +to automatically obtain lists of available printers\&. This is the default for systems that define SYSV at configure time in Samba (this includes most System V based systems)\&. If +\fI printcap name\fR +is set to +lpstat +on these systems then Samba will launch +lpstat \-v +and attempt to parse the output to obtain a printer list\&. +.sp +A minimal printcap file would look something like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +print1|My Printer 1 +print2|My Printer 2 +print3|My Printer 3 +print4|My Printer 4 +print5|My Printer 5 +.fi +.if n \{\ +.RE +.\} +.sp +where the \*(Aq|\*(Aq separates aliases of a printer\&. The fact that the second alias has a space in it gives a hint to Samba that it\*(Aqs a comment\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Under AIX the default printcap name is +/etc/qconfig\&. Samba will assume the file is in AIX +qconfig +format if the string +qconfig +appears in the printcap filename\&. +.sp .5v +.RE +Default: +\fI\fIprintcap name\fR\fR\fI = \fR\fI/etc/printcap\fR\fI \fR +.sp +Example: +\fI\fIprintcap name\fR\fR\fI = \fR\fI/etc/myprintcap\fR\fI \fR +.RE + +print command (S) +.PP +.RS 4 +After a print job has finished spooling to a service, this command will be used via a +system() +call to process the spool file\&. Typically the command specified will submit the spool file to the host\*(Aqs printing subsystem, but there is no requirement that this be the case\&. The server will not remove the spool file, so whatever command you specify should remove the spool file when it has been processed, otherwise you will need to manually remove old spool files\&. +.sp +The print command is simply a text string\&. It will be used verbatim after macro substitutions have been made: +.sp +%s, %f \- the path to the spool file name +.sp +%p \- the appropriate printer name +.sp +%J \- the job name as transmitted by the client\&. +.sp +%c \- The number of printed pages of the spooled job (if known)\&. +.sp +%z \- the size of the spooled print job (in bytes) +.sp +The print command +\fIMUST\fR +contain at least one occurrence of +\fI%s\fR +or +\fI%f \fR +\- the +\fI%p\fR +is optional\&. At the time a job is submitted, if no printer name is supplied the +\fI%p \fR +will be silently removed from the printer command\&. +.sp +If specified in the [global] section, the print command given will be used for any printable service that does not have its own print command specified\&. +.sp +If there is neither a specified print command for a printable service nor a global print command, spool files will be created but not processed and (most importantly) not removed\&. +.sp +Note that printing may fail on some UNIXes from the +\fBnobody\fR +account\&. If this happens then create an alternative guest account that can print and set the +\m[blue]\fBguest account\fR\m[] +in the [global] section\&. +.sp +You can form quite complex print commands by realizing that they are just passed to a shell\&. For example the following will log a print job, print the file, then remove it\&. Note that \*(Aq;\*(Aq is the usual separator for command in shell scripts\&. +.sp +print command = echo Printing %s >> /tmp/print\&.log; lpr \-P %p %s; rm %s +.sp +You may have to vary this command considerably depending on how you normally print files on your system\&. The default for the parameter varies depending on the setting of the +\m[blue]\fBprinting\fR\m[] +parameter\&. +.sp +Default: For +printing = BSD, AIX, QNX, LPRNG or PLP : +.sp +print command = lpr \-r \-P%p %s +.sp +For +printing = SYSV or HPUX : +.sp +print command = lp \-c \-d%p %s; rm %s +.sp +For +printing = SOFTQ : +.sp +print command = lp \-d%p \-s %s; rm %s +.sp +For printing = CUPS : If SAMBA is compiled against libcups, then +\m[blue]\fBprintcap = cups\fR\m[] +uses the CUPS API to submit jobs, etc\&. Otherwise it maps to the System V commands with the \-oraw option for printing, i\&.e\&. it uses +lp \-c \-d%p \-oraw; rm %s\&. With +printing = cups, and if SAMBA is compiled against libcups, any manually set print command will be ignored\&. +.sp +\fINo default\fR +.sp +Example: +\fI\fIprint command\fR\fR\fI = \fR\fI/usr/local/samba/bin/myprintscript %p %s\fR\fI \fR +.RE + +printer +.PP +.RS 4 +This parameter is a synonym for +printer name\&. +.RE + +printer name (S) +.PP +.RS 4 +This parameter specifies the name of the printer to which print jobs spooled through a printable service will be sent\&. +.sp +If specified in the [global] section, the printer name given will be used for any printable service that does not have its own printer name specified\&. +.sp +The default value of the +\m[blue]\fBprinter name\fR\m[] +may be +lp +on many systems\&. +.sp +Default: +\fI\fIprinter name\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIprinter name\fR\fR\fI = \fR\fIlaserwriter\fR\fI \fR +.RE + +printing (S) +.PP +.RS 4 +This parameters controls how printer status information is interpreted on your system\&. It also affects the default values for the +\fIprint command\fR, +\fIlpq command\fR, +\fIlppause command \fR, +\fIlpresume command\fR, and +\fIlprm command\fR +if specified in the [global] section\&. +.sp +Currently nine printing styles are supported\&. They are +\fBBSD\fR, +\fBAIX\fR, +\fBLPRNG\fR, +\fBPLP\fR, +\fBSYSV\fR, +\fBHPUX\fR, +\fBQNX\fR, +\fBSOFTQ\fR, +\fBCUPS\fR +and +\fBIPRINT\fR\&. +.sp +Be aware that CUPS and IPRINT are only available if the CUPS development library was available at the time Samba was compiled or packaged\&. +.sp +To see what the defaults are for the other print commands when using the various options use the +\fBtestparm\fR(1) +program\&. +.sp +This option can be set on a per printer basis\&. Please be aware however, that you must place any of the various printing commands (e\&.g\&. print command, lpq command, etc\&.\&.\&.) after defining the value for the +\fIprinting\fR +option since it will reset the printing commands to default values\&. +.sp +See also the discussion in the +[printers] +section\&. +.sp +See +testparm \-v\&. +for the default value on your system +.sp +Default: +\fI\fIprinting\fR\fR\fI = \fR\fI # Depends on the operating system\fR\fI \fR +.RE + +printjob username (S) +.PP +.RS 4 +This parameter specifies which user information will be passed to the printing system\&. Usually, the username is sent, but in some cases, e\&.g\&. the domain prefix is useful, too\&. +.sp +Default: +\fI\fIprintjob username\fR\fR\fI = \fR\fI%U\fR\fI \fR +.sp +Example: +\fI\fIprintjob username\fR\fR\fI = \fR\fI%D\e%U\fR\fI \fR +.RE + +print notify backchannel (S) +.PP +.RS 4 +Windows print clients can update print queue status by expecting the server to open a backchannel SMB connection to them\&. Due to client firewall settings this can cause considerable timeouts and will often fail, as there is no guarantee the client is even running an SMB server\&. By default, the Samba print server will not try to connect back to clients, and will treat corresponding requests as if the connection back to the client failed\&. +.sp +Default: +\fI\fIprint notify backchannel\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +private directory +.PP +.RS 4 +This parameter is a synonym for +private dir\&. +.RE + +private dir (G) +.PP +.RS 4 +This parameters defines the directory smbd will use for storing such files as +smbpasswd +and +secrets\&.tdb\&. +.sp +Default: +\fI\fIprivate dir\fR\fR\fI = \fR\fI/var/db/samba4/private\fR\fI \fR +.RE + +queuepause command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to pause the printer queue\&. +.sp +This command should be a program or script which takes a printer name as its only parameter and stops the printer queue, such that no longer jobs are submitted to the printer\&. +.sp +This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&. +.sp +Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server\&. +.sp +Default: +\fI\fIqueuepause command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.sp +Example: +\fI\fIqueuepause command\fR\fR\fI = \fR\fIdisable %p\fR\fI \fR +.RE + +queueresume command (S) +.PP +.RS 4 +This parameter specifies the command to be executed on the server host in order to resume the printer queue\&. It is the command to undo the behavior that is caused by the previous parameter (\m[blue]\fBqueuepause command\fR\m[])\&. +.sp +This command should be a program or script which takes a printer name as its only parameter and resumes the printer queue, such that queued jobs are resubmitted to the printer\&. +.sp +This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT\&. +.sp +If a +\fI%p\fR +is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&. +.sp +Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server\&. +.sp +Default: +\fI\fIqueueresume command\fR\fR\fI = \fR\fI # determined by printing parameter\fR\fI \fR +.sp +Example: +\fI\fIqueueresume command\fR\fR\fI = \fR\fIenable %p\fR\fI \fR +.RE + +raw NTLMv2 auth (G) +.PP +.RS 4 +This parameter has been deprecated since Samba 4\&.13 and support for NTLMv2 authentication without NTLMSSP will be removed in a future Samba release\&. +.sp +That is, in the future, the current default of +raw NTLMv2 auth = no +will be the enforced behaviour\&. +.sp +This parameter determines whether or not +\fBsmbd\fR(8) +will allow SMB1 clients without extended security (without SPNEGO) to use NTLMv2 authentication\&. +.sp +If this option, +lanman auth +and +ntlm auth +are all disabled, then only clients with SPNEGO support will be permitted\&. That means NTLMv2 is only supported within NTLMSSP\&. +.sp +Default: +\fI\fIraw NTLMv2 auth\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +read list (S) +.PP +.RS 4 +This is a list of users that are given read\-only access to a service\&. If the connecting user is in this list then they will not be given write access, no matter what the +\m[blue]\fBread only\fR\m[] +option is set to\&. The list can include group names using the syntax described in the +\m[blue]\fBinvalid users\fR\m[] +parameter\&. +.sp +Default: +\fI\fIread list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIread list\fR\fR\fI = \fR\fImary, @students\fR\fI \fR +.RE + +read only (S) +.PP +.RS 4 +An inverted synonym is +\m[blue]\fBwriteable\fR\m[]\&. +.sp +If this parameter is +\fByes\fR, then users of a service may not create or modify files in the service\*(Aqs directory\&. +.sp +Note that a printable service (printable = yes) will +\fIALWAYS\fR +allow writing to the directory (user privileges permitting), but only via spooling operations\&. +.sp +Default: +\fI\fIread only\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +read raw (G) +.PP +.RS 4 +This is ignored if +\m[blue]\fBasync smb echo handler\fR\m[] +is set, because this feature is incompatible with raw read SMB requests +.sp +If enabled, raw reads allow reads of 65535 bytes in one packet\&. This typically provides a major performance benefit for some very, very old clients\&. +.sp +However, some clients either negotiate the allowable block size incorrectly or are incapable of supporting larger block sizes, and for these clients you may need to disable raw reads\&. +.sp +In general this parameter should be viewed as a system tuning tool and left severely alone\&. +.sp +Default: +\fI\fIread raw\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +realm (G) +.PP +.RS 4 +This option specifies the kerberos realm to use\&. The realm is used as the ADS equivalent of the NT4 +domain\&. It is usually set to the DNS name of the kerberos server\&. +.sp +Default: +\fI\fIrealm\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIrealm\fR\fR\fI = \fR\fImysambabox\&.mycompany\&.com\fR\fI \fR +.RE + +registry shares (G) +.PP +.RS 4 +This turns on or off support for share definitions read from registry\&. Shares defined in +\fIsmb\&.conf\fR +take precedence over shares with the same name defined in registry\&. See the section on registry\-based configuration for details\&. +.sp +Note that this parameter defaults to +\fIno\fR, but it is set to +\fIyes\fR +when +\fIconfig backend\fR +is set to +\fIregistry\fR\&. +.sp +Default: +\fI\fIregistry shares\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIregistry shares\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +reject md5 clients (G) +.PP +.RS 4 +This option controls whether the netlogon server (currently only in \*(Aqactive directory domain controller\*(Aq mode), will reject clients which does not support NETLOGON_NEG_SUPPORTS_AES\&. +.sp +You can set this to yes if all domain members support aes\&. This will prevent downgrade attacks\&. +.sp +This option takes precedence to the \*(Aqallow nt4 crypto\*(Aq option\&. +.sp +Default: +\fI\fIreject md5 clients\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +reject md5 servers (G) +.PP +.RS 4 +This option controls whether winbindd requires support for aes support for the netlogon secure channel\&. +.sp +The following flags will be required NETLOGON_NEG_ARCFOUR, NETLOGON_NEG_SUPPORTS_AES, NETLOGON_NEG_PASSWORD_SET2 and NETLOGON_NEG_AUTHENTICATED_RPC\&. +.sp +You can set this to yes if all domain controllers support aes\&. This will prevent downgrade attacks\&. +.sp +The behavior can be controlled per netbios domain by using \*(Aqreject md5 servers:NETBIOSDOMAIN = yes\*(Aq as option\&. +.sp +This option takes precedence to the +\m[blue]\fBrequire strong key\fR\m[] +option\&. +.sp +Default: +\fI\fIreject md5 servers\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +remote announce (G) +.PP +.RS 4 +This option allows you to setup +\fBnmbd\fR(8) +to periodically announce itself to arbitrary IP addresses with an arbitrary workgroup name\&. +.sp +This is useful if you want your Samba server to appear in a remote workgroup for which the normal browse propagation rules don\*(Aqt work\&. The remote workgroup can be anywhere that you can send IP packets to\&. +.sp +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +remote announce = 192\&.168\&.2\&.255/SERVERS 192\&.168\&.4\&.255/STAFF +.fi +.if n \{\ +.RE +.\} +.sp +the above line would cause +nmbd +to announce itself to the two given IP addresses using the given workgroup names\&. If you leave out the workgroup name, then the one given in the +\m[blue]\fBworkgroup\fR\m[] +parameter is used instead\&. +.sp +The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable\&. +.sp +See the chapter on Network Browsing in the Samba\-HOWTO book\&. +.sp +Default: +\fI\fIremote announce\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +remote browse sync (G) +.PP +.RS 4 +This option allows you to setup +\fBnmbd\fR(8) +to periodically request synchronization of browse lists with the master browser of a Samba server that is on a remote segment\&. This option will allow you to gain browse lists for multiple workgroups across routed networks\&. This is done in a manner that does not work with any non\-Samba servers\&. +.sp +This is useful if you want your Samba server and all local clients to appear in a remote workgroup for which the normal browse propagation rules don\*(Aqt work\&. The remote workgroup can be anywhere that you can send IP packets to\&. +.sp +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIremote browse sync = 192\&.168\&.2\&.255 192\&.168\&.4\&.255\fR +.fi +.if n \{\ +.RE +.\} +.sp +the above line would cause +nmbd +to request the master browser on the specified subnets or addresses to synchronize their browse lists with the local server\&. +.sp +The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable\&. If a machine IP address is given Samba makes NO attempt to validate that the remote machine is available, is listening, nor that it is in fact the browse master on its segment\&. +.sp +The +\m[blue]\fBremote browse sync\fR\m[] +may be used on networks where there is no WINS server, and may be used on disjoint networks where each network has its own WINS server\&. +.sp +Default: +\fI\fIremote browse sync\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +rename user script (G) +.PP +.RS 4 +This is the full pathname to a script that will be run as root by +\fBsmbd\fR(8) +under special circumstances described below\&. +.sp +When a user with admin authority or SeAddUserPrivilege rights renames a user (e\&.g\&.: from the NT4 User Manager for Domains), this script will be run to rename the POSIX user\&. Two variables, +%uold +and +%unew, will be substituted with the old and new usernames, respectively\&. The script should return 0 upon successful completion, and nonzero otherwise\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +The script has all responsibility to rename all the necessary data that is accessible in this posix method\&. This can mean different requirements for different backends\&. The tdbsam and smbpasswd backends will take care of the contents of their respective files, so the script is responsible only for changing the POSIX username, and other data that may required for your circumstances, such as home directory\&. Please also consider whether or not you need to rename the actual home directories themselves\&. The ldapsam backend will not make any changes, because of the potential issues with renaming the LDAP naming attribute\&. In this case the script is responsible for changing the attribute that samba uses (uid) for locating users, as well as any data that needs to change for other applications using the same directory\&. +.sp .5v +.RE +Default: +\fI\fIrename user script\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +require strong key (G) +.PP +.RS 4 +This option controls whether winbindd requires support for md5 strong key support for the netlogon secure channel\&. +.sp +The following flags will be required NETLOGON_NEG_STRONG_KEYS, NETLOGON_NEG_ARCFOUR and NETLOGON_NEG_AUTHENTICATED_RPC\&. +.sp +You can set this to no if some domain controllers only support des\&. This might allows weak crypto to be negotiated, may via downgrade attacks\&. +.sp +The behavior can be controlled per netbios domain by using \*(Aqrequire strong key:NETBIOSDOMAIN = no\*(Aq as option\&. +.sp +Note for active directory domain this option is hardcoded to \*(Aqyes\*(Aq +.sp +This option yields precedence to the +\m[blue]\fBreject md5 servers\fR\m[] +option\&. +.sp +This option takes precedence to the +\m[blue]\fBclient schannel\fR\m[] +option\&. +.sp +Default: +\fI\fIrequire strong key\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +reset on zero vc (G) +.PP +.RS 4 +This boolean option controls whether an incoming SMB1 session setup should kill other connections coming from the same IP\&. This matches the default Windows 2003 behaviour\&. Setting this parameter to yes becomes necessary when you have a flaky network and windows decides to reconnect while the old connection still has files with share modes open\&. These files become inaccessible over the new connection\&. The client sends a zero VC on the new connection, and Windows 2003 kills all other connections coming from the same IP\&. This way the locked files are accessible again\&. Please be aware that enabling this option will kill connections behind a masquerading router, and will not trigger for clients that only use SMB2 or SMB3\&. +.sp +Default: +\fI\fIreset on zero vc\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +restrict anonymous (G) +.PP +.RS 4 +The setting of this parameter determines whether SAMR and LSA DCERPC services can be accessed anonymously\&. This corresponds to the following Windows Server registry options: +.sp +.if n \{\ +.RS 4 +.\} +.nf + HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eControl\eLsa\eRestrictAnonymous + +.fi +.if n \{\ +.RE +.\} +.sp +The option also affects the browse option which is required by legacy clients which rely on Netbios browsing\&. While modern Windows version should be fine with restricting the access there could still be applications relying on anonymous access\&. +.sp +Setting +\m[blue]\fBrestrict anonymous = 1\fR\m[] +will disable anonymous SAMR access\&. +.sp +Setting +\m[blue]\fBrestrict anonymous = 2\fR\m[] +will, in addition to restricting SAMR access, disallow anonymous connections to the IPC$ share in general\&. Setting +\m[blue]\fBguest ok = yes\fR\m[] +on any share will remove the security advantage\&. +.sp +Default: +\fI\fIrestrict anonymous\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +root +.PP +.RS 4 +This parameter is a synonym for +root directory\&. +.RE + +root dir +.PP +.RS 4 +This parameter is a synonym for +root directory\&. +.RE + +root directory (G) +.PP +.RS 4 +The server will +chroot() +(i\&.e\&. Change its root directory) to this directory on startup\&. This is not strictly necessary for secure operation\&. Even without it the server will deny access to files not in one of the service entries\&. It may also check for, and deny access to, soft links to other parts of the filesystem, or attempts to use "\&.\&." in file names to access other directories (depending on the setting of the +\m[blue]\fBwide smbconfoptions\fR\m[] +parameter)\&. +.sp +Adding a +\fIroot directory\fR +entry other than "/" adds an extra level of security, but at a price\&. It absolutely ensures that no access is given to files not in the sub\-tree specified in the +\fIroot directory\fR +option, +\fIincluding\fR +some files needed for complete operation of the server\&. To maintain full operability of the server you will need to mirror some system files into the +\fIroot directory\fR +tree\&. In particular you will need to mirror +/etc/passwd +(or a subset of it), and any binaries or configuration files needed for printing (if required)\&. The set of files that must be mirrored is operating system dependent\&. +.sp +Default: +\fI\fIroot directory\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIroot directory\fR\fR\fI = \fR\fI/homes/smb\fR\fI \fR +.RE + +root postexec (S) +.PP +.RS 4 +This is the same as the +\fIpostexec\fR +parameter except that the command is run as root\&. This is useful for unmounting filesystems (such as CDROMs) after a connection is closed\&. +.sp +Default: +\fI\fIroot postexec\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +root preexec (S) +.PP +.RS 4 +This is the same as the +\fIpreexec\fR +parameter except that the command is run as root\&. This is useful for mounting filesystems (such as CDROMs) when a connection is opened\&. +.sp +Default: +\fI\fIroot preexec\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +root preexec close (S) +.PP +.RS 4 +This is the same as the +\fIpreexec close \fR +parameter except that the command is run as root\&. +.sp +Default: +\fI\fIroot preexec close\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +rpc big endian (G) +.PP +.RS 4 +Setting this option will force the RPC client and server to transfer data in big endian\&. +.sp +If it is disabled, data will be transferred in little endian\&. +.sp +The behaviour is independent of the endianness of the host machine\&. +.sp +Default: +\fI\fIrpc big endian\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +rpc server dynamic port range (G) +.PP +.RS 4 +This parameter tells the RPC server which port range it is allowed to use to create a listening socket for LSA, SAM, Netlogon and others without wellknown tcp ports\&. The first value is the lowest number of the port range and the second the highest\&. +.sp +This applies to RPC servers in all server roles\&. +.sp +Default: +\fI\fIrpc server dynamic port range\fR\fR\fI = \fR\fI49152\-65535\fR\fI \fR +.RE + +rpc server port (G) +.PP +.RS 4 +Specifies which port the server should listen on for DCE/RPC over TCP/IP traffic\&. +.sp +This controls the default port for all protocols, except for NETLOGON\&. +.sp +If unset, the first available port from +\m[blue]\fBrpc server dynamic port range\fR\m[] +is used, e\&.g\&. 49152\&. +.sp +The NETLOGON server will use the next available port, e\&.g\&. 49153\&. To change this port use (eg) rpc server port:netlogon = 4000\&. +.sp +Furthermore, all RPC servers can have the port they use specified independenty, with (for example) rpc server port:drsuapi = 5000\&. +.sp +This option applies currently only when +\fBsamba\fR(8) +runs as an active directory domain controller\&. +.sp +The default value 0 causes Samba to select the first available port from +\m[blue]\fBrpc server dynamic port range\fR\m[]\&. +.sp +Default: +\fI\fIrpc server port\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +rpc start on demand helpers (G) +.PP +.RS 4 +This global parameter determines if +samba\-dcerpcd +should be started on demand to service named pipe (np) DCE\-RPC requests from +smbd +or +winbindd\&. This is the normal case where no startup scripts have been modified to start +samba\-dcerpcd +as a daemon\&. +.sp +If +samba\-dcerpcd +is started as a daemon or via a system service manager such as systemd, this parameter MUST be set to "no", otherwise +samba\-dcerpcd +will fail to start\&. +.sp +Default: +\fI\fIrpc start on demand helpers\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +samba kcc command (G) +.PP +.RS 4 +This option specifies the path to the Samba KCC command\&. This script is used for replication topology replication\&. +.sp +It should not be necessary to modify this option except for testing purposes or if the +samba_kcc +was installed in a non\-default location\&. +.sp +Default: +\fI\fIsamba kcc command\fR\fR\fI = \fR\fI/wrkdirs/usr/ports/net/samba416/work/samba\-4\&.16\&.4/source4/scripting/bin/samba_kcc\fR\fI \fR +.sp +Example: +\fI\fIsamba kcc command\fR\fR\fI = \fR\fI/usr/local/bin/kcc\fR\fI \fR +.RE + +security (G) +.PP +.RS 4 +This option affects how clients respond to Samba and is one of the most important settings in the +smb\&.conf +file\&. +.sp +The default is +security = user, as this is the most common setting, used for a standalone file server or a DC\&. +.sp +The alternatives are +security = ads +or +security = domain, which support joining Samba to a Windows domain +.sp +You should use +security = user +and +\m[blue]\fBmap to guest\fR\m[] +if you want to mainly setup shares without a password (guest shares)\&. This is commonly used for a shared printer server\&. +.sp +The different settings will now be explained\&. +.sp +\fISECURITY = AUTO\fR +.sp +This is the default security setting in Samba, and causes Samba to consult the +\m[blue]\fBserver role\fR\m[] +parameter (if set) to determine the security mode\&. +.sp +\fISECURITY = USER\fR +.sp +If +\m[blue]\fBserver role\fR\m[] +is not specified, this is the default security setting in Samba\&. With user\-level security a client must first "log\-on" with a valid username and password (which can be mapped using the +\m[blue]\fBusername map\fR\m[] +parameter)\&. Encrypted passwords (see the +\m[blue]\fBencrypted passwords\fR\m[] +parameter) can also be used in this security mode\&. Parameters such as +\m[blue]\fBuser\fR\m[] +and +\m[blue]\fBguest only\fR\m[] +if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated\&. +.sp +\fINote\fR +that the name of the resource being requested is +\fInot\fR +sent to the server until after the server has successfully authenticated the client\&. This is why guest shares don\*(Aqt work in user level security without allowing the server to automatically map unknown users into the +\m[blue]\fBguest account\fR\m[]\&. See the +\m[blue]\fBmap to guest\fR\m[] +parameter for details on doing this\&. +.sp +\fISECURITY = DOMAIN\fR +.sp +This mode will only work correctly if +\fBnet\fR(8) +has been used to add this machine into a Windows NT Domain\&. It expects the +\m[blue]\fBencrypted passwords\fR\m[] +parameter to be set to +\fByes\fR\&. In this mode Samba will try to validate the username/password by passing it to a Windows NT Primary or Backup Domain Controller, in exactly the same way that a Windows NT Server would do\&. +.sp +\fINote\fR +that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to\&. +.sp +\fINote\fR +that from the client\*(Aqs point of view +security = domain +is the same as +security = user\&. It only affects how the server deals with the authentication, it does not in any way affect what the client sees\&. +.sp +\fINote\fR +that the name of the resource being requested is +\fInot\fR +sent to the server until after the server has successfully authenticated the client\&. This is why guest shares don\*(Aqt work in user level security without allowing the server to automatically map unknown users into the +\m[blue]\fBguest account\fR\m[]\&. See the +\m[blue]\fBmap to guest\fR\m[] +parameter for details on doing this\&. +.sp +See also the +\m[blue]\fBpassword server\fR\m[] +parameter and the +\m[blue]\fBencrypted passwords\fR\m[] +parameter\&. +.sp +\fISECURITY = ADS\fR +.sp +In this mode, Samba will act as a domain member in an ADS realm\&. To operate in this mode, the machine running Samba will need to have Kerberos installed and configured and Samba will need to be joined to the ADS realm using the net utility\&. +.sp +Note that this mode does NOT make Samba operate as a Active Directory Domain Controller\&. +.sp +Note that this forces +\m[blue]\fBrequire strong key = yes\fR\m[] +and +\m[blue]\fBclient schannel = yes\fR\m[] +for the primary domain\&. +.sp +Read the chapter about Domain Membership in the HOWTO for details\&. +.sp +Default: +\fI\fIsecurity\fR\fR\fI = \fR\fIAUTO\fR\fI \fR +.sp +Example: +\fI\fIsecurity\fR\fR\fI = \fR\fIDOMAIN\fR\fI \fR +.RE + +security mask (S) +.PP +.RS 4 +This parameter has been removed for Samba 4\&.0\&.0\&. +.sp +\fINo default\fR +.RE + +max protocol +.PP +.RS 4 +This parameter is a synonym for +server max protocol\&. +.RE + +protocol +.PP +.RS 4 +This parameter is a synonym for +server max protocol\&. +.RE + +server max protocol (G) +.PP +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the server\&. +.sp +Possible values are : +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBLANMAN1\fR: First +\fImodern\fR +version of the protocol\&. Long filename support\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBLANMAN2\fR: Updates to Lanman1 protocol\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBNT1\fR: Current up to date version of the protocol\&. Used by Windows NT\&. Known as CIFS\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2\fR: Re\-implementation of the SMB protocol\&. Used by Windows Vista and later versions of Windows\&. SMB2 has sub protocols available\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2_02\fR: The earliest SMB2 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB2_10\fR: Windows 7 SMB2 version\&. +.RE +.sp +.RE +By default SMB2 selects the SMB2_10 variant\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3\fR: The same as SMB2\&. Used by Windows 8\&. SMB3 has sub protocols available\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_00\fR: Windows 8 SMB3 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_02\fR: Windows 8\&.1 SMB3 version\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBSMB3_11\fR: Windows 10 SMB3 version\&. +.RE +.sp +.RE +By default SMB3 selects the SMB3_11 variant\&. +.RE +.sp +.RE +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol\&. +.sp +Default: +\fI\fIserver max protocol\fR\fR\fI = \fR\fISMB3\fR\fI \fR +.sp +Example: +\fI\fIserver max protocol\fR\fR\fI = \fR\fILANMAN1\fR\fI \fR +.RE + +min protocol +.PP +.RS 4 +This parameter is a synonym for +server min protocol\&. +.RE + +server min protocol (G) +.PP +.RS 4 +This setting controls the minimum protocol version that the server will allow the client to use\&. +.sp +Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol unless you have legacy clients which are SMB1 capable only\&. +.sp +See +Related command: \m[blue]\fBserver max protocol\fR\m[] +for a full list of available protocols\&. +.sp +Default: +\fI\fIserver min protocol\fR\fR\fI = \fR\fISMB2_02\fR\fI \fR +.sp +Example: +\fI\fIserver min protocol\fR\fR\fI = \fR\fINT1\fR\fI \fR +.RE + +server multi channel support (G) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will support SMB3 multi\-channel\&. +.sp +This parameter was added with version 4\&.4\&. +.sp +Note that this feature was still considered experimental up to 4\&.14\&. +.sp +Due to dependencies to kernel APIs of Linux or FreeBSD, it\*(Aqs only possible to use this feature on Linux and FreeBSD for now\&. For testing this restriction can be overwritten by specifying +\fBforce:server multi channel support=yes\fR +in addition\&. +.sp +This option is enabled by default starting with to 4\&.15 (on Linux and FreeBSD)\&. +.sp +Default: +\fI\fIserver multi channel support\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +server role (G) +.PP +.RS 4 +This option determines the basic operating mode of a Samba server and is one of the most important settings in the +smb\&.conf +file\&. +.sp +The default is +server role = auto, as causes Samba to operate according to the +\m[blue]\fBsecurity\fR\m[] +setting, or if not specified as a simple file server that is not connected to any domain\&. +.sp +The alternatives are +server role = standalone +or +server role = member server, which support joining Samba to a Windows domain, along with +server role = domain controller, which run Samba as a Windows domain controller\&. +.sp +You should use +server role = standalone +and +\m[blue]\fBmap to guest\fR\m[] +if you want to mainly setup shares without a password (guest shares)\&. This is commonly used for a shared printer server\&. +.sp +\fISERVER ROLE = AUTO\fR +.sp +This is the default server role in Samba, and causes Samba to consult the +\m[blue]\fBsecurity\fR\m[] +parameter (if set) to determine the server role, giving compatible behaviours to previous Samba versions\&. +.sp +\fISERVER ROLE = STANDALONE\fR +.sp +If +\m[blue]\fBsecurity\fR\m[] +is also not specified, this is the default security setting in Samba\&. In standalone operation, a client must first "log\-on" with a valid username and password (which can be mapped using the +\m[blue]\fBusername map\fR\m[] +parameter) stored on this machine\&. Encrypted passwords (see the +\m[blue]\fBencrypted passwords\fR\m[] +parameter) are by default used in this security mode\&. Parameters such as +\m[blue]\fBuser\fR\m[] +and +\m[blue]\fBguest only\fR\m[] +if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated\&. +.sp +\fISERVER ROLE = MEMBER SERVER\fR +.sp +This mode will only work correctly if +\fBnet\fR(8) +has been used to add this machine into a Windows Domain\&. It expects the +\m[blue]\fBencrypted passwords\fR\m[] +parameter to be set to +\fByes\fR\&. In this mode Samba will try to validate the username/password by passing it to a Windows or Samba Domain Controller, in exactly the same way that a Windows Server would do\&. +.sp +\fINote\fR +that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to\&. Winbind can provide this\&. +.sp +\fISERVER ROLE = CLASSIC PRIMARY DOMAIN CONTROLLER\fR +.sp +This mode of operation runs a classic Samba primary domain controller, providing domain logon services to Windows and Samba clients of an NT4\-like domain\&. Clients must be joined to the domain to create a secure, trusted path across the network\&. There must be only one PDC per NetBIOS scope (typcially a broadcast network or clients served by a single WINS server)\&. +.sp +\fISERVER ROLE = CLASSIC BACKUP DOMAIN CONTROLLER\fR +.sp +This mode of operation runs a classic Samba backup domain controller, providing domain logon services to Windows and Samba clients of an NT4\-like domain\&. As a BDC, this allows multiple Samba servers to provide redundant logon services to a single NetBIOS scope\&. +.sp +\fISERVER ROLE = ACTIVE DIRECTORY DOMAIN CONTROLLER\fR +.sp +This mode of operation runs Samba as an active directory domain controller, providing domain logon services to Windows and Samba clients of the domain\&. This role requires special configuration, see the +Samba4 HOWTO +.sp +\fISERVER ROLE = IPA DOMAIN CONTROLLER\fR +.sp +This mode of operation runs Samba in a hybrid mode for IPA domain controller, providing forest trust to Active Directory\&. This role requires special configuration performed by IPA installers and should not be used manually by any administrator\&. +.sp +Default: +\fI\fIserver role\fR\fR\fI = \fR\fIAUTO\fR\fI \fR +.sp +Example: +\fI\fIserver role\fR\fR\fI = \fR\fIACTIVE DIRECTORY DOMAIN CONTROLLER\fR\fI \fR +.RE + +server schannel (G) +.PP +.RS 4 +This option is deprecated and will be removed in future, as it is a security problem if not set to "yes" (which will be the hardcoded behavior in future)\&. +.sp +Samba will complain in the log files at log level 0, about the security problem if the option is not set to "yes"\&. +.sp +See CVE\-2020\-1472(ZeroLogon) https://bugzilla\&.samba\&.org/show_bug\&.cgi?id=14497 +.sp +If you still have legacy domain members use the +\m[blue]\fBserver require schannel:COMPUTERACCOUNT\fR\m[] +option\&. +.sp +This option yields precedence to the +\m[blue]\fBserver require schannel:COMPUTERACCOUNT\fR\m[] +option\&. +.sp +Default: +\fI\fIserver schannel\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +server require schannel:COMPUTERACCOUNT (G) +.PP +.RS 4 +If you still have legacy domain members, which required "server schannel = auto" before, it is possible to specify explicit expection per computer account by using \*(Aqserver require schannel:COMPUTERACCOUNT = no\*(Aq as option\&. Note that COMPUTERACCOUNT has to be the sAMAccountName value of the computer account (including the trailing \*(Aq$\*(Aq sign)\&. +.sp +Samba will complain in the log files at log level 0, about the security problem if the option is not set to "no", but the related computer is actually using the netlogon secure channel (schannel) feature\&. +.sp +Samba will warn in the log files at log level 5, if a setting is still needed for the specified computer account\&. +.sp +See CVE\-2020\-1472(ZeroLogon) https://bugzilla\&.samba\&.org/show_bug\&.cgi?id=14497 +.sp +This option takes precedence to the +\m[blue]\fBserver schannel\fR\m[] +option\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + server require schannel:LEGACYCOMPUTER1$ = no + server require schannel:NASBOX$ = no + server require schannel:LEGACYCOMPUTER2$ = no + +.fi +.if n \{\ +.RE +.\} +.sp +\fINo default\fR +.RE + +server services (G) +.PP +.RS 4 +This option contains the services that the Samba daemon will run\&. +.sp +An entry in the +smb\&.conf +file can either override the previous value completely or entries can be removed from or added to it by prefixing them with +\fB+\fR +or +\fB\-\fR\&. +.sp +Default: +\fI\fIserver services\fR\fR\fI = \fR\fIs3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dnsupdate, dns\fR\fI \fR +.sp +Example: +\fI\fIserver services\fR\fR\fI = \fR\fI\-s3fs, +smb\fR\fI \fR +.RE + +server signing (G) +.PP +.RS 4 +This controls whether the client is allowed or required to use SMB1 and SMB2 signing\&. Possible values are +\fIdefault\fR, +\fIauto\fR, +\fImandatory\fR +and +\fIdisabled\fR\&. +.sp +By default, and when smb signing is set to +\fIdefault\fR, smb signing is required when +\m[blue]\fBserver role\fR\m[] +is +\fIactive directory domain controller\fR +and disabled otherwise\&. +.sp +When set to auto, SMB1 signing is offered, but not enforced\&. When set to mandatory, SMB1 signing is required and if set to disabled, SMB signing is not offered either\&. +.sp +For the SMB2 protocol, by design, signing cannot be disabled\&. In the case where SMB2 is negotiated, if this parameter is set to +\fIdisabled\fR, it will be treated as +\fIauto\fR\&. Setting it to +\fImandatory\fR +will still require SMB2 clients to use signing\&. +.sp +Default: +\fI\fIserver signing\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +server smb encrypt (S) +.PP +.RS 4 +This parameter controls whether a remote client is allowed or required to use SMB encryption\&. It has different effects depending on whether the connection uses SMB1 or SMB2 and newer: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the connection uses SMB1, then this option controls the use of a Samba\-specific extension to the SMB protocol introduced in Samba 3\&.2 that makes use of the Unix extensions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the connection uses SMB2 or newer, then this option controls the use of the SMB\-level encryption that is supported in SMB version 3\&.0 and above and available in Windows 8 and newer\&. +.RE +.sp +.RE +This parameter can be set globally and on a per\-share bases\&. Possible values are +\fIoff\fR, +\fIif_required\fR, +\fIdesired\fR, and +\fIrequired\fR\&. A special value is +\fIdefault\fR +which is the implicit default setting of +\fIif_required\fR\&. +.PP +\fIEffects for SMB1\fR +.RS 4 +The Samba\-specific encryption of SMB1 connections is an extension to the SMB protocol negotiated as part of the UNIX extensions\&. SMB encryption uses the GSSAPI (SSPI on Windows) ability to encrypt and sign every request/response in a SMB protocol stream\&. When enabled it provides a secure method of SMB/CIFS communication, similar to an ssh protected session, but using SMB/CIFS authentication to negotiate encryption and signing keys\&. Currently this is only supported smbclient of by Samba 3\&.2 and newer, and hopefully soon Linux CIFSFS and MacOS/X clients\&. Windows clients do not support this feature\&. +.sp +This may be set on a per\-share basis, but clients may chose to encrypt the entire session, not just traffic to a specific share\&. If this is set to mandatory then all traffic to a share +\fImust\fR +be encrypted once the connection has been made to the share\&. The server would return "access denied" to all non\-encrypted requests on such a share\&. Selecting encrypted traffic reduces throughput as smaller packet sizes must be used (no huge UNIX style read/writes allowed) as well as the overhead of encrypting and signing all the data\&. +.sp +If SMB encryption is selected, Windows style SMB signing (see the +\m[blue]\fBserver signing\fR\m[] +option) is no longer necessary, as the GSSAPI flags use select both signing and sealing of the data\&. +.sp +When set to auto or default, SMB encryption is offered, but not enforced\&. When set to mandatory, SMB encryption is required and if set to disabled, SMB encryption can not be negotiated\&. +.RE +.PP +\fIEffects for SMB2 and newer\fR +.RS 4 +Native SMB transport encryption is available in SMB version 3\&.0 or newer\&. It is only offered by Samba if +\fIserver max protocol\fR +is set to +\fISMB3\fR +or newer\&. Clients supporting this type of encryption include Windows 8 and newer, Windows server 2012 and newer, and smbclient of Samba 4\&.1 and newer\&. +.sp +The protocol implementation offers various options: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The capability to perform SMB encryption can be negotiated during protocol negotiation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Data encryption can be enabled globally\&. In that case, an encryption\-capable connection will have all traffic in all its sessions encrypted\&. In particular all share connections will be encrypted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Data encryption can also be enabled per share if not enabled globally\&. For an encryption\-capable connection, all connections to an encryption\-enabled share will be encrypted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Encryption can be enforced\&. This means that session setups will be denied on non\-encryption\-capable connections if data encryption has been enabled globally\&. And tree connections will be denied for non\-encryption capable connections to shares with data encryption enabled\&. +.RE +.sp +.RE +These features can be controlled with settings of +\fIserver smb encrypt\fR +as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Leaving it as default, explicitly setting +\fIdefault\fR, or setting it to +\fIif_required\fR +globally will enable negotiation of encryption but will not turn on data encryption globally or per share\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIdesired\fR +globally will enable negotiation and will turn on data encryption on sessions and share connections for those clients that support it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIrequired\fR +globally will enable negotiation and turn on data encryption on sessions and share connections\&. Clients that do not support encryption will be denied access to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIoff\fR +globally will completely disable the encryption feature for all connections\&. Setting +\fIserver smb encrypt = required\fR +for individual shares (while it\*(Aqs globally off) will deny access to this shares for all clients\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIdesired\fR +on a share will turn on data encryption for this share for clients that support encryption if negotiation has been enabled globally\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIrequired\fR +on a share will enforce data encryption for this share if negotiation has been enabled globally\&. I\&.e\&. clients that do not support encryption will be denied access to the share\&. +.sp +Note that this allows per\-share enforcing to be controlled in Samba differently from Windows: In Windows, +\fIRejectUnencryptedAccess\fR +is a global setting, and if it is set, all shares with data encryption turned on are automatically enforcing encryption\&. In order to achieve the same effect in Samba, one has to globally set +\fIserver smb encrypt\fR +to +\fIif_required\fR, and then set all shares that should be encrypted to +\fIrequired\fR\&. Additionally, it is possible in Samba to have some shares with encryption +\fIrequired\fR +and some other shares with encryption only +\fIdesired\fR, which is not possible in Windows\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Setting it to +\fIoff\fR +or +\fIif_required\fR +for a share has no effect\&. +.RE +.sp +.RE +.RE +.sp +Default: +\fI\fIserver smb encrypt\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +server smb3 encryption algorithms (G) +.PP +.RS 4 +This parameter specifies the availability and order of encryption algorithms which are available for negotiation in the SMB3_11 dialect\&. +.sp +It is also possible to remove individual algorithms from the default list, by prefixing them with \*(Aq\-\*(Aq\&. This can avoid having to specify a hardcoded list\&. +.sp +Note: that the removal of AES\-128\-CCM from the list will result in SMB3_00 and SMB3_02 being unavailable, as it is the default and only available algorithm for these dialects\&. +.sp +Default: +\fI\fIserver smb3 encryption algorithms\fR\fR\fI = \fR\fIAES\-128\-GCM, AES\-128\-CCM, AES\-256\-GCM, AES\-256\-CCM\fR\fI \fR +.sp +Example: +\fI\fIserver smb3 encryption algorithms\fR\fR\fI = \fR\fIAES\-256\-GCM\fR\fI \fR +.sp +Example: +\fI\fIserver smb3 encryption algorithms\fR\fR\fI = \fR\fI\-AES\-128\-GCM \-AES\-128\-CCM\fR\fI \fR +.RE + +server smb3 signing algorithms (G) +.PP +.RS 4 +This parameter specifies the availability and order of signing algorithms which are available for negotiation in the SMB3_11 dialect\&. +.sp +It is also possible to remove individual algorithms from the default list, by prefixing them with \*(Aq\-\*(Aq\&. This can avoid having to specify a hardcoded list\&. +.sp +Note: that the removal of AES\-128\-CMAC from the list will result in SMB3_00 and SMB3_02 being unavailable, and the removal of HMAC\-SHA256 will result in SMB2_02 and SMB2_10 being unavailable, as these are the default and only available algorithms for these dialects\&. +.sp +Default: +\fI\fIserver smb3 signing algorithms\fR\fR\fI = \fR\fIAES\-128\-GMAC, AES\-128\-CMAC, HMAC\-SHA256\fR\fI \fR +.sp +Example: +\fI\fIserver smb3 signing algorithms\fR\fR\fI = \fR\fIAES\-128\-CMAC, HMAC\-SHA256\fR\fI \fR +.sp +Example: +\fI\fIserver smb3 signing algorithms\fR\fR\fI = \fR\fI\-AES\-128\-CMAC\fR\fI \fR +.RE + +server string (G) +.PP +.RS 4 +This controls what string will show up in the printer comment box in print manager and next to the IPC connection in +net view\&. It can be any string that you wish to show to your users\&. +.sp +It also sets what will appear in browse lists next to the machine name\&. +.sp +A +\fI%v\fR +will be replaced with the Samba version number\&. +.sp +A +\fI%h\fR +will be replaced with the hostname\&. +.sp +Default: +\fI\fIserver string\fR\fR\fI = \fR\fISamba %v\fR\fI \fR +.sp +Example: +\fI\fIserver string\fR\fR\fI = \fR\fIUniversity of GNUs Samba Server\fR\fI \fR +.RE + +set primary group script (G) +.PP +.RS 4 +Thanks to the Posix subsystem in NT a Windows User has a primary group in addition to the auxiliary groups\&. This script sets the primary group in the unix user database when an administrator sets the primary group from the windows user manager or when fetching a SAM with +net rpc vampire\&. +\fI%u\fR +will be replaced with the user whose primary group is to be set\&. +\fI%g\fR +will be replaced with the group to set\&. +.sp +Default: +\fI\fIset primary group script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIset primary group script\fR\fR\fI = \fR\fI/usr/sbin/usermod \-g \*(Aq%g\*(Aq \*(Aq%u\*(Aq\fR\fI \fR +.RE + +set quota command (G) +.PP +.RS 4 +The +set quota command +should only be used whenever there is no operating system API available from the OS that samba can use\&. +.sp +This option is only available if Samba was compiled with quota support\&. +.sp +This parameter should specify the path to a script that can set quota for the specified arguments\&. +.sp +The specified script should take the following arguments: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1 \- path to where the quota needs to be set\&. This needs to be interpreted relative to the current working directory that the script may also check for\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2 \- quota type +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1 \- user quotas +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2 \- user default quotas (uid = \-1) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3 \- group quotas +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +4 \- group default quotas (gid = \-1) +.RE +.sp +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3 \- id (uid for user, gid for group, \-1 if N/A) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +4 \- quota state (0 = disable, 1 = enable, 2 = enable and enforce) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +5 \- block softlimit +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +6 \- block hardlimit +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +7 \- inode softlimit +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +8 \- inode hardlimit +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +9(optional) \- block size, defaults to 1024 +.RE +.sp +.RE +The script should output at least one line of data on success\&. And nothing on failure\&. +.sp +Default: +\fI\fIset quota command\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIset quota command\fR\fR\fI = \fR\fI/usr/local/sbin/set_quota\fR\fI \fR +.RE + +share:fake_fscaps (G) +.PP +.RS 4 +This is needed to support some special application that makes QFSINFO calls to check whether we set the SPARSE_FILES bit (0x40)\&. If this bit is not set that particular application refuses to work against Samba\&. With +\m[blue]\fBshare:fake_fscaps = 64\fR\m[] +the SPARSE_FILES file system capability flag is set\&. Use other decimal values to specify the bitmask you need to fake\&. +.sp +Default: +\fI\fIshare:fake_fscaps\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +short preserve case (S) +.PP +.RS 4 +This boolean parameter controls if new files which conform to 8\&.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the +\m[blue]\fBdefault case\fR\m[]\&. This option can be use with +\m[blue]\fBpreserve case = yes\fR\m[] +to permit long filenames to retain their case, while short names are lowered\&. +.sp +See the section on +NAME MANGLING\&. +.sp +Default: +\fI\fIshort preserve case\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +show add printer wizard (G) +.PP +.RS 4 +With the introduction of MS\-RPC based printing support for Windows NT/2000 client in Samba 2\&.2, a "Printers\&.\&.\&." folder will appear on Samba hosts in the share listing\&. Normally this folder will contain an icon for the MS Add Printer Wizard (APW)\&. However, it is possible to disable this feature regardless of the level of privilege of the connected user\&. +.sp +Under normal circumstances, the Windows NT/2000 client will open a handle on the printer server with OpenPrinterEx() asking for Administrator privileges\&. If the user does not have administrative access on the print server (i\&.e is not root or has granted the SePrintOperatorPrivilege), the OpenPrinterEx() call fails and the client makes another open call with a request for a lower privilege level\&. This should succeed, however the APW icon will not be displayed\&. +.sp +Disabling the +\fIshow add printer wizard\fR +parameter will always cause the OpenPrinterEx() on the server to fail\&. Thus the APW icon will never be displayed\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This does not prevent the same user from having administrative privilege on an individual printer\&. +.sp .5v +.RE +Default: +\fI\fIshow add printer wizard\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +shutdown script (G) +.PP +.RS 4 +This a full path name to a script called by +\fBsmbd\fR(8) +that should start a shutdown procedure\&. +.sp +If the connected user possesses the +\fBSeRemoteShutdownPrivilege\fR, right, this command will be run as root\&. +.sp +The %z %t %r %f variables are expanded as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%z\fR +will be substituted with the shutdown message sent to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%t\fR +will be substituted with the number of seconds to wait before effectively starting the shutdown procedure\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%r\fR +will be substituted with the switch +\fI\-r\fR\&. It means reboot after shutdown for NT\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI%f\fR +will be substituted with the switch +\fI\-f\fR\&. It means force the shutdown even if applications do not respond for NT\&. +.RE +.sp +.RE +Shutdown script example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +#!/bin/bash + +time=$2 +let time="${time} / 60" +let time="${time} + 1" + +/sbin/shutdown $3 $4 +$time $1 & + +.fi +.if n \{\ +.RE +.\} +.sp +Shutdown does not return so we need to launch it in background\&. +.sp +Default: +\fI\fIshutdown script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIshutdown script\fR\fR\fI = \fR\fI/usr/local/samba/sbin/shutdown %m %t %r %f\fR\fI \fR +.RE + +smb2 disable lock sequence checking (G) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will disable lock sequence checking even for multi\-channel connections as well as durable handles\&. +.sp +The [MS\-SMB2] specification (under 3\&.3\&.5\&.14 Receiving an SMB2 LOCK Request) documents that a server should do lock sequence if Open\&.IsResilient or Open\&.IsDurable or Open\&.IsPersistent is TRUE or if Connection\&.Dialect belongs to the SMB 3\&.x dialect family and Connection\&.ServerCapabilities includes SMB2_GLOBAL_CAP_MULTI_CHANNEL\&. +.sp +But Windows Server (at least up to v2004) only does these checks for the Open\&.IsResilient and Open\&.IsPersistent\&. That means they do not implement the behavior specified in [MS\-SMB2]\&. +.sp +By default Samba behaves according to the specification and implements lock sequence checking when multi\-channel is used\&. +.sp +Warning: Only enable this option if existing clients can\*(Aqt handle lock sequence checking for handles without Open\&.IsResilient and Open\&.IsPersistent\&. And it turns out that the Windows Server behavior is required\&. +.sp +Note: it\*(Aqs likely that this option will be removed again if future Windows versions change their behavior\&. +.sp +Note: Samba does not implement Open\&.IsResilient and Open\&.IsPersistent yet\&. +.sp +Default: +\fI\fIsmb2 disable lock sequence checking\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIsmb2 disable lock sequence checking\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smb2 disable oplock break retry (G) +.PP +.RS 4 +This boolean parameter controls whether +\fBsmbd\fR(8) +will trigger smb2 oplock break notification retries when using +\m[blue]\fBserver multi channel support = yes\fR\m[]\&. +.sp +The [MS\-SMB2] specification documents that a server should send smb2 oplock break notification retries on all available channel to the given client\&. +.sp +But Windows Server versions (at least up to 2019) do not send smb2 oplock break notification retries on channel failures\&. That means they do not implement the behavior specified in [MS\-SMB2]\&. +.sp +By default Samba behaves according to the specification and send smb2 oplock break notification retries\&. +.sp +Warning: Only enable this option if existing clients can\*(Aqt handle possible retries and it turns out that the Windows Server behavior is required\&. +.sp +Note: it\*(Aqs likely that this option gets removed again if future Windows versions change their behavior\&. +.sp +Note: this only applies to oplocks and not SMB2 leases\&. +.sp +Default: +\fI\fIsmb2 disable oplock break retry\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIsmb2 disable oplock break retry\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smb2 leases (G) +.PP +.RS 4 +This boolean option tells +smbd +whether to globally negotiate SMB2 leases on file open requests\&. Leasing is an SMB2\-only feature which allows clients to aggressively cache files locally above and beyond the caching allowed by SMB1 oplocks\&. +.sp +This is only available with +\m[blue]\fBoplocks = yes\fR\m[] +and +\m[blue]\fBkernel oplocks = no\fR\m[]\&. +.sp +Note that the write cache won\*(Aqt be used for file handles with a smb2 write lease\&. +.sp +Default: +\fI\fIsmb2 leases\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smb2 max credits (G) +.PP +.RS 4 +This option controls the maximum number of outstanding simultaneous SMB2 operations that Samba tells the client it will allow\&. This is similar to the +\m[blue]\fBmax mux\fR\m[] +parameter for SMB1\&. You should never need to set this parameter\&. +.sp +The default is 8192 credits, which is the same as a Windows 2008R2 SMB2 server\&. +.sp +Default: +\fI\fIsmb2 max credits\fR\fR\fI = \fR\fI8192\fR\fI \fR +.RE + +smb2 max read (G) +.PP +.RS 4 +This option specifies the protocol value that +\fBsmbd\fR(8) +will return to a client, informing the client of the largest size that may be returned by a single SMB2 read call\&. +.sp +The maximum is 8388608 bytes (8MiB), which is the same as a Windows Server 2012 r2\&. +.sp +Please note that the default is 8MiB, but it\*(Aqs limit is based on the smb2 dialect (64KiB for SMB == 2\&.0, 8MiB for SMB >= 2\&.1 with LargeMTU)\&. Large MTU is not supported over NBT (tcp port 139)\&. +.sp +Default: +\fI\fIsmb2 max read\fR\fR\fI = \fR\fI8388608\fR\fI \fR +.RE + +smb2 max trans (G) +.PP +.RS 4 +This option specifies the protocol value that +\fBsmbd\fR(8) +will return to a client, informing the client of the largest size of buffer that may be used in querying file meta\-data via QUERY_INFO and related SMB2 calls\&. +.sp +The maximum is 8388608 bytes (8MiB), which is the same as a Windows Server 2012 r2\&. +.sp +Please note that the default is 8MiB, but it\*(Aqs limit is based on the smb2 dialect (64KiB for SMB == 2\&.0, 1MiB for SMB >= 2\&.1 with LargeMTU)\&. Large MTU is not supported over NBT (tcp port 139)\&. +.sp +Default: +\fI\fIsmb2 max trans\fR\fR\fI = \fR\fI8388608\fR\fI \fR +.RE + +smb2 max write (G) +.PP +.RS 4 +This option specifies the protocol value that +\fBsmbd\fR(8) +will return to a client, informing the client of the largest size that may be sent to the server by a single SMB2 write call\&. +.sp +The maximum is 8388608 bytes (8MiB), which is the same as a Windows Server 2012 r2\&. +.sp +Please note that the default is 8MiB, but it\*(Aqs limit is based on the smb2 dialect (64KiB for SMB == 2\&.0, 8MiB for SMB => 2\&.1 with LargeMTU)\&. Large MTU is not supported over NBT (tcp port 139)\&. +.sp +Default: +\fI\fIsmb2 max write\fR\fR\fI = \fR\fI8388608\fR\fI \fR +.RE + +smbd async dosmode (S) +.PP +.RS 4 +This parameter control whether the fileserver will use sync or async methods for fetching the DOS attributes when doing a directory listing\&. By default sync methods will be used\&. +.sp +Default: +\fI\fIsmbd async dosmode\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +smbd getinfo ask sharemode (S) +.PP +.RS 4 +This parameter allows disabling fetching file write time from the open file handle database locking\&.tdb when a client requests file or directory metadata\&. It\*(Aqs a performance optimisation at the expense of protocol correctness\&. +.sp +Default: +\fI\fIsmbd getinfo ask sharemode\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smbd max async dosmode (S) +.PP +.RS 4 +This parameter controls how many async operations to fetch the DOS attributes the fileserver will queue when doing directory listings\&. +.sp +Default: +\fI\fIsmbd max async dosmode\fR\fR\fI = \fR\fIaio max threads * 2\fR\fI \fR +.RE + +smbd max xattr size (S) +.PP +.RS 4 +This parameter controls the maximum size of extended attributes that may be written to the server as EAs or as alternate data streams if vfs_streams_xattr is enabled\&. The maximum size of extended attributes depends on the Samba server\*(Aqs operating system and the underlying filesystem\&. The Linux VFS currently sets an upper boundary of 64 KiB per extended attribute\&. FreeBSD does not set a practical upper limit, but since pread() and pwrite() are not possible via the extattr on FreeBSD, it is not recommended to increase this value above a few MiB\&. If a client attempts to write an overly\-large alternate datastream, the Samba server will return STATUS_FILESYSTEM_LIMITATION\&. If this error is encountered, users may try increasing the maximum size supported for xattr writes\&. If this is not possible, and writes are from a MacOS client and to an AFP_Resource extended attribute, the user may enable the vfs_fruit module and configure to allow stream writes for AFP_Resource to an alternative storage location\&. See vfs_fruit documentation for further details\&. +.sp +Default: +\fI\fIsmbd max xattr size\fR\fR\fI = \fR\fI65536\fR\fI \fR +.RE + +smbd profiling level (G) +.PP +.RS 4 +This parameter allows the administrator to enable profiling support\&. +.sp +Possible values are +\fBoff\fR, +\fBcount\fR +and +\fBon\fR\&. +.sp +Default: +\fI\fIsmbd profiling level\fR\fR\fI = \fR\fIoff\fR\fI \fR +.sp +Example: +\fI\fIsmbd profiling level\fR\fR\fI = \fR\fIon\fR\fI \fR +.RE + +smbd search ask sharemode (S) +.PP +.RS 4 +This parameter allows disabling fetching file write time from the open file handle database locking\&.tdb\&. It\*(Aqs a performance optimisation at the expense of protocol correctness\&. +.sp +Default: +\fI\fIsmbd search ask sharemode\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +smb encrypt (S) +.PP +.RS 4 +This is a synonym for +\m[blue]\fBserver smb encrypt\fR\m[]\&. +.sp +Default: +\fI\fIsmb encrypt\fR\fR\fI = \fR\fIdefault\fR\fI \fR +.RE + +smb passwd file (G) +.PP +.RS 4 +This option sets the path to the encrypted smbpasswd file\&. By default the path to the smbpasswd file is compiled into Samba\&. +.sp +An example of use is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +smb passwd file = /etc/samba/smbpasswd +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIsmb passwd file\fR\fR\fI = \fR\fI/var/db/samba4/private/smbpasswd\fR\fI \fR +.RE + +smb ports (G) +.PP +.RS 4 +Specifies which ports the server should listen on for SMB traffic\&. +.sp +Default: +\fI\fIsmb ports\fR\fR\fI = \fR\fI445 139\fR\fI \fR +.RE + +socket options (G) +.PP +.RS 4 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Modern server operating systems are tuned for high network performance in the majority of situations; when you set socket options you are overriding those settings\&. Linux in particular has an auto\-tuning mechanism for buffer sizes that will be disabled if you specify a socket buffer size\&. This can potentially cripple your TCP/IP stack\&. +.sp +Getting the socket options correct can make a big difference to your performance, but getting them wrong can degrade it by just as much\&. As with any other low level setting, if you must make changes to it, make small changes and +\fItest\fR +the effect before making any large changes\&. +.sp .5v +.RE +.sp +This option allows you to set socket options to be used when talking with the client\&. +.sp +Socket options are controls on the networking layer of the operating systems which allow the connection to be tuned\&. +.sp +This option will typically be used to tune your Samba server for optimal performance for your local network\&. There is no way that Samba can know what the optimal parameters are for your net, so you must experiment and choose them yourself\&. We strongly suggest you read the appropriate documentation for your operating system first (perhaps +man setsockopt +will help)\&. +.sp +You may find that on some systems Samba will say "Unknown socket option" when you supply an option\&. This means you either incorrectly typed it or you need to add an include file to includes\&.h for your OS\&. If the latter is the case please send the patch to +samba\-technical@lists\&.samba\&.org\&. +.sp +Any of the supported socket options may be combined in any way you like, as long as your OS allows it\&. +.sp +This is the list of socket options currently settable using this option: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_KEEPALIVE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_REUSEADDR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_BROADCAST +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_NODELAY +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_KEEPCNT * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_KEEPIDLE * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_KEEPINTVL * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +IPTOS_LOWDELAY +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +IPTOS_THROUGHPUT +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_REUSEPORT +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_SNDBUF * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_RCVBUF * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_SNDLOWAT * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_RCVLOWAT * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_SNDTIMEO * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SO_RCVTIMEO * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_FASTACK * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_QUICKACK +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_NODELAYACK +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_KEEPALIVE_THRESHOLD * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_KEEPALIVE_ABORT_THRESHOLD * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_DEFER_ACCEPT * +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +TCP_USER_TIMEOUT * +.RE +.sp +.RE +Those marked with a +\fI\*(Aq*\*(Aq\fR +take an integer argument\&. The others can optionally take a 1 or 0 argument to enable or disable the option, by default they will be enabled if you don\*(Aqt specify 1 or 0\&. +.sp +To specify an argument use the syntax SOME_OPTION = VALUE for example +SO_SNDBUF = 8192\&. Note that you must not have any spaces before or after the = sign\&. +.sp +If you are on a local network then a sensible option might be: +.sp +socket options = IPTOS_LOWDELAY +.sp +If you have a local network then you could try: +.sp +socket options = IPTOS_LOWDELAY TCP_NODELAY +.sp +If you are on a wide area network then perhaps try setting IPTOS_THROUGHPUT\&. +.sp +Note that several of the options may cause your Samba server to fail completely\&. Use these options with caution! +.sp +Default: +\fI\fIsocket options\fR\fR\fI = \fR\fITCP_NODELAY\fR\fI \fR +.sp +Example: +\fI\fIsocket options\fR\fR\fI = \fR\fIIPTOS_LOWDELAY\fR\fI \fR +.RE + +spn update command (G) +.PP +.RS 4 +This option sets the command that for updating servicePrincipalName names from +spn_update_list\&. +.sp +Default: +\fI\fIspn update command\fR\fR\fI = \fR\fI/wrkdirs/usr/ports/net/samba416/work/samba\-4\&.16\&.4/source4/scripting/bin/samba_spnupdate\fR\fI \fR +.sp +Example: +\fI\fIspn update command\fR\fR\fI = \fR\fI/usr/local/sbin/spnupdate\fR\fI \fR +.RE + +spoolss: architecture (G) +.PP +.RS 4 +Windows spoolss print clients only allow association of server\-side drivers with printers when the driver architecture matches the advertised print server architecture\&. Samba\*(Aqs spoolss print server architecture can be changed using this parameter\&. +.sp +Default: +\fI\fIspoolss: architecture\fR\fR\fI = \fR\fIWindows x64\fR\fI \fR +.sp +Example: +\fI\fIspoolss: architecture\fR\fR\fI = \fR\fIWindows NT x86\fR\fI \fR +.RE + +spoolss: os_major (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 5\&.0\&.2195 (Windows 2000)\&. The example is 6\&.1\&.7601 (Windows 2008 R2)\&. +.sp +Default: +\fI\fIspoolss: os_major\fR\fR\fI = \fR\fI5\fR\fI \fR +.sp +Example: +\fI\fIspoolss: os_major\fR\fR\fI = \fR\fI6\fR\fI \fR +.RE + +spoolss: os_minor (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 5\&.0\&.2195 (Windows 2000)\&. The example is 6\&.1\&.7601 (Windows 2008 R2)\&. +.sp +Default: +\fI\fIspoolss: os_minor\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIspoolss: os_minor\fR\fR\fI = \fR\fI1\fR\fI \fR +.RE + +spoolss: os_build (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 5\&.0\&.2195 (Windows 2000)\&. The example is 6\&.1\&.7601 (Windows 2008 R2)\&. +.sp +Default: +\fI\fIspoolss: os_build\fR\fR\fI = \fR\fI2195\fR\fI \fR +.sp +Example: +\fI\fIspoolss: os_build\fR\fR\fI = \fR\fI7601\fR\fI \fR +.RE + +spoolss_client: os_major (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 6\&.1\&.7007 (Windows 7 and Windows Server 2008 R2)\&. +.sp +Default: +\fI\fIspoolss_client: os_major\fR\fR\fI = \fR\fI6\fR\fI \fR +.RE + +spoolss_client: os_minor (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 6\&.1\&.7007 (Windows 7 and Windows Server 2008 R2)\&. +.sp +Default: +\fI\fIspoolss_client: os_minor\fR\fR\fI = \fR\fI1\fR\fI \fR +.RE + +spoolss_client: os_build (G) +.PP +.RS 4 +Windows might require a new os version number\&. This option allows to modify the build number\&. The complete default version number is: 6\&.1\&.7007 (Windows 7 and Windows Server 2008 R2)\&. +.sp +Default: +\fI\fIspoolss_client: os_build\fR\fR\fI = \fR\fI7007\fR\fI \fR +.RE + +spotlight (S) +.PP +.RS 4 +This parameter controls whether Samba allows Spotlight queries on a share\&. For controlling indexing of filesystems you also have to use Tracker\*(Aqs own configuration system\&. +.sp +Spotlight has several prerequisites: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Samba must be configured and built with Spotlight support\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Tracker integration must be setup and the share must be indexed by Tracker\&. +.RE +.sp +.RE +For a detailed set of instructions please see +https://wiki\&.samba\&.org/index\&.php/Spotlight\&. +.sp +Default: +\fI\fIspotlight\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +spotlight backend (S) +.PP +.RS 4 +Spotlight search backend\&. Available backends: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBnoindex\fR +\- a backend that returns no results\&. +.RE +.sp +.RE +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBtracker\fR +\- Gnome Tracker\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBelasticsearch\fR +\- a backend that uses JSON and REST over HTTP(s) to query an Elasticsearch server\&. +.RE +.sp +.RE +.sp +Default: +\fI\fIspotlight backend\fR\fR\fI = \fR\fInoindex\fR\fI \fR +.RE + +stat cache (G) +.PP +.RS 4 +This parameter determines if +\fBsmbd\fR(8) +will use a cache in order to speed up case insensitive name mappings\&. You should never need to change this parameter\&. +.sp +Default: +\fI\fIstat cache\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +state directory (G) +.PP +.RS 4 +Usually, most of the TDB files are stored in the +\fIlock directory\fR\&. Since Samba 3\&.4\&.0, it is possible to differentiate between TDB files with persistent data and TDB files with non\-persistent data using the +\fIstate directory\fR +and the +\fIcache directory\fR +options\&. +.sp +This option specifies the directory where TDB files containing important persistent data will be stored\&. +.sp +Default: +\fI\fIstate directory\fR\fR\fI = \fR\fI/var/db/samba4\fR\fI \fR +.sp +Example: +\fI\fIstate directory\fR\fR\fI = \fR\fI/var/run/samba/locks/state\fR\fI \fR +.RE + +store dos attributes (S) +.PP +.RS 4 +If this parameter is set Samba attempts to first read DOS attributes (SYSTEM, HIDDEN, ARCHIVE or READ\-ONLY) from a filesystem extended attribute, before mapping DOS attributes to UNIX permission bits (such as occurs with +\m[blue]\fBmap hidden\fR\m[] +and +\m[blue]\fBmap readonly\fR\m[])\&. When set, DOS attributes will be stored onto an extended attribute in the UNIX filesystem, associated with the file or directory\&. When this parameter is set it will override the parameters +\m[blue]\fBmap hidden\fR\m[], +\m[blue]\fBmap system\fR\m[], +\m[blue]\fBmap archive\fR\m[] +and +\m[blue]\fBmap readonly\fR\m[] +and they will behave as if they were set to off\&. This parameter writes the DOS attributes as a string into the extended attribute named "user\&.DOSATTRIB"\&. This extended attribute is explicitly hidden from smbd clients requesting an EA list\&. On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel\&. In Samba 3\&.5\&.0 and above the "user\&.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes\&. This is done in a backwards compatible way so files created by Samba 3\&.5\&.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there\&. Storing the create time separately from the normal filesystem meta\-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem\&. The default has changed to yes in Samba release 4\&.9\&.0 and above to allow better Windows fileserver compatibility in a default install\&. +.sp +Default: +\fI\fIstore dos attributes\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +strict allocate (S) +.PP +.RS 4 +This is a boolean that controls the handling of disk space allocation in the server\&. When this is set to +\fByes\fR +the server will change from UNIX behaviour of not committing real disk storage blocks when a file is extended to the Windows behaviour of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size\&. In UNIX terminology this means that Samba will stop creating sparse files\&. +.sp +This option is really designed for file systems that support fast allocation of large numbers of blocks such as extent\-based file systems\&. On file systems that don\*(Aqt support extents (most notably ext3) this can make Samba slower\&. When you work with large files over >100MB on file systems without extents you may even run into problems with clients running into timeouts\&. +.sp +When you have an extent based filesystem it\*(Aqs likely that we can make use of unwritten extents which allows Samba to allocate even large amounts of space very fast and you will not see any timeout problems caused by strict allocate\&. With strict allocate in use you will also get much better out of quota messages in case you use quotas\&. Another advantage of activating this setting is that it will help to reduce file fragmentation\&. +.sp +To give you an idea on which filesystems this setting might currently be a good option for you: XFS, ext4, btrfs, ocfs2 on Linux and JFS2 on AIX support unwritten extents\&. On Filesystems that do not support it, preallocation is probably an expensive operation where you will see reduced performance and risk to let clients run into timeouts when creating large files\&. Examples are ext3, ZFS, HFS+ and most others, so be aware if you activate this setting on those filesystems\&. +.sp +Default: +\fI\fIstrict allocate\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +strict locking (S) +.PP +.RS 4 +This is an enumerated type that controls the handling of file locking in the server\&. When this is set to +\fByes\fR, the server will check every read and write access for file locks, and deny access if locks exist\&. This can be slow on some systems\&. +.sp +When strict locking is set to Auto (the default), the server performs file lock checks only on non\-oplocked files\&. As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for improved performance\&. +.sp +When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them\&. +.sp +Well\-behaved clients always ask for lock checks when it is important\&. So in the vast majority of cases, +strict locking = Auto +or +strict locking = no +is acceptable\&. +.sp +Default: +\fI\fIstrict locking\fR\fR\fI = \fR\fIAuto\fR\fI \fR +.RE + +strict rename (S) +.PP +.RS 4 +By default a Windows SMB server prevents directory renames when there are open file or directory handles below it in the filesystem hierarchy\&. Historically Samba has always allowed this as POSIX filesystem semantics require it\&. +.sp +This boolean parameter allows Samba to match the Windows behavior\&. Setting this to "yes" is a very expensive change, as it forces Samba to travers the entire open file handle database on every directory rename request\&. In a clustered Samba system the cost is even greater than the non\-clustered case\&. +.sp +When set to "no" smbd only checks the local process the client is attached to for open files below a directory being renamed, instead of checking for open files across all smbd processes\&. +.sp +Because of the expense in fully searching the database, the default is "no", and it is recommended to be left that way unless a specific Windows application requires it to be changed\&. +.sp +If the client has requested UNIX extensions (POSIX pathnames) then renames are always allowed and this parameter has no effect\&. +.sp +Default: +\fI\fIstrict rename\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +strict sync (S) +.PP +.RS 4 +This parameter controls whether Samba honors a request from an SMB client to ensure any outstanding operating system buffer contents held in memory are safely written onto stable storage on disk\&. If set to +\fByes\fR, which is the default, then Windows applications can force the smbd server to synchronize unwritten data onto the disk\&. If set to +\fBno\fR +then smbd will ignore client requests to synchronize unwritten data onto stable storage on disk\&. +.sp +In Samba 4\&.7\&.0, the default for this parameter changed from +\fBno\fR +to +\fByes\fR +to better match the expectations of SMB2/3 clients and improve application safety when running against smbd\&. +.sp +The flush request from SMB2/3 clients is handled asynchronously inside smbd, so leaving the parameter as the default value of +\fByes\fR +does not block the processing of other requests to the smbd process\&. +.sp +Legacy Windows applications (such as the Windows 98 explorer shell) seemed to confuse writing buffer contents to the operating system with synchronously writing outstanding data onto stable storage on disk\&. Changing this parameter to +\fBno\fR +means that +\fBsmbd\fR(8) +will ignore the Windows applications request to synchronize unwritten data onto disk\&. Only consider changing this if smbd is serving obsolete SMB1 Windows clients prior to Windows XP (Windows 98 and below)\&. There should be no need to change this setting for normal operations\&. +.sp +Default: +\fI\fIstrict sync\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +svcctl list (G) +.PP +.RS 4 +This option defines a list of init scripts that smbd will use for starting and stopping Unix services via the Win32 ServiceControl API\&. This allows Windows administrators to utilize the MS Management Console plug\-ins to manage a Unix server running Samba\&. +.sp +The administrator must create a directory name +svcctl +in Samba\*(Aqs $(libdir) and create symbolic links to the init scripts in +/etc/init\&.d/\&. The name of the links must match the names given as part of the +\fIsvcctl list\fR\&. +.sp +Default: +\fI\fIsvcctl list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIsvcctl list\fR\fR\fI = \fR\fIcups postfix portmap httpd\fR\fI \fR +.RE + +sync always (S) +.PP +.RS 4 +This is a boolean parameter that controls whether writes will always be written to stable storage before the write call returns\&. If this is +\fBno\fR +then the server will be guided by the client\*(Aqs request in each write call (clients can set a bit indicating that a particular write should be synchronous)\&. If this is +\fByes\fR +then every write will be followed by a +fsync() +call to ensure the data is written to disk\&. Note that the +\fIstrict sync\fR +parameter must be set to +\fByes\fR +in order for this parameter to have any effect\&. +.sp +Default: +\fI\fIsync always\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +syslog (G) +.PP +.RS 4 +This parameter maps how Samba debug messages are logged onto the system syslog logging levels\&. Samba debug level zero maps onto syslog +\fBLOG_ERR\fR, debug level one maps onto +\fBLOG_WARNING\fR, debug level two maps onto +\fBLOG_NOTICE\fR, debug level three maps onto LOG_INFO\&. All higher levels are mapped to +\fBLOG_DEBUG\fR\&. +.sp +This parameter sets the threshold for sending messages to syslog\&. Only messages with debug level less than this value will be sent to syslog\&. There still will be some logging to log\&.[sn]mbd even if +\fIsyslog only\fR +is enabled\&. +.sp +The +\m[blue]\fBlogging\fR\m[] +parameter should be used instead\&. When +\m[blue]\fBlogging\fR\m[] +is set, it overrides the +\m[blue]\fBsyslog\fR\m[] +parameter\&. +.sp +Default: +\fI\fIsyslog\fR\fR\fI = \fR\fI1\fR\fI \fR +.RE + +syslog only (G) +.PP +.RS 4 +If this parameter is set then Samba debug messages are logged into the system syslog only, and not to the debug log files\&. There still will be some logging to log\&.[sn]mbd even if +\fIsyslog only\fR +is enabled\&. +.sp +The +\m[blue]\fBlogging\fR\m[] +parameter should be used instead\&. When +\m[blue]\fBlogging\fR\m[] +is set, it overrides the +\m[blue]\fBsyslog only\fR\m[] +parameter\&. +.sp +Default: +\fI\fIsyslog only\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +template homedir (G) +.PP +.RS 4 +When filling out the user information for a Windows NT user, the +\fBwinbindd\fR(8) +daemon uses this parameter to fill in the home directory for that user\&. If the string +\fI%D\fR +is present it is substituted with the user\*(Aqs Windows NT domain name\&. If the string +\fI%U\fR +is present it is substituted with the user\*(Aqs Windows NT user name\&. +.sp +Default: +\fI\fItemplate homedir\fR\fR\fI = \fR\fI/home/%D/%U\fR\fI \fR +.RE + +template shell (G) +.PP +.RS 4 +When filling out the user information for a Windows NT user, the +\fBwinbindd\fR(8) +daemon uses this parameter to fill in the login shell for that user\&. +.sp +Default: +\fI\fItemplate shell\fR\fR\fI = \fR\fI/bin/false\fR\fI \fR +.RE + +time server (G) +.PP +.RS 4 +This parameter determines if +\fBnmbd\fR(8) +advertises itself as a time server to Windows clients\&. +.sp +Default: +\fI\fItime server\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +debug timestamp +.PP +.RS 4 +This parameter is a synonym for +timestamp logs\&. +.RE + +timestamp logs (G) +.PP +.RS 4 +Samba debug log messages are timestamped by default\&. If you are running at a high +\m[blue]\fBdebug level\fR\m[] +these timestamps can be distracting\&. This boolean parameter allows timestamping to be turned off\&. +.sp +Default: +\fI\fItimestamp logs\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +tls cafile (G) +.PP +.RS 4 +This option can be set to a file (PEM format) containing CA certificates of root CAs to trust to sign certificates or intermediate CA certificates\&. +.sp +This path is relative to +\m[blue]\fBprivate dir\fR\m[] +if the path does not start with a /\&. +.sp +Default: +\fI\fItls cafile\fR\fR\fI = \fR\fItls/ca\&.pem\fR\fI \fR +.RE + +tls certfile (G) +.PP +.RS 4 +This option can be set to a file (PEM format) containing the RSA certificate\&. +.sp +This path is relative to +\m[blue]\fBprivate dir\fR\m[] +if the path does not start with a /\&. +.sp +Default: +\fI\fItls certfile\fR\fR\fI = \fR\fItls/cert\&.pem\fR\fI \fR +.RE + +tls crlfile (G) +.PP +.RS 4 +This option can be set to a file containing a certificate revocation list (CRL)\&. +.sp +This path is relative to +\m[blue]\fBprivate dir\fR\m[] +if the path does not start with a /\&. +.sp +Default: +\fI\fItls crlfile\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +tls dh params file (G) +.PP +.RS 4 +This option can be set to a file with Diffie\-Hellman parameters which will be used with DH ciphers\&. +.sp +This path is relative to +\m[blue]\fBprivate dir\fR\m[] +if the path does not start with a /\&. +.sp +Default: +\fI\fItls dh params file\fR\fR\fI = \fR\fI\fR\fI \fR +.RE + +tls enabled (G) +.PP +.RS 4 +If this option is set to +\fByes\fR, then Samba will use TLS when possible in communication\&. +.sp +Default: +\fI\fItls enabled\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +tls keyfile (G) +.PP +.RS 4 +This option can be set to a file (PEM format) containing the RSA private key\&. This file must be accessible without a pass\-phrase, i\&.e\&. it must not be encrypted\&. +.sp +This path is relative to +\m[blue]\fBprivate dir\fR\m[] +if the path does not start with a /\&. +.sp +Default: +\fI\fItls keyfile\fR\fR\fI = \fR\fItls/key\&.pem\fR\fI \fR +.RE + +tls priority (G) +.PP +.RS 4 +This option can be set to a string describing the TLS protocols to be supported in the parts of Samba that use GnuTLS, specifically the AD DC\&. +.sp +The string is appended to the default priority list of GnuTLS\&. +.sp +The valid options are described in the +GNUTLS Priority\-Strings documentation at http://gnutls\&.org/manual/html_node/Priority\-Strings\&.html +.sp +The SSL3\&.0 protocol will be disabled\&. +.sp +Default: +\fI\fItls priority\fR\fR\fI = \fR\fINORMAL:\-VERS\-SSL3\&.0\fR\fI \fR +.RE + +tls verify peer (G) +.PP +.RS 4 +This controls if and how strict the client will verify the peer\*(Aqs certificate and name\&. Possible values are (in increasing order): +\fBno_check\fR, +\fBca_only\fR, +\fBca_and_name_if_available\fR, +\fBca_and_name\fR +and +\fBas_strict_as_possible\fR\&. +.sp +When set to +\fBno_check\fR +the certificate is not verified at all, which allows trivial man in the middle attacks\&. +.sp +When set to +\fBca_only\fR +the certificate is verified to be signed from a ca specified in the +\m[blue]\fBtls ca file\fR\m[] +option\&. Setting +\m[blue]\fBtls ca file\fR\m[] +to a valid file is required\&. The certificate lifetime is also verified\&. If the +\m[blue]\fBtls crl file\fR\m[] +option is configured, the certificate is also verified against the ca crl\&. +.sp +When set to +\fBca_and_name_if_available\fR +all checks from +\fBca_only\fR +are performed\&. In addition, the peer hostname is verified against the certificate\*(Aqs name, if it is provided by the application layer and not given as an ip address string\&. +.sp +When set to +\fBca_and_name\fR +all checks from +\fBca_and_name_if_available\fR +are performed\&. In addition the peer hostname needs to be provided and even an ip address is checked against the certificate\*(Aqs name\&. +.sp +When set to +\fBas_strict_as_possible\fR +all checks from +\fBca_and_name\fR +are performed\&. In addition the +\m[blue]\fBtls crl file\fR\m[] +needs to be configured\&. Future versions of Samba may implement additional checks\&. +.sp +Default: +\fI\fItls verify peer\fR\fR\fI = \fR\fIas_strict_as_possible\fR\fI \fR +.RE + +unicode (G) +.PP +.RS 4 +Specifies whether the server and client should support unicode\&. +.sp +If this option is set to false, the use of ASCII will be forced\&. +.sp +Default: +\fI\fIunicode\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +unix charset (G) +.PP +.RS 4 +Specifies the charset the unix machine Samba runs on uses\&. Samba needs to know this in order to be able to convert text to the charsets other SMB clients use\&. +.sp +This is also the charset Samba will use when specifying arguments to scripts that it invokes\&. +.sp +Default: +\fI\fIunix charset\fR\fR\fI = \fR\fIUTF\-8\fR\fI \fR +.sp +Example: +\fI\fIunix charset\fR\fR\fI = \fR\fIASCII\fR\fI \fR +.RE + +unix extensions (G) +.PP +.RS 4 +This boolean parameter controls whether Samba implements the CIFS UNIX extensions, as defined by HP\&. These extensions enable Samba to better serve UNIX CIFS clients by supporting features such as symbolic links, hard links, etc\&.\&.\&. These extensions require a similarly enabled client, and are of no current use to Windows clients\&. +.sp +Note if this parameter is turned on, the +\m[blue]\fBwide links\fR\m[] +parameter will automatically be disabled\&. +.sp +See the parameter +\m[blue]\fBallow insecure wide links\fR\m[] +if you wish to change this coupling between the two parameters\&. +.sp +Default: +\fI\fIunix extensions\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +unix password sync (G) +.PP +.RS 4 +This boolean parameter controls whether Samba attempts to synchronize the UNIX password with the SMB password when the encrypted SMB password in the smbpasswd file is changed\&. If this is set to +\fByes\fR +the program specified in the +\fIpasswd program\fR +parameter is called +\fIAS ROOT\fR +\- to allow the new UNIX password to be set without access to the old UNIX password (as the SMB password change code has no access to the old password cleartext, only the new)\&. +.sp +This option has no effect if +samba +is running as an active directory domain controller, in that case have a look at the +\m[blue]\fBpassword hash gpg key ids\fR\m[] +option and the +samba\-tool user syncpasswords +command\&. +.sp +Default: +\fI\fIunix password sync\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +use client driver (S) +.PP +.RS 4 +This parameter applies only to Windows NT/2000 clients\&. It has no effect on Windows 95/98/ME clients\&. When serving a printer to Windows NT/2000 clients without first installing a valid printer driver on the Samba host, the client will be required to install a local printer driver\&. From this point on, the client will treat the print as a local printer and not a network printer connection\&. This is much the same behavior that will occur when +disable spoolss = yes\&. +.sp +The differentiating factor is that under normal circumstances, the NT/2000 client will attempt to open the network printer using MS\-RPC\&. The problem is that because the client considers the printer to be local, it will attempt to issue the OpenPrinterEx() call requesting access rights associated with the logged on user\&. If the user possesses local administrator rights but not root privilege on the Samba host (often the case), the OpenPrinterEx() call will fail\&. The result is that the client will now display an "Access Denied; Unable to connect" message in the printer queue window (even though jobs may successfully be printed)\&. +.sp +If this parameter is enabled for a printer, then any attempt to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead\&. Thus allowing the OpenPrinterEx() call to succeed\&. +\fIThis parameter MUST not be enabled on a print share which has valid print driver installed on the Samba server\&.\fR +.sp +Default: +\fI\fIuse client driver\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +use mmap (G) +.PP +.RS 4 +This global parameter determines if the tdb internals of Samba can depend on mmap working correctly on the running system\&. Samba requires a coherent mmap/read\-write system memory cache\&. Currently only OpenBSD and HPUX do not have such a coherent cache, and on those platforms this paramter is overridden internally to be effeceively +\fBno\fR\&. On all systems this parameter should be left alone\&. This parameter is provided to help the Samba developers track down problems with the tdb internal code\&. +.sp +Default: +\fI\fIuse mmap\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +username level (G) +.PP +.RS 4 +This option helps Samba to try and \*(Aqguess\*(Aq at the real UNIX username, as many DOS clients send an all\-uppercase username\&. By default Samba tries all lowercase, followed by the username with the first letter capitalized, and fails if the username is not found on the UNIX machine\&. +.sp +If this parameter is set to non\-zero the behavior changes\&. This parameter is a number that specifies the number of uppercase combinations to try while trying to determine the UNIX user name\&. The higher the number the more combinations will be tried, but the slower the discovery of usernames will be\&. Use this parameter when you have strange usernames on your UNIX machine, such as +\fBAstrangeUser \fR\&. +.sp +This parameter is needed only on UNIX systems that have case sensitive usernames\&. +.sp +Default: +\fI\fIusername level\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIusername level\fR\fR\fI = \fR\fI5\fR\fI \fR +.RE + +username map (G) +.PP +.RS 4 +This option allows you to specify a file containing a mapping of usernames from the clients to the server\&. This can be used for several purposes\&. The most common is to map usernames that users use on DOS or Windows machines to those that the UNIX box uses\&. The other is to map multiple users to a single username so that they can more easily share files\&. +.sp +Please note that for user mode security, the username map is applied prior to validating the user credentials\&. Domain member servers (domain or ads) apply the username map after the user has been successfully authenticated by the domain controller and require fully qualified entries in the map table (e\&.g\&. biddle = +DOMAIN\efoo)\&. +.sp +The map file is parsed line by line\&. Each line should contain a single UNIX username on the left then a \*(Aq=\*(Aq followed by a list of usernames on the right\&. The list of usernames on the right may contain names of the form @group in which case they will match any UNIX username in that group\&. The special client name \*(Aq*\*(Aq is a wildcard and matches any name\&. Each line of the map file may be up to 1023 characters long\&. +.sp +The file is processed on each line by taking the supplied username and comparing it with each username on the right hand side of the \*(Aq=\*(Aq signs\&. If the supplied name matches any of the names on the right hand side then it is replaced with the name on the left\&. Processing then continues with the next line\&. +.sp +If any line begins with a \*(Aq#\*(Aq or a \*(Aq;\*(Aq then it is ignored\&. +.sp +If any line begins with an \*(Aq!\*(Aq then the processing will stop after that line if a mapping was done by the line\&. Otherwise mapping continues with every line being processed\&. Using \*(Aq!\*(Aq is most useful when you have a wildcard mapping line later in the file\&. +.sp +For example to map from the name +\fBadmin\fR +or +\fBadministrator\fR +to the UNIX name +\fB root\fR +you would use: +.sp +.if n \{\ +.RS 4 +.\} +.nf +root = admin administrator +.fi +.if n \{\ +.RE +.\} +.sp +Or to map anyone in the UNIX group +\fBsystem\fR +to the UNIX name +\fBsys\fR +you would use: +.sp +.if n \{\ +.RS 4 +.\} +.nf +sys = @system +.fi +.if n \{\ +.RE +.\} +.sp +You can have as many mappings as you like in a username map file\&. +.sp +If your system supports the NIS NETGROUP option then the netgroup database is checked before the +/etc/group +database for matching groups\&. +.sp +You can map Windows usernames that have spaces in them by using double quotes around the name\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +tridge = "Andrew Tridgell" +.fi +.if n \{\ +.RE +.\} +.sp +would map the windows username "Andrew Tridgell" to the unix username "tridge"\&. +.sp +The following example would map mary and fred to the unix user sys, and map the rest to guest\&. Note the use of the \*(Aq!\*(Aq to tell Samba to stop processing if it gets a match on that line: +.sp +.if n \{\ +.RS 4 +.\} +.nf +!sys = mary fred +guest = * +.fi +.if n \{\ +.RE +.\} +.sp +Note that the remapping is applied to all occurrences of usernames\&. Thus if you connect to \e\eserver\efred and +\fBfred\fR +is remapped to +\fBmary\fR +then you will actually be connecting to \e\eserver\emary and will need to supply a password suitable for +\fBmary\fR +not +\fBfred\fR\&. The only exception to this is the username passed to a Domain Controller (if you have one)\&. The DC will receive whatever username the client supplies without modification\&. +.sp +Also note that no reverse mapping is done\&. The main effect this has is with printing\&. Users who have been mapped may have trouble deleting print jobs as PrintManager under WfWg will think they don\*(Aqt own the print job\&. +.sp +Samba versions prior to 3\&.0\&.8 would only support reading the fully qualified username (e\&.g\&.: +DOMAIN\euser) from the username map when performing a kerberos login from a client\&. However, when looking up a map entry for a user authenticated by NTLM[SSP], only the login name would be used for matches\&. This resulted in inconsistent behavior sometimes even on the same server\&. +.sp +The following functionality is obeyed in version 3\&.0\&.8 and later: +.sp +When performing local authentication, the username map is applied to the login name before attempting to authenticate the connection\&. +.sp +When relying upon a external domain controller for validating authentication requests, smbd will apply the username map to the fully qualified username (i\&.e\&. +DOMAIN\euser) only after the user has been successfully authenticated\&. +.sp +An example of use is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +username map = /usr/local/samba/lib/users\&.map +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIusername map\fR\fR\fI = \fR\fI # no username map\fR\fI \fR +.RE + +username map cache time (G) +.PP +.RS 4 +Mapping usernames with the +\m[blue]\fBusername map\fR\m[] +or +\m[blue]\fBusername map script\fR\m[] +features of Samba can be relatively expensive\&. During login of a user, the mapping is done several times\&. In particular, calling the +\m[blue]\fBusername map script\fR\m[] +can slow down logins if external databases have to be queried from the script being called\&. +.sp +The parameter +\m[blue]\fBusername map cache time\fR\m[] +controls a mapping cache\&. It specifies the number of seconds a mapping from the username map file or script is to be efficiently cached\&. The default of 0 means no caching is done\&. +.sp +Default: +\fI\fIusername map cache time\fR\fR\fI = \fR\fI0\fR\fI \fR +.sp +Example: +\fI\fIusername map cache time\fR\fR\fI = \fR\fI60\fR\fI \fR +.RE + +username map script (G) +.PP +.RS 4 +This script is a mutually exclusive alternative to the +\m[blue]\fBusername map\fR\m[] +parameter\&. This parameter specifies an external program or script that must accept a single command line option (the username transmitted in the authentication request) and return a line on standard output (the name to which the account should mapped)\&. In this way, it is possible to store username map tables in an LDAP directory services\&. +.sp +Default: +\fI\fIusername map script\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIusername map script\fR\fR\fI = \fR\fI/etc/samba/scripts/mapusers\&.sh\fR\fI \fR +.RE + +usershare allow guests (G) +.PP +.RS 4 +This parameter controls whether user defined shares are allowed to be accessed by non\-authenticated users or not\&. It is the equivalent of allowing people who can create a share the option of setting +\fIguest ok = yes\fR +in a share definition\&. Due to its security sensitive nature, the default is set to off\&. +.sp +Default: +\fI\fIusershare allow guests\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +usershare max shares (G) +.PP +.RS 4 +This parameter specifies the number of user defined shares that are allowed to be created by users belonging to the group owning the usershare directory\&. If set to zero (the default) user defined shares are ignored\&. +.sp +Default: +\fI\fIusershare max shares\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +usershare owner only (G) +.PP +.RS 4 +This parameter controls whether the pathname exported by a user defined shares must be owned by the user creating the user defined share or not\&. If set to True (the default) then smbd checks that the directory path being shared is owned by the user who owns the usershare file defining this share and refuses to create the share if not\&. If set to False then no such check is performed and any directory path may be exported regardless of who owns it\&. +.sp +Default: +\fI\fIusershare owner only\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +usershare path (G) +.PP +.RS 4 +This parameter specifies the absolute path of the directory on the filesystem used to store the user defined share definition files\&. This directory must be owned by root, and have no access for other, and be writable only by the group owner\&. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured)\&. Members of the group owner of this directory are the users allowed to create usershares\&. +.sp +For example, a valid usershare directory might be /usr/local/samba/lib/usershares, set up as follows\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + ls \-ld /usr/local/samba/lib/usershares/ + drwxrwx\-\-T 2 root power_users 4096 2006\-05\-05 12:27 /usr/local/samba/lib/usershares/ + +.fi +.if n \{\ +.RE +.\} +.sp +In this case, only members of the group "power_users" can create user defined shares\&. +.sp +Default: +\fI\fIusershare path\fR\fR\fI = \fR\fI/var/db/samba4/usershares\fR\fI \fR +.RE + +usershare prefix allow list (G) +.PP +.RS 4 +This parameter specifies a list of absolute pathnames the root of which are allowed to be exported by user defined share definitions\&. If the pathname to be exported doesn\*(Aqt start with one of the strings in this list, the user defined share will not be allowed\&. This allows the Samba administrator to restrict the directories on the system that can be exported by user defined shares\&. +.sp +If there is a "usershare prefix deny list" and also a "usershare prefix allow list" the deny list is processed first, followed by the allow list, thus leading to the most restrictive interpretation\&. +.sp +Default: +\fI\fIusershare prefix allow list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIusershare prefix allow list\fR\fR\fI = \fR\fI/home /data /space\fR\fI \fR +.RE + +usershare prefix deny list (G) +.PP +.RS 4 +This parameter specifies a list of absolute pathnames the root of which are NOT allowed to be exported by user defined share definitions\&. If the pathname exported starts with one of the strings in this list the user defined share will not be allowed\&. Any pathname not starting with one of these strings will be allowed to be exported as a usershare\&. This allows the Samba administrator to restrict the directories on the system that can be exported by user defined shares\&. +.sp +If there is a "usershare prefix deny list" and also a "usershare prefix allow list" the deny list is processed first, followed by the allow list, thus leading to the most restrictive interpretation\&. +.sp +Default: +\fI\fIusershare prefix deny list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIusershare prefix deny list\fR\fR\fI = \fR\fI/etc /dev /private\fR\fI \fR +.RE + +usershare template share (G) +.PP +.RS 4 +User defined shares only have limited possible parameters such as path, guest ok, etc\&. This parameter allows usershares to "cloned" from an existing share\&. If "usershare template share" is set to the name of an existing share, then all usershares created have their defaults set from the parameters set on this share\&. +.sp +The target share may be set to be invalid for real file sharing by setting the parameter "\-valid = False" on the template share definition\&. This causes it not to be seen as a real exported share but to be able to be used as a template for usershares\&. +.sp +Default: +\fI\fIusershare template share\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIusershare template share\fR\fR\fI = \fR\fItemplate_share\fR\fI \fR +.RE + +use sendfile (S) +.PP +.RS 4 +If this parameter is +\fByes\fR, and the +\fBsendfile()\fR +system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX and ReadRaw) will use the more efficient sendfile system call for files that are exclusively oplocked\&. This may make more efficient use of the system CPU\*(Aqs and cause Samba to be faster\&. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0\&.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail)\&. +.sp +Default: +\fI\fIuse sendfile\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +utmp (G) +.PP +.RS 4 +This boolean parameter is only available if Samba has been configured and compiled with the option +\-\-with\-utmp\&. If set to +\fByes\fR +then Samba will attempt to add utmp or utmpx records (depending on the UNIX system) whenever a connection is made to a Samba server\&. Sites may use this to record the user connecting to a Samba share\&. +.sp +Due to the requirements of the utmp record, we are required to create a unique identifier for the incoming user\&. Enabling this option creates an n^2 algorithm to find this number\&. This may impede performance on large installations\&. +.sp +Default: +\fI\fIutmp\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +utmp directory (G) +.PP +.RS 4 +This parameter is only available if Samba has been configured and compiled with the option +\-\-with\-utmp\&. It specifies a directory pathname that is used to store the utmp or utmpx files (depending on the UNIX system) that record user connections to a Samba server\&. By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually +/var/run/utmp +on Linux)\&. +.sp +Default: +\fI\fIutmp directory\fR\fR\fI = \fR\fI # Determined automatically\fR\fI \fR +.sp +Example: +\fI\fIutmp directory\fR\fR\fI = \fR\fI/var/run/utmp\fR\fI \fR +.RE + +\-valid (S) +.PP +.RS 4 +This parameter indicates whether a share is valid and thus can be used\&. When this parameter is set to false, the share will be in no way visible nor accessible\&. +.sp +This option should not be used by regular users but might be of help to developers\&. Samba uses this option internally to mark shares as deleted\&. +.sp +Default: +\fI\fI\-valid\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +valid users (S) +.PP +.RS 4 +This is a list of users that should be allowed to login to this service\&. Names starting with \*(Aq@\*(Aq, \*(Aq+\*(Aq and \*(Aq&\*(Aq are interpreted using the same rules as described in the +\fIinvalid users\fR +parameter\&. +.sp +If this is empty (the default) then any user can login\&. If a username is in both this list and the +\fIinvalid users\fR +list then access is denied for that user\&. +.sp +The current servicename is substituted for +\fI%S\fR\&. This is useful in the [homes] section\&. +.sp +\fINote: \fRWhen used in the [global] section this parameter may have unwanted side effects\&. For example: If samba is configured as a MASTER BROWSER (see +\fIlocal master\fR, +\fIos level\fR, +\fIdomain master\fR, +\fIpreferred master\fR) this option will prevent workstations from being able to browse the network\&. +.sp +Default: +\fI\fIvalid users\fR\fR\fI = \fR\fI # No valid users list (anyone can login) \fR\fI \fR +.sp +Example: +\fI\fIvalid users\fR\fR\fI = \fR\fIgreg, @pcusers\fR\fI \fR +.RE + +veto files (S) +.PP +.RS 4 +This is a list of files and directories that are neither visible nor accessible\&. Each entry in the list must be separated by a \*(Aq/\*(Aq, which allows spaces to be included in the entry\&. \*(Aq*\*(Aq and \*(Aq?\*(Aq can be used to specify multiple files or directories as in DOS wildcards\&. +.sp +Each entry must be a unix path, not a DOS path and must +\fInot\fR +include the unix directory separator \*(Aq/\*(Aq\&. +.sp +Note that the +\m[blue]\fBcase sensitive\fR\m[] +option is applicable in vetoing files\&. +.sp +One feature of the veto files parameter that it is important to be aware of is Samba\*(Aqs behaviour when trying to delete a directory\&. If a directory that is to be deleted contains nothing but veto files this deletion will +\fIfail\fR +unless you also set the +\m[blue]\fBdelete veto files\fR\m[] +parameter to +\fIyes\fR\&. +.sp +Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned\&. +.sp +Examples of use include: +.sp +.if n \{\ +.RS 4 +.\} +.nf +; Veto any files containing the word Security, +; any ending in \&.tmp, and any directory containing the +; word root\&. +veto files = /*Security*/*\&.tmp/*root*/ + +; Veto the Apple specific files that a NetAtalk server +; creates\&. +veto files = /\&.AppleDouble/\&.bin/\&.AppleDesktop/Network Trash Folder/ +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIveto files\fR\fR\fI = \fR\fI # No files or directories are vetoed\fR\fI \fR +.RE + +veto oplock files (S) +.PP +.RS 4 +This parameter is only valid when the +\m[blue]\fBoplocks\fR\m[] +parameter is turned on for a share\&. It allows the Samba administrator to selectively turn off the granting of oplocks on selected files that match a wildcarded list, similar to the wildcarded list used in the +\m[blue]\fBveto files\fR\m[] +parameter\&. +.sp +You might want to do this on files that you know will be heavily contended for by clients\&. A good example of this is in the NetBench SMB benchmark program, which causes heavy client contention for files ending in +\&.SEM\&. To cause Samba not to grant oplocks on these files you would use the line (either in the [global] section or in the section for the particular NetBench share\&. +.sp +An example of use is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +veto oplock files = /\&.*SEM/ +.fi +.if n \{\ +.RE +.\} +.sp +Default: +\fI\fIveto oplock files\fR\fR\fI = \fR\fI # No files are vetoed for oplock grants\fR\fI \fR +.RE + +vfs object +.PP +.RS 4 +This parameter is a synonym for +vfs objects\&. +.RE + +vfs objects (S) +.PP +.RS 4 +This parameter specifies the backend names which are used for Samba VFS I/O operations\&. By default, normal disk I/O operations are used but these can be overloaded with one or more VFS objects\&. Be aware that the definition of this parameter will overwrite a possible previous definition of the vfs objects parameter\&. +.sp +Default: +\fI\fIvfs objects\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIvfs objects\fR\fR\fI = \fR\fIextd_audit recycle\fR\fI \fR +.RE + +volume (S) +.PP +.RS 4 +This allows you to override the volume label returned for a share\&. Useful for CDROMs with installation programs that insist on a particular volume label\&. +.sp +Default: +\fI\fIvolume\fR\fR\fI = \fR\fI # the name of the share\fR\fI \fR +.RE + +wide links (S) +.PP +.RS 4 +This parameter controls whether or not links in the UNIX file system may be followed by the server\&. Links that point to areas within the directory tree exported by the server are always allowed; this parameter controls access only to areas that are outside the directory tree being exported\&. +.sp +Note: Turning this parameter on when UNIX extensions are enabled will allow UNIX clients to create symbolic links on the share that can point to files or directories outside restricted path exported by the share definition\&. This can cause access to areas outside of the share\&. Due to this problem, this parameter will be automatically disabled (with a message in the log file) if the +\m[blue]\fBunix extensions\fR\m[] +option is on\&. +.sp +See the parameter +\m[blue]\fBallow insecure wide links\fR\m[] +if you wish to change this coupling between the two parameters\&. +.sp +Default: +\fI\fIwide links\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winbind cache time (G) +.PP +.RS 4 +This parameter specifies the number of seconds the +\fBwinbindd\fR(8) +daemon will cache user and group information before querying a Windows NT server again\&. +.sp +This does not apply to authentication requests, these are always evaluated in real time unless the +\m[blue]\fBwinbind offline logon\fR\m[] +option has been enabled\&. +.sp +Default: +\fI\fIwinbind cache time\fR\fR\fI = \fR\fI300\fR\fI \fR +.RE + +winbindd socket directory (G) +.PP +.RS 4 +This setting controls the location of the winbind daemon\*(Aqs socket\&. +.sp +Except within automated test scripts, this should not be altered, as the client tools (nss_winbind etc) do not honour this parameter\&. Client tools must then be advised of the altered path with the WINBINDD_SOCKET_DIR environment variable\&. +.sp +Default: +\fI\fIwinbindd socket directory\fR\fR\fI = \fR\fI/var/run/samba4/winbindd\fR\fI \fR +.RE + +winbind enum groups (G) +.PP +.RS 4 +On large installations using +\fBwinbindd\fR(8) +it may be necessary to suppress the enumeration of groups through the +setgrent(), +getgrent() +and +endgrent() +group of system calls\&. If the +\fIwinbind enum groups\fR +parameter is +\fBno\fR, calls to the +getgrent() +system call will not return any data\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Turning off group enumeration may cause some programs to behave oddly\&. +.sp .5v +.RE +Default: +\fI\fIwinbind enum groups\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winbind enum users (G) +.PP +.RS 4 +On large installations using +\fBwinbindd\fR(8) +it may be necessary to suppress the enumeration of users through the +setpwent(), +getpwent() +and +endpwent() +group of system calls\&. If the +\fIwinbind enum users\fR +parameter is +\fBno\fR, calls to the +getpwent +system call will not return any data\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +Turning off user enumeration may cause some programs to behave oddly\&. For example, the finger program relies on having access to the full user list when searching for matching usernames\&. +.sp .5v +.RE +Default: +\fI\fIwinbind enum users\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winbind expand groups (G) +.PP +.RS 4 +This option controls the maximum depth that winbindd will traverse when flattening nested group memberships of Windows domain groups\&. This is different from the +\m[blue]\fBwinbind nested groups\fR\m[] +option which implements the Windows NT4 model of local group nesting\&. The "winbind expand groups" parameter specifically applies to the membership of domain groups\&. +.sp +This option also affects the return of non nested group memberships of Windows domain users\&. With the new default "winbind expand groups = 0" winbind does not query group memberships at all\&. +.sp +Be aware that a high value for this parameter can result in system slowdown as the main parent winbindd daemon must perform the group unrolling and will be unable to answer incoming NSS or authentication requests during this time\&. +.sp +The default value was changed from 1 to 0 with Samba 4\&.2\&. Some broken applications (including some implementations of newgrp and sg) calculate the group memberships of users by traversing groups, such applications will require "winbind expand groups = 1"\&. But the new default makes winbindd more reliable as it doesn\*(Aqt require SAMR access to domain controllers of trusted domains\&. +.sp +Default: +\fI\fIwinbind expand groups\fR\fR\fI = \fR\fI0\fR\fI \fR +.RE + +winbind:ignore domains (G) +.PP +.RS 4 +Allows one to enter a list of trusted domains winbind should ignore (untrust)\&. This can avoid the overhead of resources from attempting to login to DCs that should not be communicated with\&. +.sp +Default: +\fI\fIwinbind:ignore domains\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIwinbind:ignore domains\fR\fR\fI = \fR\fIDOMAIN1, DOMAIN2\fR\fI \fR +.RE + +winbind max clients (G) +.PP +.RS 4 +This parameter specifies the maximum number of clients the +\fBwinbindd\fR(8) +daemon can connect with\&. The parameter is not a hard limit\&. The +\fBwinbindd\fR(8) +daemon configures itself to be able to accept at least that many connections, and if the limit is reached, an attempt is made to disconnect idle clients\&. +.sp +Default: +\fI\fIwinbind max clients\fR\fR\fI = \fR\fI200\fR\fI \fR +.RE + +winbind max domain connections (G) +.PP +.RS 4 +This parameter specifies the maximum number of simultaneous connections that the +\fBwinbindd\fR(8) +daemon should open to the domain controller of one domain\&. Setting this parameter to a value greater than 1 can improve scalability with many simultaneous winbind requests, some of which might be slow\&. +.sp +Note that if +\m[blue]\fBwinbind offline logon\fR\m[] +is set to +\fBYes\fR, then only one DC connection is allowed per domain, regardless of this setting\&. +.sp +Default: +\fI\fIwinbind max domain connections\fR\fR\fI = \fR\fI1\fR\fI \fR +.sp +Example: +\fI\fIwinbind max domain connections\fR\fR\fI = \fR\fI10\fR\fI \fR +.RE + +winbind nested groups (G) +.PP +.RS 4 +If set to yes, this parameter activates the support for nested groups\&. Nested groups are also called local groups or aliases\&. They work like their counterparts in Windows: Nested groups are defined locally on any machine (they are shared between DC\*(Aqs through their SAM) and can contain users and global groups from any trusted SAM\&. To be able to use nested groups, you need to run nss_winbind\&. +.sp +Default: +\fI\fIwinbind nested groups\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind normalize names (G) +.PP +.RS 4 +This parameter controls whether winbindd will replace whitespace in user and group names with an underscore (_) character\&. For example, whether the name "Space Kadet" should be replaced with the string "space_kadet"\&. Frequently Unix shell scripts will have difficulty with usernames contains whitespace due to the default field separator in the shell\&. If your domain possesses names containing the underscore character, this option may cause problems unless the name aliasing feature is supported by your nss_info plugin\&. +.sp +This feature also enables the name aliasing API which can be used to make domain user and group names to a non\-qualified version\&. Please refer to the manpage for the configured idmap and nss_info plugin for the specifics on how to configure name aliasing for a specific configuration\&. Name aliasing takes precedence (and is mutually exclusive) over the whitespace replacement mechanism discussed previously\&. +.sp +Default: +\fI\fIwinbind normalize names\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIwinbind normalize names\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind nss info (G) +.PP +.RS 4 +This parameter is designed to control how Winbind retrieves Name Service Information to construct a user\*(Aqs home directory and login shell\&. Currently the following settings are available: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fItemplate\fR +\- The default, using the parameters of +\fItemplate shell\fR +and +\fItemplate homedir\fR) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI\fR +\- When Samba is running in security = ads and your Active Directory Domain Controller does support the Microsoft "Services for Unix" (SFU) LDAP schema, winbind can retrieve the login shell and the home directory attributes directly from your Directory Server\&. For SFU 3\&.0 or 3\&.5 simply choose "sfu", if you use SFU 2\&.0 please choose "sfu20"\&. +.sp +Note that for the idmap backend +idmap_ad +you need to configure those settings in the idmap configuration section\&. Make sure to consult the documentation of the idmap backend that you are using\&. +.RE +.sp +.RE +.sp +Default: +\fI\fIwinbind nss info\fR\fR\fI = \fR\fItemplate\fR\fI \fR +.sp +Example: +\fI\fIwinbind nss info\fR\fR\fI = \fR\fIsfu\fR\fI \fR +.RE + +winbind offline logon (G) +.PP +.RS 4 +This parameter is designed to control whether Winbind should allow one to login with the +\fIpam_winbind\fR +module using Cached Credentials\&. If enabled, winbindd will store user credentials from successful logins encrypted in a local cache\&. +.sp +Default: +\fI\fIwinbind offline logon\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIwinbind offline logon\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind reconnect delay (G) +.PP +.RS 4 +This parameter specifies the number of seconds the +\fBwinbindd\fR(8) +daemon will wait between attempts to contact a Domain controller for a domain that is determined to be down or not contactable\&. +.sp +Default: +\fI\fIwinbind reconnect delay\fR\fR\fI = \fR\fI30\fR\fI \fR +.RE + +winbind refresh tickets (G) +.PP +.RS 4 +This parameter is designed to control whether Winbind should refresh Kerberos Tickets retrieved using the +\fIpam_winbind\fR +module\&. +.sp +Default: +\fI\fIwinbind refresh tickets\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIwinbind refresh tickets\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind request timeout (G) +.PP +.RS 4 +This parameter specifies the number of seconds the +\fBwinbindd\fR(8) +daemon will wait before disconnecting either a client connection with no outstanding requests (idle) or a client connection with a request that has remained outstanding (hung) for longer than this number of seconds\&. +.sp +Default: +\fI\fIwinbind request timeout\fR\fR\fI = \fR\fI60\fR\fI \fR +.RE + +winbind rpc only (G) +.PP +.RS 4 +Setting this parameter to +yes +forces winbindd to use RPC instead of LDAP to retrieve information from Domain Controllers\&. +.sp +Default: +\fI\fIwinbind rpc only\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winbind scan trusted domains (G) +.PP +.RS 4 +This option only takes effect when the +\m[blue]\fBsecurity\fR\m[] +option is set to +\fBdomain\fR +or +\fBads\fR\&. If it is set to yes, winbindd periodically tries to scan for new trusted domains and adds them to a global list inside of winbindd\&. The list can be extracted with +wbinfo \-\-trusted\-domains \-\-verbose\&. Setting it to yes matches the behaviour of Samba 4\&.7 and older\&. +.sp +The construction of that global list is not reliable and often incomplete in complex trust setups\&. In most situations the list is not needed any more for winbindd to operate correctly\&. E\&.g\&. for plain file serving via SMB using a simple idmap setup with +\fBautorid\fR, +\fBtdb\fR +or +\fBad\fR\&. However some more complex setups require the list, e\&.g\&. if you specify idmap backends for specific domains\&. Some pam_winbind setups may also require the global list\&. +.sp +If you have a setup that doesn\*(Aqt require the global list, you should set +\m[blue]\fBwinbind scan trusted domains = no\fR\m[]\&. +.sp +Default: +\fI\fIwinbind scan trusted domains\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winbind sealed pipes (G) +.PP +.RS 4 +This option controls whether any requests from winbindd to domain controllers pipe will be sealed\&. Disabling sealing can be useful for debugging purposes\&. +.sp +The behavior can be controlled per netbios domain by using \*(Aqwinbind sealed pipes:NETBIOSDOMAIN = no\*(Aq as option\&. +.sp +Default: +\fI\fIwinbind sealed pipes\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind separator (G) +.PP +.RS 4 +This parameter allows an admin to define the character used when listing a username of the form of +\fIDOMAIN \fR\e\fIuser\fR\&. This parameter is only applicable when using the +pam_winbind\&.so +and +nss_winbind\&.so +modules for UNIX services\&. +.sp +Please note that setting this parameter to + causes problems with group membership at least on glibc systems, as the character + is used as a special character for NIS in /etc/group\&. +.sp +Default: +\fI\fIwinbind separator\fR\fR\fI = \fR\fI\e\fR\fI \fR +.sp +Example: +\fI\fIwinbind separator\fR\fR\fI = \fR\fI+\fR\fI \fR +.RE + +winbind use default domain (G) +.PP +.RS 4 +This parameter specifies whether the +\fBwinbindd\fR(8) +daemon should operate on users without domain component in their username\&. Users without a domain component are treated as is part of the winbindd server\*(Aqs own domain\&. While this does not benefit Windows users, it makes SSH, FTP and e\-mail function in a way much closer to the way they would in a native unix system\&. +.sp +This option should be avoided if possible\&. It can cause confusion about responsibilities for a user or group\&. In many situations it is not clear whether winbind or /etc/passwd should be seen as authoritative for a user, likewise for groups\&. +.sp +Default: +\fI\fIwinbind use default domain\fR\fR\fI = \fR\fIno\fR\fI \fR +.sp +Example: +\fI\fIwinbind use default domain\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +winbind use krb5 enterprise principals (G) +.PP +.RS 4 +winbindd is able to get kerberos tickets for pam_winbind with krb5_auth or wbinfo \-K/\-\-krb5auth=\&. +.sp +winbindd (at least on a domain member) is never be able to have a complete picture of the trust topology (which is managed by the DCs)\&. There might be uPNSuffixes and msDS\-SPNSuffixes values, which don\*(Aqt belong to any AD domain at all\&. +.sp +With +\m[blue]\fBwinbind scan trusted domains = no\fR\m[] +winbindd doesn\*(Aqt even get a complete picture of the topology\&. +.sp +It is not really required to know about the trust topology\&. We can just rely on the [K]DCs of our primary domain (e\&.g\&. PRIMARY\&.A\&.EXAMPLE\&.COM) and use enterprise principals e\&.g\&. upnfromB@B\&.EXAMPLE\&.COM@PRIMARY\&.A\&.EXAMPLE\&.COM and follow the WRONG_REALM referrals in order to find the correct DC\&. The final principal might be userfromB@INTERNALB\&.EXAMPLE\&.PRIVATE\&. +.sp +With +\m[blue]\fBwinbind use krb5 enterprise principals = yes\fR\m[] +winbindd enterprise principals will be used\&. +.sp +Default: +\fI\fIwinbind use krb5 enterprise principals\fR\fR\fI = \fR\fIyes\fR\fI \fR +.sp +Example: +\fI\fIwinbind use krb5 enterprise principals\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +winsdb:local_owner (G) +.PP +.RS 4 +This specifies the address that is stored in the winsOwner attribute, of locally registered winsRecord\-objects\&. The default is to use the ip\-address of the first network interface\&. +.sp +\fINo default\fR +.RE + +winsdb:dbnosync (G) +.PP +.RS 4 +This parameter disables fsync() after changes of the WINS database\&. +.sp +Default: +\fI\fIwinsdb:dbnosync\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +wins hook (G) +.PP +.RS 4 +When Samba is running as a WINS server this allows you to call an external program for all changes to the WINS database\&. The primary use for this option is to allow the dynamic update of external name resolution databases such as dynamic DNS\&. +.sp +The wins hook parameter specifies the name of a script or executable that will be called as follows: +.sp +wins_hook operation name nametype ttl IP_list +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The first argument is the operation and is one of "add", "delete", or "refresh"\&. In most cases the operation can be ignored as the rest of the parameters provide sufficient information\&. Note that "refresh" may sometimes be called when the name has not previously been added, in that case it should be treated as an add\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The second argument is the NetBIOS name\&. If the name is not a legal name then the wins hook is not called\&. Legal names contain only letters, digits, hyphens, underscores and periods\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The third argument is the NetBIOS name type as a 2 digit hexadecimal number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The fourth argument is the TTL (time to live) for the name in seconds\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The fifth and subsequent arguments are the IP addresses currently registered for that name\&. If this list is empty then the name should be deleted\&. +.RE +.sp +.RE +An example script that calls the BIND dynamic DNS update program +nsupdate +is provided in the examples directory of the Samba source code\&. +.sp +\fINo default\fR +.RE + +wins proxy (G) +.PP +.RS 4 +This is a boolean that controls if +\fBnmbd\fR(8) +will respond to broadcast name queries on behalf of other hosts\&. You may need to set this to +\fByes\fR +for some older clients\&. +.sp +Default: +\fI\fIwins proxy\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +wins server (G) +.PP +.RS 4 +This specifies the IP address (or DNS name: IP address for preference) of the WINS server that +\fBnmbd\fR(8) +should register with\&. If you have a WINS server on your network then you should set this to the WINS server\*(Aqs IP\&. +.sp +You should point this at your WINS server if you have a multi\-subnetted network\&. +.sp +If you want to work in multiple namespaces, you can give every wins server a \*(Aqtag\*(Aq\&. For each tag, only one (working) server will be queried for a name\&. The tag should be separated from the ip address by a colon\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +You need to set up Samba to point to a WINS server if you have multiple subnets and wish cross\-subnet browsing to work correctly\&. +.sp .5v +.RE +See the chapter in the Samba3\-HOWTO on Network Browsing\&. +.sp +Default: +\fI\fIwins server\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIwins server\fR\fR\fI = \fR\fImary:192\&.9\&.200\&.1 fred:192\&.168\&.3\&.199 mary:192\&.168\&.2\&.61 # For this example when querying a certain name, 192\&.19\&.200\&.1 will be asked first and if that doesn\*(Aqt respond 192\&.168\&.2\&.61\&. If either of those doesn\*(Aqt know the name 192\&.168\&.3\&.199 will be queried\&.\fR\fI \fR +.sp +Example: +\fI\fIwins server\fR\fR\fI = \fR\fI192\&.9\&.200\&.1 192\&.168\&.2\&.61\fR\fI \fR +.RE + +wins support (G) +.PP +.RS 4 +This boolean controls if the +\fBnmbd\fR(8) +process in Samba will act as a WINS server\&. You should not set this to +\fByes\fR +unless you have a multi\-subnetted network and you wish a particular +nmbd +to be your WINS server\&. Note that you should +\fINEVER\fR +set this to +\fByes\fR +on more than one machine in your network\&. +.sp +Default: +\fI\fIwins support\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +workgroup (G) +.PP +.RS 4 +This controls what workgroup your server will appear to be in when queried by clients\&. Note that this parameter also controls the Domain name used with the +\m[blue]\fBsecurity = domain\fR\m[] +setting\&. +.sp +Default: +\fI\fIworkgroup\fR\fR\fI = \fR\fIWORKGROUP\fR\fI \fR +.sp +Example: +\fI\fIworkgroup\fR\fR\fI = \fR\fIMYGROUP\fR\fI \fR +.RE + +wreplsrv:periodic_interval (G) +.PP +.RS 4 +This maximum interval in seconds between 2 periodically scheduled runs where we check for wins\&.ldb changes and do push notifications to our push partners\&. Also wins_config\&.ldb changes are checked in that interval and partner configuration reloads are done\&. +.sp +Default: +\fI\fIwreplsrv:periodic_interval\fR\fR\fI = \fR\fI15\fR\fI \fR +.RE + +wreplsrv:propagate name releases (G) +.PP +.RS 4 +If this parameter is enabled, then explicit (from the client) and implicit (via the scavenging) name releases are propagated to the other servers directly, even if there are still other addresses active, this applies to SPECIAL GROUP (2) and MULTIHOMED (3) entries\&. Also the replication conflict merge algorithm for SPECIAL GROUP (2) entries discards replica addresses where the address owner is the local server, if the address was not stored locally before\&. The merge result is propagated directly in case an address was discarded\&. A Windows servers doesn\*(Aqt propagate name releases of SPECIAL GROUP (2) and MULTIHOMED (3) entries directly, which means that Windows servers may return different results to name queries for SPECIAL GROUP (2) and MULTIHOMED (3) names\&. The option doesn\*(Aqt have much negative impact if Windows servers are around, but be aware that they might return unexpected results\&. +.sp +Default: +\fI\fIwreplsrv:propagate name releases\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +wreplsrv:scavenging_interval (G) +.PP +.RS 4 +This is the interval in s between 2 scavenging runs which clean up the WINS database and changes the states of expired name records\&. Defaults to half of the value of wreplsrv:renew_interval\&. +.sp +\fINo default\fR +.RE + +wreplsrv:tombstone_extra_timeout (G) +.PP +.RS 4 +This is the time in s the server needs to be up till we\*(Aqll remove tombstone records from our database\&. Defaults to 3 days\&. +.sp +Default: +\fI\fIwreplsrv:tombstone_extra_timeout\fR\fR\fI = \fR\fI259200\fR\fI \fR +.RE + +wreplsrv:tombstone_interval (G) +.PP +.RS 4 +This is the interval in s till released records of the WINS server become tombstone\&. Defaults to 6 days\&. +.sp +Default: +\fI\fIwreplsrv:tombstone_interval\fR\fR\fI = \fR\fI518400\fR\fI \fR +.RE + +wreplsrv:tombstone_timeout (G) +.PP +.RS 4 +This is the interval in s till tombstone records are deleted from the WINS database\&. Defaults to 1 day\&. +.sp +Default: +\fI\fIwreplsrv:tombstone_timeout\fR\fR\fI = \fR\fI86400\fR\fI \fR +.RE + +wreplsrv:verify_interval (G) +.PP +.RS 4 +This is the interval in s till we verify active replica records with the owning WINS server\&. Unfortunately not implemented yet\&. Defaults to 24 days\&. +.sp +Default: +\fI\fIwreplsrv:verify_interval\fR\fR\fI = \fR\fI2073600\fR\fI \fR +.RE + +writable +.PP +.RS 4 +This parameter is a synonym for +writeable\&. +.RE + +write ok +.PP +.RS 4 +This parameter is a synonym for +writeable\&. +.RE + +writeable (S) +.PP +.RS 4 +Inverted synonym for +\m[blue]\fBread only\fR\m[]\&. +.sp +Default: +\fI\fIwriteable\fR\fR\fI = \fR\fIno\fR\fI \fR +.RE + +write list (S) +.PP +.RS 4 +This is a list of users that are given read\-write access to a service\&. If the connecting user is in this list then they will be given write access, no matter what the +\m[blue]\fBread only\fR\m[] +option is set to\&. The list can include group names using the @group syntax\&. +.sp +Note that if a user is in both the read list and the write list then they will be given write access\&. +.sp +Default: +\fI\fIwrite list\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIwrite list\fR\fR\fI = \fR\fIadmin, root, @staff\fR\fI \fR +.RE + +write raw (G) +.PP +.RS 4 +This is ignored if +\m[blue]\fBasync smb echo handler\fR\m[] +is set, because this feature is incompatible with raw write SMB requests +.sp +If enabled, raw writes allow writes of 65535 bytes in one packet\&. This typically provides a major performance benefit for some very, very old clients\&. +.sp +However, some clients either negotiate the allowable block size incorrectly or are incapable of supporting larger block sizes, and for these clients you may need to disable raw writes\&. +.sp +In general this parameter should be viewed as a system tuning tool and left severely alone\&. +.sp +Default: +\fI\fIwrite raw\fR\fR\fI = \fR\fIyes\fR\fI \fR +.RE + +wtmp directory (G) +.PP +.RS 4 +This parameter is only available if Samba has been configured and compiled with the option +\-\-with\-utmp\&. It specifies a directory pathname that is used to store the wtmp or wtmpx files (depending on the UNIX system) that record user connections to a Samba server\&. The difference with the utmp directory is the fact that user info is kept after a user has logged out\&. +.sp +By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually +/var/run/wtmp +on Linux)\&. +.sp +Default: +\fI\fIwtmp directory\fR\fR\fI = \fR\fI\fR\fI \fR +.sp +Example: +\fI\fIwtmp directory\fR\fR\fI = \fR\fI/var/log/wtmp\fR\fI \fR +.RE +.SH "WARNINGS" +.PP +Although the configuration file permits service names to contain spaces, your client software may not\&. Spaces will be ignored in comparisons anyway, so it shouldn\*(Aqt be a problem \- but be aware of the possibility\&. +.PP +On a similar note, many clients \- especially DOS clients \- limit service names to eight characters\&. +\fBsmbd\fR(8) +has no such limitation, but attempts to connect from such clients will fail if they truncate the service names\&. For this reason you should probably keep your service names down to eight characters in length\&. +.PP +Use of the +[homes] +and +[printers] +special sections make life for an administrator easy, but the various combinations of default attributes can be tricky\&. Take extreme care when designing these sections\&. In particular, ensure that the permissions on spool directories are correct\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsamba\fR(7), +\fBsmbpasswd\fR(8), +\fBsmbd\fR(8), +\fBnmbd\fR(8), +\fBwinbindd\fR(8), +\fBsamba\fR(8), +\fBsamba-tool\fR(8), +\fBsmbclient\fR(1), +\fBnmblookup\fR(1), +\fBtestparm\fR(1)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smbcacls.1 b/net/samba416/files/man/smbcacls.1 new file mode 100644 index 000000000000..b3cf79acd71b --- /dev/null +++ b/net/samba416/files/man/smbcacls.1 @@ -0,0 +1,1044 @@ +'\" t +.\" Title: smbcacls +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBCACLS" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbcacls \- Set or get ACLs on an NT file or directory names +.SH "SYNOPSIS" +.HP \w'\ 'u +smbcacls {//server/share} {/filename} [\-D|\-\-delete=ACL] [\-M|\-\-modify=ACL] [\-a|\-\-add=ACL] [\-S|\-\-set=ACLS] [\-C|\-\-chown=USERNAME] [\-G|\-\-chgrp=GROUPNAME] [\-I|\-\-inherit=STRING] [\-\-propagate\-inheritance] [\-\-numeric] [\-\-sddl] [\-\-query\-security\-info=INT] [\-\-set\-security\-info=INT] [\-t|\-\-test\-args] [\-\-domain\-sid=SID] [\-x|\-\-maximum\-access] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +The +smbcacls +program manipulates NT Access Control Lists (ACLs) on SMB file shares\&. An ACL is comprised zero or more Access Control Entries (ACEs), which define access restrictions for a specific user or group\&. +.SH "OPTIONS" +.PP +The following options are available to the +smbcacls +program\&. The format of ACLs is described in the section ACL FORMAT +.PP +\-a|\-\-add acl +.RS 4 +Add the entries specified to the ACL\&. Existing access control entries are unchanged\&. +.RE +.PP +\-M|\-\-modify acl +.RS 4 +Modify the mask value (permissions) for the ACEs specified on the command line\&. An error will be printed for each ACE specified that was not already present in the object\*(Aqs ACL\&. +.RE +.PP +\-D|\-\-delete acl +.RS 4 +Delete any ACEs specified on the command line\&. An error will be printed for each ACE specified that was not already present in the object\*(Aqs ACL\&. +.RE +.PP +\-S|\-\-set acl +.RS 4 +This command sets the ACL on the object with only what is specified on the command line\&. Any existing ACL is erased\&. Note that the ACL specified must contain at least a revision, type, owner and group for the call to succeed\&. +.RE +.PP +\-C|\-\-chown name +.RS 4 +The owner of a file or directory can be changed to the name given using the +\fI\-C\fR +option\&. The name can be a sid in the form S\-1\-x\-y\-z or a name resolved against the server specified in the first argument\&. +.sp +This command is a shortcut for \-M OWNER:name\&. +.RE +.PP +\-G|\-\-chgrp name +.RS 4 +The group owner of a file or directory can be changed to the name given using the +\fI\-G\fR +option\&. The name can be a sid in the form S\-1\-x\-y\-z or a name resolved against the server specified n the first argument\&. +.sp +This command is a shortcut for \-M GROUP:name\&. +.RE +.PP +\-I|\-\-inherit allow|remove|copy +.RS 4 +Set or unset the windows "Allow inheritable permissions" check box using the +\fI\-I\fR +option\&. To set the check box pass allow\&. To unset the check box pass either remove or copy\&. Remove will remove all inherited ACEs\&. Copy will copy all the inherited ACEs\&. +.RE +.PP +\-\-propagate\-inheritance +.RS 4 +Add, modify, delete or set ACEs on an entire directory tree according to the inheritance flags\&. Refer to the INHERITANCE section for details\&. +.RE +.PP +\-\-numeric +.RS 4 +This option displays all ACL information in numeric format\&. The default is to convert SIDs to names and ACE types and masks to a readable string format\&. +.RE +.PP +\-m|\-\-max\-protocol PROTOCOL_NAME +.RS 4 +This allows the user to select the highest SMB protocol level that smbcacls will use to connect to the server\&. By default this is set to NT1, which is the highest available SMB1 protocol\&. To connect using SMB2 or SMB3 protocol, use the strings SMB2 or SMB3 respectively\&. Note that to connect to a Windows 2012 server with encrypted transport selecting a max\-protocol of SMB3 is required\&. +.RE +.PP +\-t|\-\-test\-args +.RS 4 +Don\*(Aqt actually do anything, only validate the correctness of the arguments\&. +.RE +.PP +\-\-query\-security\-info FLAGS +.RS 4 +The security\-info flags for queries\&. +.RE +.PP +\-\-set\-security\-info FLAGS +.RS 4 +The security\-info flags for queries\&. +.RE +.PP +\-\-sddl +.RS 4 +Output and input acls in sddl format\&. +.RE +.PP +\-\-domain\-sid SID +.RS 4 +SID used for sddl processing\&. +.RE +.PP +\-x|\-\-maximum\-access +.RS 4 +When displaying an ACL additionally query the server for effective maximum permissions\&. Note that this is only supported with SMB protocol version 2 or higher\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER +.RS 4 +This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best ist to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the +\fBlmhosts\fR(5) +for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR: Do a standard host name to IP address resolution, using the system +/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR: Query a name with the IP address listed in the +\fIwins server\fR +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the +\fIinterfaces\fR +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +If this parameter is not set then the name resolve order defined in the +smb\&.conf +file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&. +.sp +The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the +\m[blue]\fBname resolve order\fR\m[] +parameter of the +smb\&.conf +file, the name resolution methods will be attempted in this order\&. +.RE +.PP +\-O|\-\-socket\-options=SOCKETOPTIONS +.RS 4 +TCP socket options to set on the client socket\&. See the socket options parameter in the +smb\&.conf +manual page for the list of valid options\&. +.RE +.PP +\-m|\-\-max\-protocol=MAXPROTOCOL +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient max protocol\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-n|\-\-netbiosname=NETBIOSNAME +.RS 4 +This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the +\m[blue]\fBnetbios name\fR\m[] +parameter in the +smb\&.conf +file\&. However, a command line setting will take precedence over settings in +smb\&.conf\&. +.RE +.PP +\-\-netbios\-scope=SCOPE +.RS 4 +This specifies a NetBIOS scope that +nmblookup +will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are +\fIvery\fR +rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. +.RE +.PP +\-W|\-\-workgroup=WORKGROUP +.RS 4 +Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBworkgroup\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-r|\-\-realm=REALM +.RS 4 +Set the realm for the domain\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBrealm\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "ACL FORMAT" +.PP +The format of an ACL is one or more entries separated by either commas or newlines\&. An ACL entry is one of the following: +.PP +.if n \{\ +.RS 4 +.\} +.nf + +REVISION: +OWNER: +GROUP: +ACL::// +.fi +.if n \{\ +.RE +.\} +.PP +Control bits related to automatic inheritance +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIOD\fR +\- "Owner Defaulted" \- Indicates that the SID of the owner of the security descriptor was provided by a default mechanism\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIGD\fR +\- "Group Defaulted" \- Indicates that the SID of the security descriptor group was provided by a default mechanism\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIDP\fR +\- "DACL Present" \- Indicates a security descriptor that has a discretionary access control list (DACL)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIDD\fR +\- "DACL Defaulted" \- Indicates a security descriptor with a default DACL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISP\fR +\- "SACL Present" \- Indicates a security descriptor that has a system access control list (SACL)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISD\fR +\- "SACL Defaulted" \- A default mechanism, rather than the original provider of the security descriptor, provided the SACL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIDT\fR +\- "DACL Trusted" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISS\fR +\- "Server Security" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIDR\fR +\- "DACL Inheritance Required" \- Indicates a required security descriptor in which the DACL is set up to support automatic propagation of inheritable access control entries (ACEs) to existing child objects\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISR\fR +\- "SACL Inheritance Required" \- Indicates a required security descriptor in which the SACL is set up to support automatic propagation of inheritable ACEs to existing child objects\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIDI\fR +\- "DACL Auto Inherited" \- Indicates a security descriptor in which the DACL is set up to support automatic propagation of inheritable access control entries (ACEs) to existing child objects\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISI\fR +\- "SACL Auto Inherited" \- Indicates a security descriptor in which the SACL is set up to support automatic propagation of inheritable ACEs to existing child objects\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIPD\fR +\- "DACL Protected" \- Prevents the DACL of the security descriptor from being modified by inheritable ACEs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIPS\fR +\- "SACL Protected" \- Prevents the SACL of the security descriptor from being modified by inheritable ACEs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIRM\fR +\- "RM Control Valid" \- Indicates that the resource manager control is valid\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISR\fR +\- "Self Relative" \- Indicates a self\-relative security descriptor\&. +.RE +.sp +.RE +.PP +The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor\&. If not specified it defaults to 1\&. Using values other than 1 may cause strange behaviour\&. +.PP +The owner and group specify the owner and group sids for the object\&. If a SID in the format S\-1\-x\-y\-z is specified this is used, otherwise the name specified is resolved using the server on which the file or directory resides\&. +.PP +ACEs are specified with an "ACL:" prefix, and define permissions granted to an SID\&. The SID again can be specified in S\-1\-x\-y\-z format or as a name in which case it is resolved against the server on which the file or directory resides\&. The type, flags and mask values determine the type of access granted to the SID\&. +.PP +The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. +.PP +The flags field defines how the ACE should be considered when performing inheritance\&. +smbcacls +uses these flags when run with +\fI\-\-propagate\-inheritance\fR\&. +.PP +Flags can be specified as decimal or hexadecimal values, or with the respective (XX) aliases, separated by a vertical bar "|"\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI(OI)\fR +Object Inherit 0x1 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI(CI)\fR +Container Inherit 0x2 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI(NP)\fR +No Propagate Inherit 0x4 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI(IO)\fR +Inherit Only 0x8 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fI(I)\fR +ACE was inherited 0x10 +.RE +.sp +.RE +.PP +The mask is a value which expresses the access right granted to the SID\&. It can be given as a decimal or hexadecimal value, or by using one of the following text strings which map to the NT file permissions of the same name\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIR\fR +\- Allow read access +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIW\fR +\- Allow write access +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIX\fR +\- Execute permission on the object +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fID\fR +\- Delete the object +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIP\fR +\- Change permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIO\fR +\- Take ownership +.RE +.sp +.RE +.PP +The following combined permissions can be specified: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIREAD\fR +\- Equivalent to \*(AqRX\*(Aq permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fICHANGE\fR +\- Equivalent to \*(AqRXWD\*(Aq permissions +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIFULL\fR +\- Equivalent to \*(AqRWXDPO\*(Aq permissions +.RE +.SH "INHERITANCE" +.PP +Per\-ACE inheritance flags can be set in the ACE flags field\&. By default, inheritable ACEs e\&.g\&. those marked for object inheritance (OI) or container inheritance (CI), are not propagated to sub\-files or folders\&. However, with the +\fI\-\-propagate\-inheritance\fR +argument specified, such ACEs are automatically propagated according to some inheritance rules\&. +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Inheritable (OI)(OI) ACE flags can only be applied to folders\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Any inheritable ACEs applied to sub\-files or folders are marked with the inherited (I) flag\&. Inheritable ACE(s) are applied to folders unless the no propagation (NP) flag is set\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When an ACE with the (OI) flag alone set is progagated to a child folder the inheritance only flag (IO) is also applied\&. This indicates the permissions associated with the ACE don\*(Aqt apply to the folder itself (only to it\*(Aqs child files)\&. When applying the ACE to a child file the ACE is inherited as normal\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When an ace with the (CI) flag alone set is propagated to a child file there is no effect, when propagated to a child folder it is inherited as normal\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When an ACE that has both (OI) & (CI) flags set the ACE is inherited as normal by both folders and files\&. +.RE +.sp +.RE +.PP +(OI)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-parent/ (OI)(READ) +| +\-file\&.1 (I)(READ) +| +\-nested/ (OI)(IO)(I)(READ) + | +\-file\&.2 (I)(READ) +.fi +.if n \{\ +.RE +.\} +.PP +(CI)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-parent/ (CI)(READ) +| +\-file\&.1 +| +\-nested/ (CI)(I)(READ) + | +\-file\&.2 +.fi +.if n \{\ +.RE +.\} +.PP +(OI)(CI)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-parent/ (OI)(CI)(READ) +| +\-file\&.1 (I)(READ) +| +\-nested/ (OI)(CI)(I)(READ) + | +\-file\&.2 (I)(READ) +.fi +.if n \{\ +.RE +.\} +.PP +(OI)(NP)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-oi_dir/ (OI)(NP)(READ) +| +\-file\&.1 (I)(READ) +| +\-nested/ +| +\-file\&.2 +.fi +.if n \{\ +.RE +.\} +.PP +(CI)(NP)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-oi_dir/ (CI)(NP)(READ) +| +\-file\&.1 +| +\-nested/ (I)(READ) +| +\-file\&.2 +.fi +.if n \{\ +.RE +.\} +.PP +(OI)(CI)(NP)(READ) added to parent folder +.PP +.if n \{\ +.RS 4 +.\} +.nf ++\-parent/ (CI)(OI)(NP)(READ) +| +\-file\&.1 (I)(READ) +| +\-nested/ (I)(READ) +| +\-file\&.2 +.fi +.if n \{\ +.RE +.\} +.PP +Files and folders with protected ACLs do not allow inheritable permissions (set with +\fI\-I\fR)\&. Such objects will not receive ACEs flagged for inheritance with (CI) or (OI)\&. +.SH "EXIT STATUS" +.PP +The +smbcacls +program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&. +.PP +If the operation succeeded, smbcacls returns and exit status of 0\&. If +smbcacls +couldn\*(Aqt connect to the specified server, or there was an error getting or setting the ACLs, an exit status of 1 is returned\&. If there was an error parsing any command line arguments, an exit status of 2 is returned\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +smbcacls +was written by Andrew Tridgell and Tim Potter\&. +.PP +The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&. diff --git a/net/samba416/files/man/smbclient.1 b/net/samba416/files/man/smbclient.1 new file mode 100644 index 000000000000..d34e54b30353 --- /dev/null +++ b/net/samba416/files/man/smbclient.1 @@ -0,0 +1,1253 @@ +'\" t +.\" Title: smbclient +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBCLIENT" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbclient \- ftp\-like client to access SMB/CIFS resources on servers +.SH "SYNOPSIS" +.HP \w'\ 'u +smbclient [\-M|\-\-message=HOST] [\-I|\-\-ip\-address=IP] [\-E|\-\-stderr] [\-L|\-\-list=HOST] [\-T|\-\-tar=IXFvgbNan] [\-D|\-\-directory=DIR] [\-b|\-\-send\-buffer=BYTES] [\-t|\-\-timeout=SECONDS] [\-p|\-\-port=PORT] [\-g|\-\-grepable] [\-q|\-\-quiet] [\-B|\-\-browse] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-s|\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME%[PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] [\-c|\-\-command=STRING] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbclient +is a client that can \*(Aqtalk\*(Aq to an SMB/CIFS server\&. It offers an interface similar to that of the ftp program (see +\fBftp\fR(1))\&. Operations include things like getting files from the server to the local machine, putting files from the local machine to the server, retrieving directory information from the server and so on\&. +.SH "OPTIONS" +.PP +servicename +.RS 4 +servicename is the name of the service you want to use on the server\&. A service name takes the form +//server/service +where +\fIserver \fR +is the NetBIOS name of the SMB/CIFS server offering the desired service and +\fIservice\fR +is the name of the service offered\&. Thus to connect to the service "printer" on the SMB/CIFS server "smbserver", you would use the servicename +//smbserver/printer +.sp +Note that the server name required is NOT necessarily the IP (DNS) host name of the server ! The name required is a NetBIOS server name, which may or may not be the same as the IP hostname of the machine running the server\&. +.sp +The server name is looked up according to either the +\fI\-R|\-\-name\-resolve\fR +parameter to +smbclient +or using the name resolve order parameter in the +\fBsmb.conf\fR(5) +file, allowing an administrator to change the order and methods by which server names are looked up\&. +.RE +.PP +password +.RS 4 +The password required to access the specified service on the specified server\&. If this parameter is supplied, the +\fI\-N\fR +option (suppress password prompt) is assumed\&. +.sp +There is no default password\&. If no password is supplied on the command line (either by using this parameter or adding a password to the +\fI\-U\fR +option (see below)) and the +\fI\-N\fR +option is not specified, the client will prompt for a password, even if the desired service does not require one\&. (If no password is required, simply press ENTER to provide a null password\&.) +.sp +Note: Some servers (including OS/2 and Windows for Workgroups) insist on an uppercase password\&. Lowercase or mixed case passwords may be rejected by these servers\&. +.sp +Be cautious about including passwords in scripts\&. +.RE +.PP +\-M|\-\-message NetBIOS name +.RS 4 +This options allows you to send messages, using the "WinPopup" protocol, to another computer\&. Once a connection is established you then type your message, pressing ^D (control\-D) to end\&. +.sp +If the receiving computer is running WinPopup the user will receive the message and probably a beep\&. If they are not running WinPopup the message will be lost, and no error message will occur\&. +.sp +The message is also automatically truncated if the message is over 1600 bytes, as this is the limit of the protocol\&. +.sp +One useful trick is to pipe the message through +smbclient\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file +mymessage\&.txt +to the machine FRED\&. +.sp +You may also find the +\fI\-U\fR +and +\fI\-I\fR +options useful, as they allow you to control the FROM and TO parts of the message\&. +.sp +See the +\fImessage command\fR +parameter in the +\fBsmb.conf\fR(5) +for a description of how to handle incoming WinPopup messages in Samba\&. +.sp +\fINote\fR: Copy WinPopup into the startup group on your WfWg PCs if you want them to always be able to receive messages\&. +.RE +.PP +\-p|\-\-port port +.RS 4 +This number is the TCP port number that will be used when making connections to the server\&. The standard (well\-known) TCP port number for an SMB/CIFS server is 139, which is the default\&. +.RE +.PP +\-g|\-\-grepable +.RS 4 +This parameter provides combined with +\fI\-L\fR +easy parseable output that allows processing with utilities such as grep and cut\&. +.RE +.PP +\-m|\-\-max\-protocol protocol +.RS 4 +This allows the user to select the highest SMB protocol level that smbclient will use to connect to the server\&. By default this is set to highest available SMB3 protocol version\&. To connect using SMB2 or SMB1 protocol, use the strings SMB2 or NT1 respectively\&. Note that to connect to a Windows 2012 server with encrypted transport selecting a max\-protocol of SMB3 is required\&. +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Make queries to the external server using the machine account of the local server\&. +.RE +.PP +\-I|\-\-ip\-address IP\-address +.RS 4 +\fIIP address\fR +is the address of the server to connect to\&. It should be specified in standard "a\&.b\&.c\&.d" notation\&. +.sp +Normally the client would attempt to locate a named SMB/CIFS server by looking it up via the NetBIOS name resolution mechanism described above in the +\fIname resolve order\fR +parameter above\&. Using this parameter will force the client to assume that the server is on the machine with the specified IP address and the NetBIOS name component of the resource being connected to will be ignored\&. +.sp +There is no default for this parameter\&. If not supplied, it will be determined automatically by the client as described above\&. +.RE +.PP +\-E|\-\-stderr +.RS 4 +This parameter causes the client to write messages to the standard error stream (stderr) rather than to the standard output stream\&. +.sp +By default, the client writes messages to standard output \- typically the user\*(Aqs tty\&. +.RE +.PP +\-L|\-\-list +.RS 4 +This option allows you to look at what services are available on a server\&. You use it as +smbclient \-L host +and a list should appear\&. The +\fI\-I \fR +option may be useful if your NetBIOS names don\*(Aqt match your TCP/IP DNS host names or if you are trying to reach a host on another network\&. +.RE +.PP +\-b|\-\-send\-buffer buffersize +.RS 4 +When sending or receiving files, smbclient uses an internal buffer sized by the maximum number of allowed requests to the connected server\&. This command allows this size to be set to any range between 0 (which means use the default server controlled size) bytes and 16776960 (0xFFFF00) bytes\&. Using the server controlled size is the most efficient as smbclient will pipeline as many simultaneous reads or writes needed to keep the server as busy as possible\&. Setting this to any other size will slow down the transfer\&. This can also be set using the +iosize +command inside smbclient\&. +.RE +.PP +\-B|\-\-browse +.RS 4 +Browse SMB servers using DNS\&. +.RE +.PP +\-t|\-\-timeout +.RS 4 +This allows the user to tune the default timeout used for each SMB request\&. The default setting is 20 seconds\&. Increase it if requests to the server sometimes time out\&. This can happen when SMB3 encryption is selected and smbclient is overwhelming the server with requests\&. This can also be set using the +timeout +command inside smbclient\&. +.RE +.PP +\-T|\-\-tar tar options +.RS 4 +smbclient may be used to create +tar(1) +compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIc\fR +\- Create a tar backup archive on the local system\&. Must be followed by the name of a tar file, tape device or "\-" for standard output\&. If using standard output you must turn the log level to its lowest value \-d0 to avoid corrupting your tar file\&. This flag is mutually exclusive with the +\fIx\fR +flag\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIn\fR +\- In combination with the +\fIc\fR +flag, do not actually create the archive, instead perform a dry run that attempts everything that involved in creation other than writing the file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIx\fR +\- Extract (restore) a local tar file back to a share\&. Unless the \-D option is given, the tar files will be restored from the top level of the share\&. Must be followed by the name of the tar file, device or "\-" for standard input\&. Mutually exclusive with the +\fIc\fR +flag\&. Restored files have their creation times (mtime) set to the date saved in the tar file\&. Directories currently do not get their creation dates restored properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fII\fR +\- Include files and directories\&. Is the default behavior when filenames are specified above\&. Causes files to be included in an extract or create (and therefore everything else to be excluded)\&. See example below\&. Filename globbing works in one of two ways\&. See +\fIr\fR +below\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIX\fR +\- Exclude files and directories\&. Causes files to be excluded from an extract or create\&. See example below\&. Filename globbing works in one of two ways\&. See +\fIr\fR +below\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIF\fR +\- File containing a list of files and directories\&. The +\fIF\fR +causes the name following the tarfile to create to be read as a filename that contains a list of files and directories to be included in an extract or create (and therefore everything else to be excluded)\&. See example below\&. Filename globbing works in one of two ways\&. See +\fIr\fR +below\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIb\fR +\- Blocksize\&. Must be followed by a valid (greater than zero) blocksize\&. Causes tar file to be written out in blocksize*TBLOCK (512 byte) blocks\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIg\fR +\- Incremental\&. Only back up files that have the archive bit set\&. Useful only with the +\fIc\fR +flag\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIv\fR +\- Verbose\&. Makes tar print out the files being processed\&. By default tar is not verbose\&. This is the same as tarmode verbose\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIr\fR +\- Use wildcard matching to include or exclude\&. Deprecated\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIN\fR +\- Newer than\&. Must be followed by the name of a file whose date is compared against files found on the share during a create\&. Only files newer than the file specified are backed up to the tar file\&. Useful only with the +\fIc\fR +flag\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIa\fR +\- Set archive bit\&. Causes the archive bit to be reset when a file is backed up\&. Useful with the +\fIg\fR +and +\fIc\fR +flags\&. +.RE +.sp +.RE +\fITar Long File Names\fR +.sp +smbclient\*(Aqs tar option now supports long file names both on backup and restore\&. However, the full path name of the file must be less than 1024 bytes\&. Also, when a tar archive is created, +smbclient\*(Aqs tar option places all files in the archive with relative names, not absolute names\&. +.sp +\fITar Filenames\fR +.sp +All file names can be given as DOS path names (with \*(Aq\e\e\*(Aq as the component separator) or as UNIX path names (with \*(Aq/\*(Aq as the component separator)\&. +.sp +\fIExamples\fR +.sp +Restore from tar file +backup\&.tar +into myshare on mypc (no password on share)\&. +.sp +smbclient //mypc/myshare "" \-N \-Tx backup\&.tar +.sp +Restore everything except +users/docs +.sp +smbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs +.sp +Create a tar file of the files beneath +users/docs\&. +.sp +smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs +.sp +Create the same tar file as above, but now use a DOS path name\&. +.sp +smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users\eedocs +.sp +Create a tar file of the files listed in the file +tarlist\&. +.sp +smbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist +.sp +Create a tar file of all the files and directories in the share\&. +.sp +smbclient //mypc/myshare "" \-N \-Tc backup\&.tar * +.RE +.PP +\-D|\-\-directory initial directory +.RS 4 +Change to initial directory before starting\&. Probably only of any use with the tar \-T option\&. +.RE +.PP +\-c|\-\-command command string +.RS 4 +command string is a semicolon\-separated list of commands to be executed instead of prompting from stdin\&. +\fI \-N\fR +is implied by +\fI\-c\fR\&. +.sp +This is particularly useful in scripts and for printing stdin to the server, e\&.g\&. +\-c \*(Aqprint \-\*(Aq\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER +.RS 4 +This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best ist to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the +\fBlmhosts\fR(5) +for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR: Do a standard host name to IP address resolution, using the system +/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR: Query a name with the IP address listed in the +\fIwins server\fR +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the +\fIinterfaces\fR +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +If this parameter is not set then the name resolve order defined in the +smb\&.conf +file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&. +.sp +The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the +\m[blue]\fBname resolve order\fR\m[] +parameter of the +smb\&.conf +file, the name resolution methods will be attempted in this order\&. +.RE +.PP +\-O|\-\-socket\-options=SOCKETOPTIONS +.RS 4 +TCP socket options to set on the client socket\&. See the socket options parameter in the +smb\&.conf +manual page for the list of valid options\&. +.RE +.PP +\-m|\-\-max\-protocol=MAXPROTOCOL +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient max protocol\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-n|\-\-netbiosname=NETBIOSNAME +.RS 4 +This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the +\m[blue]\fBnetbios name\fR\m[] +parameter in the +smb\&.conf +file\&. However, a command line setting will take precedence over settings in +smb\&.conf\&. +.RE +.PP +\-\-netbios\-scope=SCOPE +.RS 4 +This specifies a NetBIOS scope that +nmblookup +will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are +\fIvery\fR +rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. +.RE +.PP +\-W|\-\-workgroup=WORKGROUP +.RS 4 +Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBworkgroup\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-r|\-\-realm=REALM +.RS 4 +Set the realm for the domain\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBrealm\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "OPERATIONS" +.PP +Once the client is running, the user is presented with a prompt : +.PP +smb:\e> +.PP +The backslash ("\e\e") indicates the current working directory on the server, and will change if the current working directory is changed\&. +.PP +The prompt indicates that the client is ready and waiting to carry out a user command\&. Each command is a single word, optionally followed by parameters specific to that command\&. Command and parameters are space\-delimited unless these notes specifically state otherwise\&. All commands are case\-insensitive\&. Parameters to commands may or may not be case sensitive, depending on the command\&. +.PP +You can specify file names which have spaces in them by quoting the name with double quotes, for example "a long file name"\&. +.PP +Parameters shown in square brackets (e\&.g\&., "[parameter]") are optional\&. If not given, the command will use suitable defaults\&. Parameters shown in angle brackets (e\&.g\&., "") are required\&. +.PP +Note that all commands operating on the server are actually performed by issuing a request to the server\&. Thus the behavior may vary from server to server, depending on how the server was implemented\&. +.PP +The commands available are given here in alphabetical order\&. +.PP +? [command] +.RS 4 +If +\fIcommand\fR +is specified, the ? command will display a brief informative message about the specified command\&. If no command is specified, a list of available commands will be displayed\&. +.RE +.PP +! [shell command] +.RS 4 +If +\fIshell command\fR +is specified, the ! command will execute a shell locally and run the specified shell command\&. If no command is specified, a local shell will be run\&. +.RE +.PP +allinfo file +.RS 4 +The client will request that the server return all known information about a file or directory (including streams)\&. +.RE +.PP +altname file +.RS 4 +The client will request that the server return the "alternate" name (the 8\&.3 name) for a file or directory\&. +.RE +.PP +archive +.RS 4 +Sets the archive level when operating on files\&. 0 means ignore the archive bit, 1 means only operate on files with this bit set, 2 means only operate on files with this bit set and reset it after operation, 3 means operate on all files and reset it after operation\&. The default is 0\&. +.RE +.PP +backup +.RS 4 +Toggle the state of the "backup intent" flag sent to the server on directory listings and file opens\&. If the "backup intent" flag is true, the server will try and bypass some file system checks if the user has been granted SE_BACKUP or SE_RESTORE privileges\&. This state is useful when performing a backup or restore operation\&. +.RE +.PP +blocksize +.RS 4 +Sets the blocksize parameter for a tar operation\&. The default is 20\&. Causes tar file to be written out in blocksize*TBLOCK (normally 512 byte) units\&. +.RE +.PP +cancel jobid0 [jobid1] \&.\&.\&. [jobidN] +.RS 4 +The client will request that the server cancel the printjobs identified by the given numeric print job ids\&. +.RE +.PP +case_sensitive +.RS 4 +Toggles the setting of the flag in SMB packets that tells the server to treat filenames as case sensitive\&. Set to OFF by default (tells file server to treat filenames as case insensitive)\&. Only currently affects Samba 3\&.0\&.5 and above file servers with the case sensitive parameter set to auto in the smb\&.conf\&. +.RE +.PP +cd +.RS 4 +If "directory name" is specified, the current working directory on the server will be changed to the directory specified\&. This operation will fail if for any reason the specified directory is inaccessible\&. +.sp +If no directory name is specified, the current working directory on the server will be reported\&. +.RE +.PP +chmod file mode in octal +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. The client requests that the server change the UNIX permissions to the given octal mode, in standard UNIX format\&. +.RE +.PP +chown file uid gid +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. The client requests that the server change the UNIX user and group ownership to the given decimal values\&. Note there is currently no way to remotely look up the UNIX uid and gid values for a given name\&. This may be addressed in future versions of the CIFS UNIX extensions\&. +.RE +.PP +close +.RS 4 +Closes a file explicitly opened by the open command\&. Used for internal Samba testing purposes\&. +.RE +.PP +del +.RS 4 +The client will request that the server attempt to delete all files matching +\fImask\fR +from the current working directory on the server\&. +.RE +.PP +deltree +.RS 4 +The client will request that the server attempt to delete all files and directories matching +\fImask\fR +from the current working directory on the server\&. Note this will recursively delete files and directories within the directories selected even without the recurse command being set\&. If any of the delete requests fail the command will stop processing at that point, leaving files and directories not yet processed untouched\&. This is by design\&. +.RE +.PP +dir +.RS 4 +A list of the files matching +\fImask\fR +in the current working directory on the server will be retrieved from the server and displayed\&. +.RE +.PP +du +.RS 4 +Does a directory listing and then prints out the current disk usage and free space on a share\&. +.RE +.PP +echo +.RS 4 +Does an SMBecho request to ping the server\&. Used for internal Samba testing purposes\&. +.RE +.PP +exit +.RS 4 +Terminate the connection with the server and exit from the program\&. +.RE +.PP +get [local file name] +.RS 4 +Copy the file called +remote file name +from the server to the machine running the client\&. If specified, name the local copy +local file name\&. Note that all transfers in +smbclient +are binary\&. See also the lowercase command\&. +.RE +.PP +getfacl +.RS 4 +Requires the server support the UNIX extensions\&. Requests and prints the POSIX ACL on a file\&. +.RE +.PP +hardlink +.RS 4 +Creates a hardlink on the server using Windows CIFS semantics\&. +.RE +.PP +help [command] +.RS 4 +See the ? command above\&. +.RE +.PP +history +.RS 4 +Displays the command history\&. +.RE +.PP +iosize +.RS 4 +When sending or receiving files, smbclient uses an internal buffer sized by the maximum number of allowed requests to the connected server\&. This command allows this size to be set to any range between 0 (which means use the default server controlled size) bytes and 16776960 (0xFFFF00) bytes\&. Using the server controlled size is the most efficient as smbclient will pipeline as many simultaneous reads or writes needed to keep the server as busy as possible\&. Setting this to any other size will slow down the transfer\&. +.RE +.PP +lcd [directory name] +.RS 4 +If +\fIdirectory name\fR +is specified, the current working directory on the local machine will be changed to the directory specified\&. This operation will fail if for any reason the specified directory is inaccessible\&. +.sp +If no directory name is specified, the name of the current working directory on the local machine will be reported\&. +.RE +.PP +link target linkname +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. The client requests that the server create a hard link between the linkname and target files\&. The linkname file must not exist\&. +.RE +.PP +listconnect +.RS 4 +Show the current connections held for DFS purposes\&. +.RE +.PP +lock +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Tries to set a POSIX fcntl lock of the given type on the given range\&. Used for internal Samba testing purposes\&. +.RE +.PP +logon +.RS 4 +Establishes a new vuid for this session by logging on again\&. Replaces the current vuid\&. Prints out the new vuid\&. Used for internal Samba testing purposes\&. +.RE +.PP +logoff +.RS 4 +Logs the user off the server, closing the session\&. Used for internal Samba testing purposes\&. +.RE +.PP +lowercase +.RS 4 +Toggle lowercasing of filenames for the get and mget commands\&. +.sp +When lowercasing is toggled ON, local filenames are converted to lowercase when using the get and mget commands\&. This is often useful when copying (say) MSDOS files from a server, because lowercase filenames are the norm on UNIX systems\&. +.RE +.PP +ls +.RS 4 +See the dir command above\&. +.RE +.PP +mask +.RS 4 +This command allows the user to set up a mask which will be used during recursive operation of the mget and mput commands\&. +.sp +The masks specified to the mget and mput commands act as filters for directories rather than files when recursion is toggled ON\&. +.sp +The mask specified with the mask command is necessary to filter files within those directories\&. For example, if the mask specified in an mget command is "source*" and the mask specified with the mask command is "*\&.c" and recursion is toggled ON, the mget command will retrieve all files matching "*\&.c" in all directories below and including all directories matching "source*" in the current working directory\&. +.sp +Note that the value for mask defaults to blank (equivalent to "*") and remains so until the mask command is used to change it\&. It retains the most recently specified value indefinitely\&. To avoid unexpected results it would be wise to change the value of mask back to "*" after using the mget or mput commands\&. +.RE +.PP +md +.RS 4 +See the mkdir command\&. +.RE +.PP +mget +.RS 4 +Copy all files matching +\fImask\fR +from the server to the machine running the client\&. +.sp +Note that +\fImask\fR +is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in +smbclient +are binary\&. See also the lowercase command\&. +.RE +.PP +mkdir +.RS 4 +Create a new directory on the server (user access privileges permitting) with the specified name\&. +.RE +.PP +more +.RS 4 +Fetch a remote file and view it with the contents of your PAGER environment variable\&. +.RE +.PP +mput +.RS 4 +Copy all files matching +\fImask\fR +in the current working directory on the local machine to the current working directory on the server\&. +.sp +Note that +\fImask\fR +is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in +smbclient +are binary\&. +.RE +.PP +notify +.RS 4 +Query a directory for change notifications\&. This command issues a recursive filechangenotify call for all possible changes\&. As changes come in will print one line per change\&. See +https://msdn\&.microsoft\&.com/en\-us/library/dn392331\&.aspx +for a description of the action numbers that this command prints\&. +.sp +This command never ends, it waits for event indefinitely\&. +.RE +.PP +posix +.RS 4 +Query the remote server to see if it supports the CIFS UNIX extensions and prints out the list of capabilities supported\&. If so, turn on POSIX pathname processing and large file read/writes (if available),\&. +.RE +.PP +posix_encrypt +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Attempt to negotiate SMB encryption on this connection\&. If smbclient connected with kerberos credentials (\-k) the arguments to this command are ignored and the kerberos credentials are used to negotiate GSSAPI signing and sealing instead\&. See also the \-e option to smbclient to force encryption on initial connection\&. This command is new with Samba 3\&.2\&. +.RE +.PP +posix_open +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Opens a remote file using the CIFS UNIX extensions and prints a fileid\&. Used for internal Samba testing purposes\&. +.RE +.PP +posix_mkdir +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Creates a remote directory using the CIFS UNIX extensions with the given mode\&. +.RE +.PP +posix_rmdir +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Deletes a remote directory using the CIFS UNIX extensions\&. +.RE +.PP +posix_unlink +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Deletes a remote file using the CIFS UNIX extensions\&. +.RE +.PP +posix_whoami +.RS 4 +Query the remote server for the user token using the CIFS UNIX extensions WHOAMI call\&. Prints out the guest status, user, group, group list and sid list that the remote server is using on behalf of the logged on user\&. +.RE +.PP +print +.RS 4 +Print the specified file from the local machine through a printable service on the server\&. +.RE +.PP +prompt +.RS 4 +Toggle prompting for filenames during operation of the mget and mput commands\&. +.sp +When toggled ON, the user will be prompted to confirm the transfer of each file during these commands\&. When toggled OFF, all specified files will be transferred without prompting\&. +.RE +.PP +put [remote file name] +.RS 4 +Copy the file called +local file name +from the machine running the client to the server\&. If specified, name the remote copy +remote file name\&. Note that all transfers in +smbclient +are binary\&. See also the lowercase command\&. +.RE +.PP +queue +.RS 4 +Displays the print queue, showing the job id, name, size and current status\&. +.RE +.PP +quit +.RS 4 +See the exit command\&. +.RE +.PP +readlink symlinkname +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Print the value of the symlink "symlinkname"\&. +.RE +.PP +rd +.RS 4 +See the rmdir command\&. +.RE +.PP +recurse +.RS 4 +Toggle directory recursion for the commands mget and mput\&. +.sp +When toggled ON, these commands will process all directories in the source directory (i\&.e\&., the directory they are copying from ) and will recurse into any that match the mask specified to the command\&. Only files that match the mask specified using the mask command will be retrieved\&. See also the mask command\&. +.sp +When recursion is toggled OFF, only files from the current working directory on the source machine that match the mask specified to the mget or mput commands will be copied, and any mask specified using the mask command will be ignored\&. +.RE +.PP +rename [\-f] +.RS 4 +Rename files in the current working directory on the server from +\fIold filename\fR +to +\fInew filename\fR\&. The optional \-f switch allows for superseding the destination file, if it exists\&. This is supported by NT1 protocol dialect and SMB2 protocol family\&. +.RE +.PP +rm +.RS 4 +Remove all files matching +\fImask\fR +from the current working directory on the server\&. +.RE +.PP +rmdir +.RS 4 +Remove the specified directory (user access privileges permitting) from the server\&. +.RE +.PP +scopy +.RS 4 +Attempt to copy a file on the server using the most efficient server\-side copy calls\&. Falls back to using read then write if server doesn\*(Aqt support server\-side copy\&. +.RE +.PP +setmode +.RS 4 +A version of the DOS attrib command to set file permissions\&. For example: +.sp +setmode myfile +r +.sp +would make myfile read only\&. +.RE +.PP +showconnect +.RS 4 +Show the currently active connection held for DFS purposes\&. +.RE +.PP +stat file +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. The client requests the UNIX basic info level and prints out the same info that the Linux stat command would about the file\&. This includes the size, blocks used on disk, file type, permissions, inode number, number of links and finally the three timestamps (access, modify and change)\&. If the file is a special file (symlink, character or block device, fifo or socket) then extra information may also be printed\&. +.RE +.PP +symlink target linkname +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. The client requests that the server create a symbolic hard link between the target and linkname files\&. The linkname file must not exist\&. Note that the server will not create a link to any path that lies outside the currently connected share\&. This is enforced by the Samba server\&. +.RE +.PP +tar [IXbgNa] +.RS 4 +Performs a tar operation \- see the +\fI\-T\fR +command line option above\&. Behavior may be affected by the tarmode command (see below)\&. Using g (incremental) and N (newer) will affect tarmode settings\&. Note that using the "\-" option with tar x may not work \- use the command line option instead\&. +.RE +.PP +blocksize +.RS 4 +Blocksize\&. Must be followed by a valid (greater than zero) blocksize\&. Causes tar file to be written out in +\fIblocksize\fR*TBLOCK (512 byte) blocks\&. +.RE +.PP +tarmode +.RS 4 +Changes tar\*(Aqs behavior with regard to DOS attributes\&. There are 4 modes which can be turned on or off\&. +.sp +Incremental mode (default off)\&. When off (using +full) tar will back up everything regardless of the +\fIarchive\fR +bit setting\&. When on (using +inc), tar will only back up files with the archive bit set\&. +.sp +Reset mode (default off)\&. When on (using +reset), tar will remove the archive bit on all files it backs up (implies read/write share)\&. Use +noreset +to turn off\&. +.sp +System mode (default on)\&. When off, tar will not backup system files\&. Use +nosystem +to turn off\&. +.sp +Hidden mode (default on)\&. When off, tar will not backup hidden files\&. Use +nohidden +to turn off\&. +.RE +.PP +timeout +.RS 4 +This allows the user to tune the default timeout used for each SMB request\&. The default setting is 20 seconds\&. Increase it if requests to the server sometimes time out\&. This can happen when SMB3 encryption is selected and smbclient is overwhelming the server with requests\&. +.RE +.PP +unlock +.RS 4 +This command depends on the server supporting the CIFS UNIX extensions and will fail if the server does not\&. Tries to unlock a POSIX fcntl lock on the given range\&. Used for internal Samba testing purposes\&. +.RE +.PP +volume +.RS 4 +Prints the current volume name of the share\&. +.RE +.PP +vuid +.RS 4 +Changes the currently used vuid in the protocol to the given arbitrary number\&. Without an argument prints out the current vuid being used\&. Used for internal Samba testing purposes\&. +.RE +.PP +tcon +.RS 4 +Establishes a new tree connect (connection to a share)\&. Replaces the current tree connect\&. Prints the new tid (tree id)\&. Used for internal Samba testing purposes\&. +.RE +.PP +tdis +.RS 4 +Close the current share connection (tree disconnect)\&. Used for internal Samba testing purposes\&. +.RE +.PP +tid +.RS 4 +Changes the current tree id (tid) in the protocol to a new arbitrary number\&. Without an argument, it prints out the tid currently used\&. Used for internal Samba testing purposes\&. +.RE +.PP +utimes < change time> +.RS 4 +Changes the timestamps on a file by name\&. Times should be specified in the format [YY]YY:MM:DD\-HH:MM:SS or \-1 for no change\&. +.RE +.SH "NOTES" +.PP +Some servers are fussy about the case of supplied usernames, passwords, share names (AKA service names) and machine names\&. If you fail to connect try giving all parameters in uppercase\&. +.PP +It is often necessary to use the \-n option when connecting to some types of servers\&. For example OS/2 LanManager insists on a valid NetBIOS name being used, so you need to supply a valid name that would be known to the server\&. +.PP +smbclient supports long file names where the server supports the LANMAN2 protocol or above\&. +.SH "ENVIRONMENT VARIABLES" +.PP +See the +\-\-user +and +\-\-password +options for details on ways to specify a username and password via an environment variable\&. +.SH "INSTALLATION" +.PP +The location of the client program is a matter for individual system administrators\&. The following are thus suggestions only\&. +.PP +It is recommended that the smbclient software be installed in the +/usr/local/samba/bin/ +or +/usr/samba/bin/ +directory, this directory readable by all, writeable only by root\&. The client program itself should be executable by all\&. The client should +\fINOT\fR +be setuid or setgid! +.PP +The client log files should be put in a directory readable and writeable only by the user\&. +.PP +To test the client, you will need to know the name of a running SMB/CIFS server\&. It is possible to run +\fBsmbd\fR(8) +as an ordinary user \- running that server as a daemon on a user\-accessible port (typically any port number over 1024) would provide a suitable test server\&. +.SH "DIAGNOSTICS" +.PP +Most diagnostics issued by the client are logged in a specified log file\&. The log file name is specified at compile time, but may be overridden on the command line\&. +.PP +The number and nature of diagnostics available depends on the debug level used by the client\&. If you have problems, set the debug level to 3 and peruse the log files\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smbcontrol.1 b/net/samba416/files/man/smbcontrol.1 new file mode 100644 index 000000000000..2047b55bf5fc --- /dev/null +++ b/net/samba416/files/man/smbcontrol.1 @@ -0,0 +1,343 @@ +'\" t +.\" Title: smbcontrol +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBCONTROL" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbcontrol \- send messages to smbd, nmbd or winbindd processes +.SH "SYNOPSIS" +.HP \w'\ 'u +smbcontrol [\-?|\-\-help] [\-\-usage] [\-t|\-\-timeout] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] +.HP \w'\ 'u +smbcontrol [destination] [message\-type] [parameter] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbcontrol +is a very small program, which sends messages to a +\fBsmbd\fR(8), a +\fBnmbd\fR(8), or a +\fBwinbindd\fR(8) +daemon running on the system\&. +.SH "OPTIONS" +.PP +\-t|\-\-timeout +.RS 4 +Set timeout to seconds\&. +.RE +.PP +destination +.RS 4 +One of +\fInmbd\fR, +\fIsmbd\fR, +\fIwinbindd\fR +or a process ID\&. +.sp +The +\fIall\fR +destination causes the message to "broadcast" to all running daemons including nmbd and winbind\&. This is a change for Samba 3\&.3, prior to this the parameter smbd used to do this\&. +.sp +The +\fIsmbd\fR +destination causes the message to be sent to the smbd daemon specified in the +smbd\&.pid +file\&. +.sp +The +\fInmbd\fR +destination causes the message to be sent to the nmbd daemon specified in the +nmbd\&.pid +file\&. +.sp +The +\fIwinbindd\fR +destination causes the message to be sent to the winbind daemon specified in the +winbindd\&.pid +file\&. +.sp +If a single process ID is given, the message is sent to only that process\&. +.RE +.PP +message\-type +.RS 4 +Type of message to send\&. See the section +\fBMESSAGE\-TYPES\fR +for details\&. +.RE +.PP +parameters +.RS 4 +any parameters required for the message\-type +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.SH "MESSAGE\-TYPES" +.PP +Available message types are: +.PP +close\-share +.RS 4 +Order smbd to close the client connections to the named share\&. Note that this doesn\*(Aqt affect client connections to any other shares\&. This message\-type takes an argument of the share name for which client connections will be closed, or the "*" character which will close all currently open shares\&. This may be useful if you made changes to the access controls on the share\&. This message can only be sent to +\fBsmbd\fR\&. +.RE +.PP +close\-denied\-share +.RS 4 +Behave like +\fBclose\-share\fR, but don\*(Aqt disconnect users that are still allowed to access the share\&. It can safely be sent to all smbds after changing share access controls\&. It will only affect users who have been denied access since having connected initially\&. This message can only be sent to +\fBsmbd\fR\&. +.RE +.PP +debug +.RS 4 +Set debug level to the value specified by the parameter\&. This can be sent to any of the destinations\&. If this message is sent to either the smbd or winbindd daemons, the parent process will rebroadcast the message to all child processes changing the debug level in each one\&. +.RE +.PP +kill\-client\-ip +.RS 4 +Order smbd to close the client connections from a given IP address\&. This message\-type takes an argument of the IP address from which client connections will be closed\&. This message can only be sent to +\fBsmbd\fR\&. +.RE +.PP +force\-election +.RS 4 +This message causes the +nmbd +daemon to force a new browse master election\&. +.RE +.PP +ping +.RS 4 +Send specified number of "ping" messages and wait for the same number of reply "pong" messages\&. This can be sent to any of the destinations\&. +.RE +.PP +profile +.RS 4 +Change profile settings of a daemon, based on the parameter\&. The parameter can be "on" to turn on profile stats collection, "off" to turn off profile stats collection, "count" to enable only collection of count stats (time stats are disabled), and "flush" to zero the current profile stats\&. This can be sent to any smbd or nmbd destinations\&. +.RE +.PP +debuglevel +.RS 4 +Request debuglevel of a certain daemon and write it to stdout\&. This can be sent to any of the destinations\&. +.RE +.PP +profilelevel +.RS 4 +Request profilelevel of a certain daemon and write it to stdout\&. This can be sent to any smbd or nmbd destinations\&. +.RE +.PP +printnotify +.RS 4 +Order smbd to send a printer notify message to any Windows NT clients connected to a printer\&. This message\-type takes the following arguments: +.PP +queuepause printername +.RS 4 +Send a queue pause change notify message to the printer specified\&. +.RE +.PP +queueresume printername +.RS 4 +Send a queue resume change notify message for the printer specified\&. +.RE +.PP +jobpause printername unixjobid +.RS 4 +Send a job pause change notify message for the printer and unix jobid specified\&. +.RE +.PP +jobresume printername unixjobid +.RS 4 +Send a job resume change notify message for the printer and unix jobid specified\&. +.RE +.PP +jobdelete printername unixjobid +.RS 4 +Send a job delete change notify message for the printer and unix jobid specified\&. +.RE +.sp +Note that this message only sends notification that an event has occurred\&. It doesn\*(Aqt actually cause the event to happen\&. +.sp +This message can only be sent to +\fBsmbd\fR\&. +.RE +.PP +dmalloc\-mark +.RS 4 +Set a mark for dmalloc\&. Can be sent to both smbd and nmbd\&. Only available if samba is built with dmalloc support\&. +.RE +.PP +dmalloc\-log\-changed +.RS 4 +Dump the pointers that have changed since the mark set by dmalloc\-mark\&. Can be sent to both smbd and nmbd\&. Only available if samba is built with dmalloc support\&. +.RE +.PP +shutdown +.RS 4 +Shut down specified daemon\&. Can be sent to both smbd and nmbd\&. +.RE +.PP +pool\-usage +.RS 4 +Print a human\-readable description of all talloc(pool) memory usage by the specified daemon/process\&. Available for both smbd and nmbd\&. +.RE +.PP +ringbuf\-log +.RS 4 +Fetch and print the ringbuf log\&. Requires +\fIlogging = ringbuf\fR\&. Available for smbd, winbindd and nmbd\&. +.RE +.PP +drvupgrade +.RS 4 +Force clients of printers using specified driver to update their local version of the driver\&. Can only be sent to smbd\&. +.RE +.PP +reload\-config +.RS 4 +Force daemon to reload smb\&.conf configuration file\&. Can be sent to +\fBsmbd\fR, +\fBnmbd\fR, or +\fBwinbindd\fR\&. +.RE +.PP +reload\-printers +.RS 4 +Force smbd to reload printers\&. Can only be sent to +\fBsmbd\fR\&. +.RE +.PP +idmap +.RS 4 +Notify about changes of id mapping\&. Can be sent to +\fBsmbd\fR +or (not implemented yet) +\fBwinbindd\fR\&. +.PP +flush [uid|gid] +.RS 4 +Flush caches for sid <\-> gid and/or sid <\-> uid mapping\&. +.RE +.PP +delete +.RS 4 +Remove a mapping from cache\&. The mapping is given by which may either be a sid: S\-x\-\&.\&.\&., a gid: "GID number" or a uid: "UID number"\&. +.RE +.PP +kill +.RS 4 +Remove a mapping from cache\&. Terminate +\fBsmbd\fR +if the id is currently in use\&. +.RE +.RE +.PP +num\-children +.RS 4 +Query the number of smbd child processes\&. This message can only be sent to +\fBsmbd\fR\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBnmbd\fR(8) +and +\fBsmbd\fR(8)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smbcquotas.1 b/net/samba416/files/man/smbcquotas.1 new file mode 100644 index 000000000000..e2b9d11ff603 --- /dev/null +++ b/net/samba416/files/man/smbcquotas.1 @@ -0,0 +1,440 @@ +'\" t +.\" Title: smbcquotas +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBCQUOTAS" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbcquotas \- Set or get QUOTAs of NTFS 5 shares +.SH "SYNOPSIS" +.HP \w'\ 'u +smbcquotas {//server/share} [\-u|\-\-quota\-user=USER] [\-L|\-\-list] [\-F|\-\-fs] [\-S|\-\-set=SETSTRING] [\-n|\-\-numeric] [\-v|\-\-verbose] [\-t|\-\-test\-args] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +The +smbcquotas +program manipulates NT Quotas on SMB file shares\&. +.SH "OPTIONS" +.PP +The following options are available to the +smbcquotas +program\&. +.PP +\-u|\-\-quota\-user user +.RS 4 +Specifies the user of whom the quotas are get or set\&. By default the current user\*(Aqs username will be used\&. +.RE +.PP +\-L|\-\-list +.RS 4 +Lists all quota records of the share\&. +.RE +.PP +\-F|\-\-fs +.RS 4 +Show the share quota status and default limits\&. +.RE +.PP +\-S|\-\-set QUOTA_SET_COMMAND +.RS 4 +This command sets/modifies quotas for a user or on the share, depending on the QUOTA_SET_COMMAND parameter which is described later\&. +.RE +.PP +\-n|\-\-numeric +.RS 4 +This option displays all QUOTA information in numeric format\&. The default is to convert SIDs to names and QUOTA limits to a readable string format\&. +.RE +.PP +\-t|\-\-test\-args +.RS 4 +Don\*(Aqt actually do anything, only validate the correctness of the arguments\&. +.RE +.PP +\-v|\-\-verbose +.RS 4 +Be verbose\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER +.RS 4 +This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best ist to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&. +.sp +The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the +\fBlmhosts\fR(5) +for details) then any name type matches for lookup\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBhost\fR: Do a standard host name to IP address resolution, using the system +/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the +/etc/nsswitch\&.conf +file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBwins\fR: Query a name with the IP address listed in the +\fIwins server\fR +parameter\&. If no WINS server has been specified this method will be ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the +\fIinterfaces\fR +parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&. +.RE +.sp +.RE +If this parameter is not set then the name resolve order defined in the +smb\&.conf +file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&. +.sp +The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the +\m[blue]\fBname resolve order\fR\m[] +parameter of the +smb\&.conf +file, the name resolution methods will be attempted in this order\&. +.RE +.PP +\-O|\-\-socket\-options=SOCKETOPTIONS +.RS 4 +TCP socket options to set on the client socket\&. See the socket options parameter in the +smb\&.conf +manual page for the list of valid options\&. +.RE +.PP +\-m|\-\-max\-protocol=MAXPROTOCOL +.RS 4 +The value of the parameter (a string) is the highest protocol level that will be supported by the client\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient max protocol\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-n|\-\-netbiosname=NETBIOSNAME +.RS 4 +This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the +\m[blue]\fBnetbios name\fR\m[] +parameter in the +smb\&.conf +file\&. However, a command line setting will take precedence over settings in +smb\&.conf\&. +.RE +.PP +\-\-netbios\-scope=SCOPE +.RS 4 +This specifies a NetBIOS scope that +nmblookup +will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are +\fIvery\fR +rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. +.RE +.PP +\-W|\-\-workgroup=WORKGROUP +.RS 4 +Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBworkgroup\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-r|\-\-realm=REALM +.RS 4 +Set the realm for the domain\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBrealm\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "QUOTA_SET_COMMAND" +.PP +The format of an the QUOTA_SET_COMMAND is an operation name followed by a set of parameters specific to that operation\&. +.PP +To set user quotas for the user specified by \-u or for the current username: +.PP +\fB UQLIM::/ \fR +.PP +To set the default quotas for a share: +.PP +\fB FSQLIM:/ \fR +.PP +To change the share quota settings: +.PP +\fB FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT \fR +.PP +All limits are specified as a number of bytes\&. +.SH "EXIT STATUS" +.PP +The +smbcquotas +program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&. +.PP +If the operation succeeded, smbcquotas returns an exit status of 0\&. If +smbcquotas +couldn\*(Aqt connect to the specified server, or when there was an error getting or setting the quota(s), an exit status of 1 is returned\&. If there was an error parsing any command line arguments, an exit status of 2 is returned\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +smbcquotas +was written by Stefan Metzmacher\&. diff --git a/net/samba416/files/man/smbget.1 b/net/samba416/files/man/smbget.1 new file mode 100644 index 000000000000..8fb841a415f1 --- /dev/null +++ b/net/samba416/files/man/smbget.1 @@ -0,0 +1,197 @@ +'\" t +.\" Title: smbget +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBGET" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbget \- wget\-like utility for download files over SMB +.SH "SYNOPSIS" +.HP \w'\ 'u +smbget [\-a,\ \-\-guest] [\-r,\ \-\-resume] [\-R,\ \-\-recursive] [\-U,\ \-\-user=STRING] [\-w,\ \-\-workgroup=STRING] [\-n,\ \-\-nonprompt] [\-d,\ \-\-debuglevel=INT] [\-D,\ \-\-dots] [\-o,\ \-\-outputfile] [\-f,\ \-\-rcfile] [\-q,\ \-\-quiet] [\-v,\ \-\-verbose] [\-b,\ \-\-blocksize] [\-O,\ \-\-stdout] [\-u,\ \-\-update] [\-e,\ \-\-encrypt] [\-?,\ \-\-help] [\-\-usage] {smb://host/share/path/to/file} [smb://url2/] [\&.\&.\&.] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbget is a simple utility with wget\-like semantics, that can download files from SMB servers\&. You can specify the files you would like to download on the command\-line\&. +.PP +The files should be in the smb\-URL standard, e\&.g\&. use smb://host/share/file for the UNC path +\fI\e\e\e\eHOST\e\eSHARE\e\efile\fR\&. +.SH "OPTIONS" +.PP +\-a, \-\-guest +.RS 4 +Work as user guest +.RE +.PP +\-r, \-\-resume +.RS 4 +Automatically resume aborted files +.RE +.PP +\-R, \-\-recursive +.RS 4 +Recursively download files +.RE +.PP +\-U, \-\-user=\fIusername[%password]\fR +.RS 4 +Username (and password) to use +.RE +.PP +\-w, \-\-workgroup=STRING +.RS 4 +Workgroup to use (optional) +.RE +.PP +\-n, \-\-nonprompt +.RS 4 +Don\*(Aqt ask anything (non\-interactive) +.RE +.PP +\-d, \-\-debuglevel=INT +.RS 4 +Debuglevel to use +.RE +.PP +\-D, \-\-dots +.RS 4 +Show dots as progress indication +.RE +.PP +\-o, \-\-outputfile +.RS 4 +Write the file that is being downloaded to the specified file\&. Can not be used together with \-R\&. +.RE +.PP +\-O, \-\-stdout +.RS 4 +Write the file that is being downloaded to standard output\&. +.RE +.PP +\-f, \-\-rcfile +.RS 4 +Use specified rcfile\&. This will be loaded in the order it was specified \- e\&.g\&. if you specify any options before this one, they might get overridden by the contents of the rcfile\&. +.RE +.PP +\-q, \-\-quiet +.RS 4 +Be quiet +.RE +.PP +\-v, \-\-verbose +.RS 4 +Be verbose +.RE +.PP +\-b, \-\-blocksize +.RS 4 +Number of bytes to download in a block\&. Defaults to 64000\&. +.RE +.PP +\-?, \-\-help +.RS 4 +Show help message +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message +.RE +.PP +\-u, \-\-update +.RS 4 +Download only when remote file is newer than local file or local file is missing\&. +.RE +.PP +\-e, \-\-encrypt +.RS 4 +Enable SMB encryption\&. +.RE +.SH "SMB URLS" +.PP +SMB URL\*(Aqs should be specified in the following format: +.PP +.if n \{\ +.RS 4 +.\} +.nf +smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] +.fi +.if n \{\ +.RE +.\} +.PP +.if n \{\ +.RS 4 +.\} +.nf +smb:// means all the workgroups +.fi +.if n \{\ +.RE +.\} +.PP +.if n \{\ +.RS 4 +.\} +.nf +smb://name/ means, if \fIname\fR is a workgroup, all the servers in this workgroup, or if \fIname\fR is a server, all the shares on this server\&. +.fi +.if n \{\ +.RE +.\} +.SH "EXAMPLES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +# Recursively download \*(Aqsrc\*(Aq directory +smbget \-R smb://rhonwyn/jelmer/src +# Download FreeBSD ISO and enable resuming +smbget \-r smb://rhonwyn/isos/FreeBSD5\&.1\&.iso +# Recursively download all ISOs +smbget \-Rr smb://rhonwyn/isos +# Backup my data on rhonwyn +smbget \-Rr smb://rhonwyn/ +.fi +.if n \{\ +.RE +.\} +.SH "BUGS" +.PP +Permission denied is returned in some cases where the cause of the error is unknown (such as an illegally formatted smb:// url or trying to get a directory without \-R turned on)\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The smbget manpage was written by Jelmer Vernooij\&. diff --git a/net/samba416/files/man/smbgetrc.5 b/net/samba416/files/man/smbgetrc.5 new file mode 100644 index 000000000000..77aaee71f76f --- /dev/null +++ b/net/samba416/files/man/smbgetrc.5 @@ -0,0 +1,100 @@ +'\" t +.\" Title: smbgetrc +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: File Formats and Conventions +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBGETRC" "5" "08/09/2022" "Samba 4\&.16\&.4" "File Formats and Conventions" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbgetrc \- configuration file for smbget +.SH "SYNOPSIS" +.PP +smbgetrc +.SH "DESCRIPTION" +.PP +This manual page documents the format and options of the +\fIsmbgetrc\fR +file\&. This is the configuration file used by the +\fBsmbget\fR(1) +utility\&. The file contains of key\-value pairs, one pair on each line\&. The key and value should be separated by a space\&. +.PP +By default, smbget reads its configuration from +\fI$HOME/\&.smbgetrc\fR, though other locations can be specified using the command\-line options\&. +.SH "OPTIONS" +.PP +The following keys can be set: +.PP +resume on|off +.RS 4 +Whether aborted downloads should be automatically resumed\&. +.RE +.PP +recursive on|off +.RS 4 +Whether directories should be downloaded recursively +.RE +.PP +user \fIname[%password]\fR +.RS 4 +Username (and password) to use when logging in to the remote server\&. Use an empty string for anonymous access\&. +.RE +.PP +workgroup \fIwg\fR +.RS 4 +Workgroup to use when logging in +.RE +.PP +nonprompt on|off +.RS 4 +Turns off asking for username and password\&. Useful for scripts\&. +.RE +.PP +debuglevel \fIint\fR +.RS 4 +(Samba) debuglevel to run at\&. Useful for tracking down protocol level problems\&. +.RE +.PP +dots on|off +.RS 4 +Whether a single dot should be printed for each block that has been downloaded, instead of the default progress indicator\&. +.RE +.PP +blocksize \fIint\fR +.RS 4 +Number of bytes to put in a block\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbget\fR(1) +and +\fBSamba\fR(7)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +This manual page was written by Jelmer Vernooij diff --git a/net/samba416/files/man/smbpasswd.5 b/net/samba416/files/man/smbpasswd.5 new file mode 100644 index 000000000000..63ad22690787 --- /dev/null +++ b/net/samba416/files/man/smbpasswd.5 @@ -0,0 +1,175 @@ +'\" t +.\" Title: smbpasswd +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: File Formats and Conventions +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBPASSWD" "5" "08/09/2022" "Samba 4\&.16\&.4" "File Formats and Conventions" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbpasswd \- The Samba encrypted password file +.SH "SYNOPSIS" +.PP +smbpasswd +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbpasswd is the Samba encrypted password file\&. It contains the username, Unix user id and the SMB hashed passwords of the user, as well as account flag information and the time the password was last changed\&. This file format has been evolving with Samba and has had several different formats in the past\&. +.SH "FILE FORMAT" +.PP +The format of the smbpasswd file used by Samba 2\&.2 is very similar to the familiar Unix +passwd(5) +file\&. It is an ASCII file containing one line for each user\&. Each field within each line is separated from the next by a colon\&. Any entry beginning with \*(Aq#\*(Aq is ignored\&. The smbpasswd file contains the following information for each user: +.PP +name +.RS 4 +This is the user name\&. It must be a name that already exists in the standard UNIX passwd file\&. +.RE +.PP +uid +.RS 4 +This is the UNIX uid\&. It must match the uid field for the same user entry in the standard UNIX passwd file\&. If this does not match then Samba will refuse to recognize this smbpasswd file entry as being valid for a user\&. +.RE +.PP +Lanman Password Hash +.RS 4 +This is the LANMAN hash of the user\*(Aqs password, encoded as 32 hex digits\&. The LANMAN hash is created by DES encrypting a well known string with the user\*(Aqs password as the DES key\&. This is the same password used by Windows 95/98 machines\&. Note that this password hash is regarded as weak as it is vulnerable to dictionary attacks and if two users choose the same password this entry will be identical (i\&.e\&. the password is not "salted" as the UNIX password is)\&. If the user has a null password this field will contain the characters "NO PASSWORD" as the start of the hex string\&. If the hex string is equal to 32 \*(AqX\*(Aq characters then the user\*(Aqs account is marked as +\fBdisabled\fR +and the user will not be able to log onto the Samba server\&. +.sp +\fIWARNING !!\fR +Note that, due to the challenge\-response nature of the SMB/CIFS authentication protocol, anyone with a knowledge of this password hash will be able to impersonate the user on the network\&. For this reason these hashes are known as +\fIplain text equivalents\fR +and must +\fINOT\fR +be made available to anyone but the root user\&. To protect these passwords the smbpasswd file is placed in a directory with read and traverse access only to the root user and the smbpasswd file itself must be set to be read/write only by root, with no other access\&. +.RE +.PP +NT Password Hash +.RS 4 +This is the Windows NT hash of the user\*(Aqs password, encoded as 32 hex digits\&. The Windows NT hash is created by taking the user\*(Aqs password as represented in 16\-bit, little\-endian UNICODE and then applying the MD4 (internet rfc1321) hashing algorithm to it\&. +.sp +This password hash is considered more secure than the LANMAN Password Hash as it preserves the case of the password and uses a much higher quality hashing algorithm\&. However, it is still the case that if two users choose the same password this entry will be identical (i\&.e\&. the password is not "salted" as the UNIX password is)\&. +.sp +\fIWARNING !!\fR\&. Note that, due to the challenge\-response nature of the SMB/CIFS authentication protocol, anyone with a knowledge of this password hash will be able to impersonate the user on the network\&. For this reason these hashes are known as +\fIplain text equivalents\fR +and must +\fINOT\fR +be made available to anyone but the root user\&. To protect these passwords the smbpasswd file is placed in a directory with read and traverse access only to the root user and the smbpasswd file itself must be set to be read/write only by root, with no other access\&. +.RE +.PP +Account Flags +.RS 4 +This section contains flags that describe the attributes of the users account\&. This field is bracketed by \*(Aq[\*(Aq and \*(Aq]\*(Aq characters and is always 13 characters in length (including the \*(Aq[\*(Aq and \*(Aq]\*(Aq characters)\&. The contents of this field may be any of the following characters: +.RS +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIU\fR +\- This means this is a "User" account, i\&.e\&. an ordinary user\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIN\fR +\- This means the account has no password (the passwords in the fields LANMAN Password Hash and NT Password Hash are ignored)\&. Note that this will only allow users to log on with no password if the +\fI null passwords\fR +parameter is set in the +\fBsmb.conf\fR(5) +config file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fID\fR +\- This means the account is disabled and no SMB/CIFS logins will be allowed for this user\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIX\fR +\- This means the password does not expire\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIW\fR +\- This means this account is a "Workstation Trust" account\&. This kind of account is used in the Samba PDC code stream to allow Windows NT Workstations and Servers to join a Domain hosted by a Samba PDC\&. +.RE +.sp +.RE +Other flags may be added as the code is extended in future\&. The rest of this field space is filled in with spaces\&. For further information regarding the flags that are supported please refer to the man page for the +pdbedit +command\&. +.RE +.PP +Last Change Time +.RS 4 +This field consists of the time the account was last modified\&. It consists of the characters \*(AqLCT\-\*(Aq (standing for "Last Change Time") followed by a numeric encoding of the UNIX time in seconds since the epoch (1970) that the last change was made\&. +.RE +.PP +All other colon separated fields are ignored at this time\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbpasswd\fR(8), +\fBSamba\fR(7), and the Internet RFC1321 for details on the MD4 algorithm\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smbstatus.1 b/net/samba416/files/man/smbstatus.1 new file mode 100644 index 000000000000..334109958047 --- /dev/null +++ b/net/samba416/files/man/smbstatus.1 @@ -0,0 +1,186 @@ +'\" t +.\" Title: smbstatus +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBSTATUS" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbstatus \- report on current Samba connections +.SH "SYNOPSIS" +.HP \w'\ 'u +smbstatus [\-p|\-\-processes] [\-v|\-\-verbose] [\-L|\-\-locks] [\-S|\-\-shares] [\-N|\-\-notify] [\-u|\-\-user=STRING] [\-b|\-\-brief] [\-P|\-\-profile] [\-R|\-\-profile\-rates] [\-B|\-\-byterange] [\-n|\-\-numeric] [\-f|\-\-fast] [\-\-resolve\-uids] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbstatus +is a very simple program to list the current Samba connections\&. +.SH "OPTIONS" +.PP +\-P|\-\-profile +.RS 4 +If samba has been compiled with the profiling option, print only the contents of the profiling shared memory area\&. +.RE +.PP +\-R|\-\-profile\-rates +.RS 4 +If samba has been compiled with the profiling option, print the contents of the profiling shared memory area and the call rates\&. +.RE +.PP +\-b|\-\-brief +.RS 4 +gives brief output\&. +.RE +.PP +\-v|\-\-verbose +.RS 4 +gives verbose output\&. +.RE +.PP +\-L|\-\-locks +.RS 4 +causes smbstatus to only list locks\&. +.RE +.PP +\-B|\-\-byterange +.RS 4 +causes smbstatus to include byte range locks\&. +.RE +.PP +\-p|\-\-processes +.RS 4 +print a list of +\fBsmbd\fR(8) +processes and exit\&. Useful for scripting\&. +.RE +.PP +\-S|\-\-shares +.RS 4 +causes smbstatus to only list shares\&. +.RE +.PP +\-N|\-\-notify +.RS 4 +causes smbstatus to display registered file notifications +.RE +.PP +\-f|\-\-fast +.RS 4 +causes smbstatus to not check if the status data is valid by checking if the processes that the status data refer to all still exist\&. This speeds up execution on busy systems and clusters but might display stale data of processes that died without cleaning up properly\&. +.RE +.PP +\-u|\-\-user= +.RS 4 +selects information relevant to +\fIusername\fR +only\&. +.RE +.PP +\-n|\-\-numeric +.RS 4 +causes smbstatus to display numeric UIDs and GIDs instead of resolving them to names\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbd\fR(8) +and +\fBsmb.conf\fR(5)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/smbtar.1 b/net/samba416/files/man/smbtar.1 new file mode 100644 index 000000000000..b83dbc014d3d --- /dev/null +++ b/net/samba416/files/man/smbtar.1 @@ -0,0 +1,163 @@ +'\" t +.\" Title: smbtar +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBTAR" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbtar \- shell script for backing up SMB/CIFS shares directly to UNIX tape drives +.SH "SYNOPSIS" +.HP \w'\ 'u +smbtar [\-r] [\-i] [\-a] [\-v] {\-s\ server} [\-p\ password] [\-x\ services] [\-X] [\-N\ filename] [\-b\ blocksize] [\-d\ directory] [\-l\ loglevel] [\-u\ user] [\-t\ tape] {filenames} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbtar +is a very small shell script on top of +\fBsmbclient\fR(1) +which dumps SMB shares directly to tape\&. +.SH "OPTIONS" +.PP +\-s server +.RS 4 +The SMB/CIFS server that the share resides upon\&. +.RE +.PP +\-x service +.RS 4 +The share name on the server to connect to\&. The default is "backup"\&. +.RE +.PP +\-X +.RS 4 +Exclude mode\&. Exclude filenames\&.\&.\&. from tar create or restore\&. +.RE +.PP +\-d directory +.RS 4 +Change to initial +\fIdirectory \fR +before restoring / backing up files\&. +.RE +.PP +\-v +.RS 4 +Verbose mode\&. +.RE +.PP +\-p password +.RS 4 +The password to use to access a share\&. Default: none +.RE +.PP +\-u user +.RS 4 +The user id to connect as\&. Default: UNIX login name\&. +.RE +.PP +\-a +.RS 4 +Reset DOS archive bit mode to indicate file has been archived\&. +.RE +.PP +\-t tape +.RS 4 +Tape device\&. May be regular file or tape device\&. Default: +\fI$TAPE\fR +environmental variable; if not set, a file called +tar\&.out\&. +.RE +.PP +\-b blocksize +.RS 4 +Blocking factor\&. Defaults to 20\&. See +tar(1) +for a fuller explanation\&. +.RE +.PP +\-N filename +.RS 4 +Backup only files newer than filename\&. Could be used (for example) on a log file to implement incremental backups\&. +.RE +.PP +\-i +.RS 4 +Incremental mode; tar files are only backed up if they have the archive bit set\&. The archive bit is reset after each file is read\&. +.RE +.PP +\-r +.RS 4 +Restore\&. Files are restored to the share from the tar file\&. +.RE +.PP +\-l log level +.RS 4 +Log (debug) level\&. Corresponds to the +\fI\-d\fR +flag of +\fBsmbclient\fR(1)\&. +.RE +.SH "ENVIRONMENT VARIABLES" +.PP +The +\fI$TAPE\fR +variable specifies the default tape device to write to\&. May be overridden with the \-t option\&. +.SH "BUGS" +.PP +The +smbtar +script has different options from ordinary tar and from smbclient\*(Aqs tar command\&. +.SH "CAVEATS" +.PP +Sites that are more careful about security may not like the way the script handles PC passwords\&. Backup and restore work on entire shares; should work on file lists\&. smbtar works best with GNU tar and may not work well with other versions\&. +.SH "DIAGNOSTICS" +.PP +See the +\fIDIAGNOSTICS\fR +section for the +\fBsmbclient\fR(1) +command\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmbd\fR(8), +\fBsmbclient\fR(1), +\fBsmb.conf\fR(5)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +Ricky Poulten +wrote the tar extension and this man page\&. The +smbtar +script was heavily rewritten and improved by +Martin Kraemer\&. Many thanks to everyone who suggested extensions, improvements, bug fixes, etc\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at +ftp://ftp\&.icce\&.rug\&.nl/pub/unix/) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&. diff --git a/net/samba416/files/man/smbtorture.1 b/net/samba416/files/man/smbtorture.1 new file mode 100644 index 000000000000..3dcfcd8f50a0 --- /dev/null +++ b/net/samba416/files/man/smbtorture.1 @@ -0,0 +1,362 @@ +'\" t +.\" Title: smbtorture +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: Test Suite +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "SMBTORTURE" "1" "08/09/2022" "Samba 4\&.0" "Test Suite" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbtorture \- Run a series of tests against a SMB server +.SH "SYNOPSIS" +.HP \w'\fBsmbtorture\fR\ 'u +\fBsmbtorture\fR {//server/share} [\-d\ debuglevel] [\-U\ user%pass] [\-k] [\-N\ numprocs] [\-n\ netbios_name] [\-W\ workgroup] [\-e\ num\ files(entries)] [\-O\ socket_options] [\-m\ maximum_protocol] [\-L] [\-c\ CLIENT\&.TXT] [\-t\ timelimit] [\-C\ filename] [\-A] [\-p\ port] [\-s\ seed] [\-f\ max_failures] [\-X] {BINDING\-STRING|UNC} {TEST1} [TEST2] [\&.\&.\&.] +.SH "DESCRIPTION" +.PP +smbtorture is a testsuite that runs several tests against a SMB server\&. All tests are known to succeed against a Windows 2003 server (?)\&. Smbtorture\*(Aqs primary goal is finding differences in implementations of the SMB protocol and testing SMB servers\&. +.PP +Any number of tests can be specified on the command\-line\&. If no tests are specified, all tests are run\&. +.PP +If no arguments are specified at all, all available options and tests are listed\&. +.SS "Binding string format" +.PP +The binding string format is: +.PP +TRANSPORT:host[flags] +.PP +Where TRANSPORT is either ncacn_np for SMB, ncacn_ip_tcp for RPC/TCP or ncalrpc for local connections\&. +.PP +\*(Aqhost\*(Aq is an IP or hostname or netbios name\&. If the binding string identifies the server side of an endpoint, \*(Aqhost\*(Aq may be an empty string\&. +.PP +\*(Aqflags\*(Aq can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto\-determined\&. +.PP +other recognised flags are: +.PP +sign +.RS 4 +enable ntlmssp signing +.RE +.PP +seal +.RS 4 +enable ntlmssp sealing +.RE +.PP +connect +.RS 4 +enable rpc connect level auth (auth, but no sign or seal) +.RE +.PP +validate +.RS 4 +enable the NDR validator +.RE +.PP +print +.RS 4 +enable debugging of the packets +.RE +.PP +bigendian +.RS 4 +use bigendian RPC +.RE +.PP +padcheck +.RS 4 +check reply data for non\-zero pad bytes +.RE +.PP +For example, these all connect to the samr pipe: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[samr] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[\e\epipe\e\esamr] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[/pipe/samr] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[samr,sign,print] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[\e\epipe\e\esamr,sign,seal,bigendian] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:myserver[/pipe/samr,seal,validate] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np: +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_np:[/pipe/samr] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_ip_tcp:myserver +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_ip_tcp:myserver[1024] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncacn_ip_tcp:myserver[1024,sign,seal] +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ncalrpc: +.RE +.SS "UNC Format" +.PP +The UNC format is: +.PP +//server/share +.SH "OPTIONS" +.PP +\-d debuglevel +.RS 4 +Use the specified Samba debug level\&. A higher debug level means more output\&. +.RE +.PP +\-U user%pass +.RS 4 +Use the specified username/password combination when logging in to a remote server\&. +.RE +.PP +\-k +.RS 4 +Use kerberos when authenticating\&. +.RE +.PP +\-W workgroup +.RS 4 +Use specified name as our workgroup name\&. +.RE +.PP +\-n netbios_name +.RS 4 +Use specified name as our NetBIOS name\&. +.RE +.PP +\-O socket_options +.RS 4 +Use specified socket options, equivalent of the smb\&.conf option +\(lqsocket options\(rq\&. See the smb\&.conf(5) manpage for details\&. +.RE +.PP +\-m max_protocol +.RS 4 +Specify the maximum SMB dialect that should be used\&. Possible values are: CORE, COREPLUS, LANMAN1, LANMAN2, NT1 +.RE +.PP +\-s seed +.RS 4 +Initialize the randomizer using +\fIseed\fR +as seed\&. +.RE +.PP +\-L +.RS 4 +Use oplocks\&. +.RE +.PP +\-X +.RS 4 +Enable dangerous tests\&. Use with care! This might crash your server\&.\&.\&. +.RE +.PP +\-t timelimit +.RS 4 +Specify the NBENCH time limit in seconds\&. Defaults to 600\&. +.RE +.PP +\-p ports +.RS 4 +Specify ports to connect to\&. +.RE +.PP +\-c file +.RS 4 +Read NBENCH commands from +\fIfile\fR +instead of from CLIENT\&.TXT\&. +.RE +.PP +\-A +.RS 4 +Show not just OK or FAILED but more detailed output\&. Used only by DENY test at the moment\&. +.RE +.PP +\-C filename +.RS 4 +Load a list of UNC names from the specified filename\&. Smbtorture instances will connect to a random host from this list\&. +.RE +.PP +\-N numprocs +.RS 4 +Specify number of smbtorture processes to launch\&. +.RE +.PP +\-e num_files +.RS 4 +Number of entries to use in certain tests (such as creating X files) (default: 1000)\&. +.RE +.PP +\-f max_failures +.RS 4 +Number of failures before aborting a test (default: 1)\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 4\&.0 of the Samba suite\&. +.SH "SEE ALSO" +.PP +Samba +.SH "AUTHOR" +.PP +This utility is part of the +\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2 +suite, which is developed by the global +\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&. +.PP +smbtorture was written by Andrew Tridgell\&. +.PP +This manpage was written by Jelmer Vernooij\&. +.SH "NOTES" +.IP " 1." 4 +Samba +.RS 4 +\%http://www.samba.org/ +.RE +.IP " 2." 4 +Samba Team +.RS 4 +\%http://www.samba.org/samba/team/ +.RE diff --git a/net/samba416/files/man/smbtree.1 b/net/samba416/files/man/smbtree.1 new file mode 100644 index 000000000000..eab5ca0db742 --- /dev/null +++ b/net/samba416/files/man/smbtree.1 @@ -0,0 +1,252 @@ +'\" t +.\" Title: smbtree +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "SMBTREE" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +smbtree \- A text based smb network browser +.SH "SYNOPSIS" +.HP \w'\ 'u +smbtree [\-D|\-\-domains] [\-S|\-\-servers] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +smbtree +is a smb browser program in text mode\&. It is similar to the "Network Neighborhood" found on Windows computers\&. It prints a tree with all the known domains, the servers in those domains and the shares on the servers\&. +.SH "OPTIONS" +.PP +\-D|\-\-domains +.RS 4 +Only print a list of all the domains known on broadcast or by the master browser +.RE +.PP +\-S|\-\-servers +.RS 4 +Only print a list of all the domains and servers responding on broadcast or known by the master browser\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-l|\-\-log\-basename=logdirectory +.RS 4 +Base directory name for log/debug files\&. The extension +\fB"\&.progname"\fR +will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. +.RE +.PP +\-\-leak\-report +.RS 4 +Enable talloc leak reporting on exit\&. +.RE +.PP +\-\-leak\-report\-full +.RS 4 +Enable full talloc leak reporting on exit\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD] +.RS 4 +Sets the SMB username or username and password\&. +.sp +If %PASSWORD is not specified, the user will be prompted\&. The client will first check the +\fBUSER\fR +environment variable (which is also permitted to also contain the password seperated by a %), then the +\fBLOGNAME\fR +variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&. +.sp +A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the +\fI\-A\fR +for more details\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-N|\-\-no\-pass +.RS 4 +If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&. +.sp +Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. +.sp +If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&. +.RE +.PP +\-\-password +.RS 4 +Specify the password on the commandline\&. +.sp +Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with +kinit\&. +.sp +If \-\-password is not specified, the tool will check the +\fBPASSWD\fR +environment variable, followed by +\fBPASSWD_FD\fR +which is expected to contain an open file descriptor (FD) number\&. +.sp +Finally it will check +\fBPASSWD_FILE\fR +(containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users! +.sp +While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&. +.RE +.PP +\-\-pw\-nt\-hash +.RS 4 +The supplied password is the NT hash\&. +.RE +.PP +\-A|\-\-authentication\-file=filename +.RS 4 +This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username = + password = + domain = + +.fi +.if n \{\ +.RE +.\} +.sp +Make certain that the permissions on the file restrict access from unwanted users! +.RE +.PP +\-P|\-\-machine\-pass +.RS 4 +Use stored machine account password\&. +.RE +.PP +\-\-simple\-bind\-dn=DN +.RS 4 +DN to use for a simple bind\&. +.RE +.PP +\-\-use\-kerberos=desired|required|off +.RS 4 +This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient use kerberos\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-use\-krb5\-ccache=CCACHE +.RS 4 +Specifies the credential cache location for Kerberos authentication\&. +.sp +This will set \-\-use\-kerberos=required too\&. +.RE +.PP +\-\-use\-winbind\-ccache +.RS 4 +Try to use the credential cache by winbind\&. +.RE +.PP +\-\-client\-protection=sign|encrypt|off +.RS 4 +Sets the connection protection the client tool should use\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBclient protection\fR\m[] +parameter in the +smb\&.conf +file\&. +.sp +In case you need more fine grained control you can use: +\-\-option=clientsmbencrypt=OPTION, +\-\-option=clientipcsigning=OPTION, +\-\-option=clientsigning=OPTION\&. +.RE +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The smbtree man page was written by Jelmer Vernooij\&. diff --git a/net/samba416/files/man/talloc.3 b/net/samba416/files/man/talloc.3 new file mode 100644 index 000000000000..6a10b4990c2e --- /dev/null +++ b/net/samba416/files/man/talloc.3 @@ -0,0 +1,683 @@ +'\" t +.\" Title: talloc +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 2015-04-10 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "TALLOC" "3" "2015\-04\-10" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +talloc \- hierarchical reference counted memory pool system with destructors +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.SH "DESCRIPTION" +.PP +If you are used to talloc from Samba3 then please read this carefully, as talloc has changed a lot\&. +.PP +The new talloc is a hierarchical, reference counted memory pool system with destructors\&. Quite a mouthful really, but not too bad once you get used to it\&. +.PP +Perhaps the biggest change from Samba3 is that there is no distinction between a "talloc context" and a "talloc pointer"\&. Any pointer returned from talloc() is itself a valid talloc context\&. This means you can do this: +.sp +.if n \{\ +.RS 4 +.\} +.nf + struct foo *X = talloc(mem_ctx, struct foo); + X\->name = talloc_strdup(X, "foo"); + +.fi +.if n \{\ +.RE +.\} +.PP +and the pointer +X\->name +would be a "child" of the talloc context +X +which is itself a child of +mem_ctx\&. So if you do +talloc_free(mem_ctx) +then it is all destroyed, whereas if you do +talloc_free(X) +then just +X +and +X\->name +are destroyed, and if you do +talloc_free(X\->name) +then just the name element of +X +is destroyed\&. +.PP +If you think about this, then what this effectively gives you is an n\-ary tree, where you can free any part of the tree with talloc_free()\&. +.PP +If you find this confusing, then I suggest you run the +testsuite +program to watch talloc in action\&. You may also like to add your own tests to +testsuite\&.c +to clarify how some particular situation is handled\&. +.SH "TALLOC API" +.PP +The following is a complete guide to the talloc API\&. Read it all at least twice\&. +.SS "(type *)talloc(const void *ctx, type);" +.PP +The talloc() macro is the core of the talloc library\&. It takes a memory +\fIctx\fR +and a +\fItype\fR, and returns a pointer to a new area of memory of the given +\fItype\fR\&. +.PP +The returned pointer is itself a talloc context, so you can use it as the +\fIctx\fR +argument to more calls to talloc() if you wish\&. +.PP +The returned pointer is a "child" of the supplied context\&. This means that if you talloc_free() the +\fIctx\fR +then the new child disappears as well\&. Alternatively you can free just the child\&. +.PP +The +\fIctx\fR +argument to talloc() can be NULL, in which case a new top level context is created\&. +.SS "void *talloc_size(const void *ctx, size_t size);" +.PP +The function talloc_size() should be used when you don\*(Aqt have a convenient type to pass to talloc()\&. Unlike talloc(), it is not type safe (as it returns a void *), so you are on your own for type checking\&. +.SS "(typeof(ptr)) talloc_ptrtype(const void *ctx, ptr);" +.PP +The talloc_ptrtype() macro should be used when you have a pointer and want to allocate memory to point at with this pointer\&. When compiling with gcc >= 3 it is typesafe\&. Note this is a wrapper of talloc_size() and talloc_get_name() will return the current location in the source file\&. and not the type\&. +.SS "int talloc_free(void *ptr);" +.PP +The talloc_free() function frees a piece of talloc memory, and all its children\&. You can call talloc_free() on any pointer returned by talloc()\&. +.PP +The return value of talloc_free() indicates success or failure, with 0 returned for success and \-1 for failure\&. The only possible failure condition is if +\fIptr\fR +had a destructor attached to it and the destructor returned \-1\&. See +\(lqtalloc_set_destructor()\(rq +for details on destructors\&. +.PP +If this pointer has an additional parent when talloc_free() is called then the memory is not actually released, but instead the most recently established parent is destroyed\&. See +\(lqtalloc_reference()\(rq +for details on establishing additional parents\&. +.PP +For more control on which parent is removed, see +\(lqtalloc_unlink()\(rq\&. +.PP +talloc_free() operates recursively on its children\&. +.PP +From the 2\&.0 version of talloc, as a special case, talloc_free() is refused on pointers that have more than one parent, as talloc would have no way of knowing which parent should be removed\&. To free a pointer that has more than one parent please use talloc_unlink()\&. +.PP +To help you find problems in your code caused by this behaviour, if you do try and free a pointer with more than one parent then the talloc logging function will be called to give output like this: +.PP + +.sp +.if n \{\ +.RS 4 +.\} +.nf + ERROR: talloc_free with references at some_dir/source/foo\&.c:123 + reference at some_dir/source/other\&.c:325 + reference at some_dir/source/third\&.c:121 + +.fi +.if n \{\ +.RE +.\} +.PP +Please see the documentation for talloc_set_log_fn() and talloc_set_log_stderr() for more information on talloc logging functions\&. +.SS "void *talloc_reference(const void *ctx, const void *ptr);" +.PP +The talloc_reference() function makes +\fIctx\fR +an additional parent of +\fIptr\fR\&. +.PP +The return value of talloc_reference() is always the original pointer +\fIptr\fR, unless talloc ran out of memory in creating the reference in which case it will return NULL (each additional reference consumes around 48 bytes of memory on intel x86 platforms)\&. +.PP +If +\fIptr\fR +is NULL, then the function is a no\-op, and simply returns NULL\&. +.PP +After creating a reference you can free it in one of the following ways: +.PP + +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +you can talloc_free() any parent of the original pointer\&. That will reduce the number of parents of this pointer by 1, and will cause this pointer to be freed if it runs out of parents\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +you can talloc_free() the pointer itself if it has at maximum one parent\&. This behaviour has been changed since the release of version 2\&.0\&. Further informations in the description of "talloc_free"\&. +.RE +.PP +For more control on which parent to remove, see +\(lqtalloc_unlink()\(rq\&. +.SS "int talloc_unlink(const void *ctx, void *ptr);" +.PP +The talloc_unlink() function removes a specific parent from +\fIptr\fR\&. The +\fIctx\fR +passed must either be a context used in talloc_reference() with this pointer, or must be a direct parent of ptr\&. +.PP +Note that if the parent has already been removed using talloc_free() then this function will fail and will return \-1\&. Likewise, if +\fIptr\fR +is NULL, then the function will make no modifications and return \-1\&. +.PP +Usually you can just use talloc_free() instead of talloc_unlink(), but sometimes it is useful to have the additional control on which parent is removed\&. +.SS "void talloc_set_destructor(const void *ptr, int (*destructor)(void *));" +.PP +The function talloc_set_destructor() sets the +\fIdestructor\fR +for the pointer +\fIptr\fR\&. A +\fIdestructor\fR +is a function that is called when the memory used by a pointer is about to be released\&. The destructor receives +\fIptr\fR +as an argument, and should return 0 for success and \-1 for failure\&. +.PP +The +\fIdestructor\fR +can do anything it wants to, including freeing other pieces of memory\&. A common use for destructors is to clean up operating system resources (such as open file descriptors) contained in the structure the destructor is placed on\&. +.PP +You can only place one destructor on a pointer\&. If you need more than one destructor then you can create a zero\-length child of the pointer and place an additional destructor on that\&. +.PP +To remove a destructor call talloc_set_destructor() with NULL for the destructor\&. +.PP +If your destructor attempts to talloc_free() the pointer that it is the destructor for then talloc_free() will return \-1 and the free will be ignored\&. This would be a pointless operation anyway, as the destructor is only called when the memory is just about to go away\&. +.SS "int talloc_increase_ref_count(const void *\fIptr\fR);" +.PP +The talloc_increase_ref_count(\fIptr\fR) function is exactly equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_reference(NULL, ptr); +.fi +.if n \{\ +.RE +.\} +.PP +You can use either syntax, depending on which you think is clearer in your code\&. +.PP +It returns 0 on success and \-1 on failure\&. +.SS "size_t talloc_reference_count(const void *\fIptr\fR);" +.PP +Return the number of references to the pointer\&. +.SS "void talloc_set_name(const void *ptr, const char *fmt, \&.\&.\&.);" +.PP +Each talloc pointer has a "name"\&. The name is used principally for debugging purposes, although it is also possible to set and get the name on a pointer in as a way of "marking" pointers in your code\&. +.PP +The main use for names on pointer is for "talloc reports"\&. See +\(lqtalloc_report_depth_cb()\(rq, +\(lqtalloc_report_depth_file()\(rq, +\(lqtalloc_report()\(rq +\(lqtalloc_report()\(rq +and +\(lqtalloc_report_full()\(rq +for details\&. Also see +\(lqtalloc_enable_leak_report()\(rq +and +\(lqtalloc_enable_leak_report_full()\(rq\&. +.PP +The talloc_set_name() function allocates memory as a child of the pointer\&. It is logically equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, talloc_asprintf(ptr, fmt, \&.\&.\&.)); +.fi +.if n \{\ +.RE +.\} +.PP +Note that multiple calls to talloc_set_name() will allocate more memory without releasing the name\&. All of the memory is released when the ptr is freed using talloc_free()\&. +.SS "void talloc_set_name_const(const void *\fIptr\fR, const char *\fIname\fR);" +.PP +The function talloc_set_name_const() is just like talloc_set_name(), but it takes a string constant, and is much faster\&. It is extensively used by the "auto naming" macros, such as talloc_p()\&. +.PP +This function does not allocate any memory\&. It just copies the supplied pointer into the internal representation of the talloc ptr\&. This means you must not pass a +\fIname\fR +pointer to memory that will disappear before +\fIptr\fR +is freed with talloc_free()\&. +.SS "void *talloc_named(const void *\fIctx\fR, size_t \fIsize\fR, const char *\fIfmt\fR, \&.\&.\&.);" +.PP +The talloc_named() function creates a named talloc pointer\&. It is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ptr = talloc_size(ctx, size); +talloc_set_name(ptr, fmt, \&.\&.\&.\&.); +.fi +.if n \{\ +.RE +.\} +.SS "void *talloc_named_const(const void *\fIctx\fR, size_t \fIsize\fR, const char *\fIname\fR);" +.PP +This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ptr = talloc_size(ctx, size); +talloc_set_name_const(ptr, name); +.fi +.if n \{\ +.RE +.\} +.SS "const char *talloc_get_name(const void *\fIptr\fR);" +.PP +This returns the current name for the given talloc pointer, +\fIptr\fR\&. See +\(lqtalloc_set_name()\(rq +for details\&. +.SS "void *talloc_init(const char *\fIfmt\fR, \&.\&.\&.);" +.PP +This function creates a zero length named talloc context as a top level context\&. It is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_named(NULL, 0, fmt, \&.\&.\&.); +.fi +.if n \{\ +.RE +.\} +.SS "void *talloc_new(void *\fIctx\fR);" +.PP +This is a utility macro that creates a new memory context hanging off an existing context, automatically naming it "talloc_new: __location__" where __location__ is the source line it is called from\&. It is particularly useful for creating a new temporary working context\&. +.SS "(\fItype\fR *)talloc_realloc(const void *\fIctx\fR, void *\fIptr\fR, \fItype\fR, \fIcount\fR);" +.PP +The talloc_realloc() macro changes the size of a talloc pointer\&. It has the following equivalences: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_realloc(ctx, NULL, type, 1) ==> talloc(ctx, type); +talloc_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr); +.fi +.if n \{\ +.RE +.\} +.PP +The +\fIctx\fR +argument is only used if +\fIptr\fR +is not NULL, otherwise it is ignored\&. +.PP +talloc_realloc() returns the new pointer, or NULL on failure\&. The call will fail either due to a lack of memory, or because the pointer has more than one parent (see +\(lqtalloc_reference()\(rq)\&. +.SS "void *talloc_realloc_size(const void *ctx, void *ptr, size_t size);" +.PP +the talloc_realloc_size() function is useful when the type is not known so the type\-safe talloc_realloc() cannot be used\&. +.SS "TYPE *talloc_steal(const void *\fInew_ctx\fR, const TYPE *\fIptr\fR);" +.PP +The talloc_steal() function changes the parent context of a talloc pointer\&. It is typically used when the context that the pointer is currently a child of is going to be freed and you wish to keep the memory for a longer time\&. +.PP +The talloc_steal() function returns the pointer that you pass it\&. It does not have any failure modes\&. +.PP +It is possible to produce loops in the parent/child relationship if you are not careful with talloc_steal()\&. No guarantees are provided as to your sanity or the safety of your data if you do this\&. +.PP +Note that if you try and call talloc_steal() on a pointer that has more than one parent then the result is ambiguous\&. Talloc will choose to remove the parent that is currently indicated by talloc_parent() and replace it with the chosen parent\&. You will also get a message like this via the talloc logging functions: +.PP + +.sp +.if n \{\ +.RS 4 +.\} +.nf + WARNING: talloc_steal with references at some_dir/source/foo\&.c:123 + reference at some_dir/source/other\&.c:325 + reference at some_dir/source/third\&.c:121 + +.fi +.if n \{\ +.RE +.\} +.PP +To unambiguously change the parent of a pointer please see the function +\(lqtalloc_reparent()\(rq\&. See the talloc_set_log_fn() documentation for more information on talloc logging\&. +.SS "TYPE *talloc_reparent(const void *\fIold_parent\fR, const void *\fInew_parent\fR, const TYPE *\fIptr\fR);" +.PP +The talloc_reparent() function changes the parent context of a talloc pointer\&. It is typically used when the context that the pointer is currently a child of is going to be freed and you wish to keep the memory for a longer time\&. +.PP +The talloc_reparent() function returns the pointer that you pass it\&. It does not have any failure modes\&. +.PP +The difference between talloc_reparent() and talloc_steal() is that talloc_reparent() can specify which parent you wish to change\&. This is useful when a pointer has multiple parents via references\&. +.SS "TYPE *talloc_move(const void *\fInew_ctx\fR, TYPE **\fIptr\fR);" +.PP +The talloc_move() function is a wrapper around talloc_steal() which zeros the source pointer after the move\&. This avoids a potential source of bugs where a programmer leaves a pointer in two structures, and uses the pointer from the old structure after it has been moved to a new one\&. +.SS "size_t talloc_total_size(const void *\fIptr\fR);" +.PP +The talloc_total_size() function returns the total size in bytes used by this pointer and all child pointers\&. Mostly useful for debugging\&. +.PP +Passing NULL is allowed, but it will only give a meaningful result if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&. +.SS "size_t talloc_total_blocks(const void *\fIptr\fR);" +.PP +The talloc_total_blocks() function returns the total memory block count used by this pointer and all child pointers\&. Mostly useful for debugging\&. +.PP +Passing NULL is allowed, but it will only give a meaningful result if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&. +.SS "void talloc_report(const void *ptr, FILE *f);" +.PP +The talloc_report() function prints a summary report of all memory used by +\fIptr\fR\&. One line of report is printed for each immediate child of ptr, showing the total memory and number of blocks used by that child\&. +.PP +You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&. +.SS "void talloc_report_full(const void *\fIptr\fR, FILE *\fIf\fR);" +.PP +This provides a more detailed report than talloc_report()\&. It will recursively print the entire tree of memory referenced by the pointer\&. References in the tree are shown by giving the name of the pointer that is referenced\&. +.PP +You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&. +.SS "" +.HP \w'void\ talloc_report_depth_cb('u +.BI "void talloc_report_depth_cb(" "const\ void\ *ptr" ", " "int\ depth" ", " "int\ max_depth" ", " "void\ (*callback)(const\ void\ *ptr,\ int\ depth,\ int\ max_depth,\ int\ is_ref,\ void\ *priv)" ", " "void\ *priv" ");" +.PP +This provides a more flexible reports than talloc_report()\&. It will recursively call the callback for the entire tree of memory referenced by the pointer\&. References in the tree are passed with +\fIis_ref = 1\fR +and the pointer that is referenced\&. +.PP +You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&. +.PP +The recursion is stopped when depth >= max_depth\&. max_depth = \-1 means only stop at leaf nodes\&. +.SS "" +.HP \w'void\ talloc_report_depth_file('u +.BI "void talloc_report_depth_file(" "const\ void\ *ptr" ", " "int\ depth" ", " "int\ max_depth" ", " "FILE\ *f" ");" +.PP +This provides a more flexible reports than talloc_report()\&. It will let you specify the depth and max_depth\&. +.SS "void talloc_enable_leak_report(void);" +.PP +This enables calling of talloc_report(NULL, stderr) when the program exits\&. In Samba4 this is enabled by using the \-\-leak\-report command line option\&. +.PP +For it to be useful, this function must be called before any other talloc function as it establishes a "null context" that acts as the top of the tree\&. If you don\*(Aqt call this function first then passing NULL to talloc_report() or talloc_report_full() won\*(Aqt give you the full tree printout\&. +.PP +Here is a typical talloc report: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc report on \*(Aqnull_context\*(Aq (total 267 bytes in 15 blocks) +libcli/auth/spnego_parse\&.c:55 contains 31 bytes in 2 blocks +libcli/auth/spnego_parse\&.c:55 contains 31 bytes in 2 blocks +iconv(UTF8,CP850) contains 42 bytes in 2 blocks +libcli/auth/spnego_parse\&.c:55 contains 31 bytes in 2 blocks +iconv(CP850,UTF8) contains 42 bytes in 2 blocks +iconv(UTF8,UTF\-16LE) contains 45 bytes in 2 blocks +iconv(UTF\-16LE,UTF8) contains 45 bytes in 2 blocks + +.fi +.if n \{\ +.RE +.\} +.SS "void talloc_enable_leak_report_full(void);" +.PP +This enables calling of talloc_report_full(NULL, stderr) when the program exits\&. In Samba4 this is enabled by using the \-\-leak\-report\-full command line option\&. +.PP +For it to be useful, this function must be called before any other talloc function as it establishes a "null context" that acts as the top of the tree\&. If you don\*(Aqt call this function first then passing NULL to talloc_report() or talloc_report_full() won\*(Aqt give you the full tree printout\&. +.PP +Here is a typical full report: +.sp +.if n \{\ +.RS 4 +.\} +.nf +full talloc report on \*(Aqroot\*(Aq (total 18 bytes in 8 blocks) +p1 contains 18 bytes in 7 blocks (ref 0) + r1 contains 13 bytes in 2 blocks (ref 0) + reference to: p2 + p2 contains 1 bytes in 1 blocks (ref 1) + x3 contains 1 bytes in 1 blocks (ref 0) + x2 contains 1 bytes in 1 blocks (ref 0) + x1 contains 1 bytes in 1 blocks (ref 0) + +.fi +.if n \{\ +.RE +.\} +.SS "(\fItype\fR *)talloc_zero(const void *\fIctx\fR, \fItype\fR);" +.PP +The talloc_zero() macro is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ptr = talloc(ctx, type); +if (ptr) memset(ptr, 0, sizeof(type)); +.fi +.if n \{\ +.RE +.\} +.SS "void *talloc_zero_size(const void *\fIctx\fR, size_t \fIsize\fR)" +.PP +The talloc_zero_size() function is useful when you don\*(Aqt have a known type\&. +.SS "void *talloc_memdup(const void *\fIctx\fR, const void *\fIp\fR, size_t size);" +.PP +The talloc_memdup() function is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ptr = talloc_size(ctx, size); +if (ptr) memcpy(ptr, p, size); +.fi +.if n \{\ +.RE +.\} +.SS "char *talloc_strdup(const void *\fIctx\fR, const char *\fIp\fR);" +.PP +The talloc_strdup() function is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ptr = talloc_size(ctx, strlen(p)+1); +if (ptr) memcpy(ptr, p, strlen(p)+1); +.fi +.if n \{\ +.RE +.\} +.PP +This function sets the name of the new pointer to the passed string\&. This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, ptr) +.fi +.if n \{\ +.RE +.\} +.SS "char *talloc_strndup(const void *\fIt\fR, const char *\fIp\fR, size_t \fIn\fR);" +.PP +The talloc_strndup() function is the talloc equivalent of the C library function strndup(3)\&. +.PP +This function sets the name of the new pointer to the passed string\&. This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, ptr) +.fi +.if n \{\ +.RE +.\} +.SS "char *talloc_vasprintf(const void *\fIt\fR, const char *\fIfmt\fR, va_list \fIap\fR);" +.PP +The talloc_vasprintf() function is the talloc equivalent of the C library function vasprintf(3)\&. +.PP +This function sets the name of the new pointer to the new string\&. This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, ptr) +.fi +.if n \{\ +.RE +.\} +.SS "char *talloc_asprintf(const void *\fIt\fR, const char *\fIfmt\fR, \&.\&.\&.);" +.PP +The talloc_asprintf() function is the talloc equivalent of the C library function asprintf(3)\&. +.PP +This function sets the name of the new pointer to the passed string\&. This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, ptr) +.fi +.if n \{\ +.RE +.\} +.SS "char *talloc_asprintf_append(char *s, const char *fmt, \&.\&.\&.);" +.PP +The talloc_asprintf_append() function appends the given formatted string to the given string\&. +.PP +This function sets the name of the new pointer to the new string\&. This is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, ptr) +.fi +.if n \{\ +.RE +.\} +.SS "(type *)talloc_array(const void *ctx, type, unsigned int count);" +.PP +The talloc_array() macro is equivalent to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +(type *)talloc_size(ctx, sizeof(type) * count); +.fi +.if n \{\ +.RE +.\} +.PP +except that it provides integer overflow protection for the multiply, returning NULL if the multiply overflows\&. +.SS "void *talloc_array_size(const void *ctx, size_t size, unsigned int count);" +.PP +The talloc_array_size() function is useful when the type is not known\&. It operates in the same way as talloc_array(), but takes a size instead of a type\&. +.SS "(typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, unsigned int count);" +.PP +The talloc_ptrtype() macro should be used when you have a pointer to an array and want to allocate memory of an array to point at with this pointer\&. When compiling with gcc >= 3 it is typesafe\&. Note this is a wrapper of talloc_array_size() and talloc_get_name() will return the current location in the source file\&. and not the type\&. +.SS "void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size)" +.PP +This is a non\-macro version of talloc_realloc(), which is useful as libraries sometimes want a realloc function pointer\&. A realloc(3) implementation encapsulates the functionality of malloc(3), free(3) and realloc(3) in one call, which is why it is useful to be able to pass around a single function pointer\&. +.SS "void *talloc_autofree_context(void);" +.PP +This is a handy utility function that returns a talloc context which will be automatically freed on program exit\&. This can be used to reduce the noise in memory leak reports\&. +.SS "void *talloc_check_name(const void *ptr, const char *name);" +.PP +This function checks if a pointer has the specified +\fIname\fR\&. If it does then the pointer is returned\&. It it doesn\*(Aqt then NULL is returned\&. +.SS "(type *)talloc_get_type(const void *ptr, type);" +.PP +This macro allows you to do type checking on talloc pointers\&. It is particularly useful for void* private pointers\&. It is equivalent to this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +(type *)talloc_check_name(ptr, #type) +.fi +.if n \{\ +.RE +.\} +.SS "talloc_set_type(const void *ptr, type);" +.PP +This macro allows you to force the name of a pointer to be a particular +\fItype\fR\&. This can be used in conjunction with talloc_get_type() to do type checking on void* pointers\&. +.PP +It is equivalent to this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +talloc_set_name_const(ptr, #type) +.fi +.if n \{\ +.RE +.\} +.SS "talloc_set_log_fn(void (*log_fn)(const char *message));" +.PP +This function sets a logging function that talloc will use for warnings and errors\&. By default talloc will not print any warnings or errors\&. +.SS "talloc_set_log_stderr(void);" +.PP +This sets the talloc log function to write log messages to stderr +.SH "PERFORMANCE" +.PP +All the additional features of talloc(3) over malloc(3) do come at a price\&. We have a simple performance test in Samba4 that measures talloc() versus malloc() performance, and it seems that talloc() is about 10% slower than malloc() on my x86 Debian Linux box\&. For Samba, the great reduction in code complexity that we get by using talloc makes this worthwhile, especially as the total overhead of talloc/malloc in Samba is already quite small\&. +.SH "SEE ALSO" +.PP +malloc(3), strndup(3), vasprintf(3), asprintf(3), +\m[blue]\fB\%http://talloc.samba.org/\fR\m[] +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.SH "COPYRIGHT/LICENSE" +.PP +Copyright (C) Andrew Tridgell 2004 +.PP +This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&. +.PP +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&. +.PP +You should have received a copy of the GNU General Public License along with this program; if not, see http://www\&.gnu\&.org/licenses/\&. diff --git a/net/samba416/files/man/tdbbackup.8 b/net/samba416/files/man/tdbbackup.8 new file mode 100644 index 000000000000..92f510aecccf --- /dev/null +++ b/net/samba416/files/man/tdbbackup.8 @@ -0,0 +1,129 @@ +'\" t +.\" Title: tdbbackup +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 2015-04-25 +.\" Manual: System Administration tools +.\" Source: Samba 3.6 +.\" Language: English +.\" +.TH "TDBBACKUP" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tdbbackup \- tool for backing up and for validating the integrity of samba \&.tdb files +.SH "SYNOPSIS" +.HP \w'\fBtdbbackup\fR\ 'u +\fBtdbbackup\fR [\-s\ suffix] [\-v] [\-h] [\-l] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +\fBtdbbackup\fR +is a tool that may be used to backup samba \&.tdb files\&. This tool may also be used to verify the integrity of the \&.tdb files prior to samba startup or during normal operation\&. If it finds file damage and it finds a prior backup the backup file will be restored\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Get help information\&. +.RE +.PP +\-s suffix +.RS 4 +The +\fB\-s\fR +option allows the administrator to specify a file backup extension\&. This way it is possible to keep a history of tdb backup files by using a new suffix for each backup\&. +.RE +.PP +\-v +.RS 4 +The +\fB\-v\fR +will check the database for damages (corrupt data) which if detected causes the backup to be restored\&. +.RE +.PP +\-l +.RS 4 +This options disables any locking, by passing TDB_NOLOCK to tdb_open_ex()\&. Only use this for database files which are not used by any other process! And also only if it is otherwise not possible to open the database, e\&.g\&. databases which were created with mutex locking\&. +.RE +.SH "COMMANDS" +.PP +\fIGENERAL INFORMATION\fR +.PP +The +\fBtdbbackup\fR +utility can safely be run at any time\&. It was designed so that it can be used at any time to validate the integrity of tdb files, even during Samba operation\&. Typical usage for the command will be: +.PP +tdbbackup [\-s suffix] *\&.tdb +.PP +Before restarting samba the following command may be run to validate \&.tdb files: +.PP +tdbbackup \-v [\-s suffix] *\&.tdb +.PP +Samba \&.tdb files are stored in various locations, be sure to run backup all \&.tdb file on the system\&. Important files includes: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBsecrets\&.tdb\fR +\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBpassdb\&.tdb\fR +\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fB*\&.tdb\fR +located in the /usr/local/samba/var directory or on some systems in the /var/cache or /var/lib/samba directories\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 3 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The tdbbackup man page was written by John H Terpstra\&. diff --git a/net/samba416/files/man/tdbdump.8 b/net/samba416/files/man/tdbdump.8 new file mode 100644 index 000000000000..86d9e2c67556 --- /dev/null +++ b/net/samba416/files/man/tdbdump.8 @@ -0,0 +1,72 @@ +'\" t +.\" Title: tdbdump +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 2015-04-25 +.\" Manual: System Administration tools +.\" Source: Samba 3.6 +.\" Language: English +.\" +.TH "TDBDUMP" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tdbdump \- tool for printing the contents of a TDB file +.SH "SYNOPSIS" +.HP \w'\fBtdbdump\fR\ 'u +\fBtdbdump\fR [\-k\ \fIkeyname\fR] [\-e] [\-h] {filename} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +\fBtdbdump\fR +is a very simple utility that \*(Aqdumps\*(Aq the contents of a TDB (Trivial DataBase) file to standard output in a human\-readable format\&. +.PP +This tool can be used when debugging problems with TDB files\&. It is intended for those who are somewhat familiar with Samba internals\&. +.SH "OPTIONS" +.PP +\-h +.RS 4 +Get help information\&. +.RE +.PP +\-k \fIkeyname\fR +.RS 4 +The +\fB\-k\fR +option restricts dumping to a single key, if found\&. +.RE +.PP +\-e +.RS 4 +The +\fB\-e\fR +tries to dump out from a corrupt database\&. Naturally, such a dump is unreliable, at best\&. +.RE +.SH "VERSION" +.PP +This man page is correct for version 3 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The tdbdump man page was written by Jelmer Vernooij\&. diff --git a/net/samba416/files/man/tdbrestore.8 b/net/samba416/files/man/tdbrestore.8 new file mode 100644 index 000000000000..28632ac094c5 --- /dev/null +++ b/net/samba416/files/man/tdbrestore.8 @@ -0,0 +1,54 @@ +'\" t +.\" Title: tdbrestore +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 2015-04-25 +.\" Manual: System Administration tools +.\" Source: Samba 3.6 +.\" Language: English +.\" +.TH "TDBRESTORE" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tdbrestore \- tool for creating a TDB file out of a tdbdump output +.SH "SYNOPSIS" +.HP \w'\fBtdbrestore\fR\ 'u +\fBtdbrestore\fR {tdbfilename} +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +\fBtdbrestore\fR +is a very simple utility that \*(Aqrestores\*(Aq the contents of dump file into TDB (Trivial DataBase) file\&. The dump file is obtained from the tdbdump command\&. +.PP +This tool wait on the standard input for the content of the dump and will write the tdb in the tdbfilename parameter\&. +.PP +This tool can be used for unpacking the content of tdb as backup mean\&. +.SH "VERSION" +.PP +This man page is correct for version 3 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. This tool was initially written by Volker Lendecke based on an idea by Simon McVittie\&. +.PP +The tdbrestore man page was written by Matthieu Patou\&. diff --git a/net/samba416/files/man/tdbtool.8 b/net/samba416/files/man/tdbtool.8 new file mode 100644 index 000000000000..04ed76594c19 --- /dev/null +++ b/net/samba416/files/man/tdbtool.8 @@ -0,0 +1,170 @@ +'\" t +.\" Title: tdbtool +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 2015-04-25 +.\" Manual: System Administration tools +.\" Source: Samba 4.0 +.\" Language: English +.\" +.TH "TDBTOOL" "8" "2015\-04\-25" "Samba 4\&.0" "System Administration tools" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tdbtool \- manipulate the contents TDB files +.SH "SYNOPSIS" +.HP \w'\fBtdbtool\fR\ 'u +\fBtdbtool\fR +.HP \w'\fBtdbtool\fR\ 'u +\fBtdbtool\fR [\-l] \fITDBFILE\fR [\fICOMMANDS\fR...] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(1) +suite\&. +.PP +\fBtdbtool\fR +a tool for displaying and altering the contents of Samba TDB (Trivial DataBase) files\&. Each of the commands listed below can be entered interactively or provided on the command line\&. +.SH "OPTIONS" +.PP +\-l +.RS 4 +This options disables any locking, by passing TDB_NOLOCK to tdb_open_ex()\&. Only use this for database files which are not used by any other process! And also only if it is otherwise not possible to open the database, e\&.g\&. databases which were created with mutex locking\&. +.RE +.SH "COMMANDS" +.PP +\fBcreate\fR \fITDBFILE\fR +.RS 4 +Create a new database named +\fITDBFILE\fR\&. +.RE +.PP +\fBopen\fR \fITDBFILE\fR +.RS 4 +Open an existing database named +\fITDBFILE\fR\&. +.RE +.PP +\fBerase\fR +.RS 4 +Erase the current database\&. +.RE +.PP +\fBdump\fR +.RS 4 +Dump the current database as strings\&. +.RE +.PP +\fBcdump\fR +.RS 4 +Dump the current database as connection records\&. +.RE +.PP +\fBkeys\fR +.RS 4 +Dump the current database keys as strings\&. +.RE +.PP +\fBhexkeys\fR +.RS 4 +Dump the current database keys as hex values\&. +.RE +.PP +\fBinfo\fR +.RS 4 +Print summary information about the current database\&. +.RE +.PP +\fBinsert\fR \fIKEY\fR \fIDATA\fR +.RS 4 +Insert a record into the current database\&. +.RE +.PP +\fBmove\fR \fIKEY\fR \fITDBFILE\fR +.RS 4 +Move a record from the current database into +\fITDBFILE\fR\&. +.RE +.PP +\fBstore\fR \fIKEY\fR \fIDATA\fR +.RS 4 +Store (replace) a record in the current database\&. +.RE +.PP +\fBshow\fR \fIKEY\fR +.RS 4 +Show a record by key\&. +.RE +.PP +\fBdelete\fR \fIKEY\fR +.RS 4 +Delete a record by key\&. +.RE +.PP +\fBlist\fR +.RS 4 +Print the current database hash table and free list\&. +.RE +.PP +\fBfree\fR +.RS 4 +Print the current database and free list\&. +.RE +.PP +\fB!\fR \fICOMMAND\fR +.RS 4 +Execute the given system command\&. +.RE +.PP +\fBfirst\fR +.RS 4 +Print the first record in the current database\&. +.RE +.PP +\fBnext\fR +.RS 4 +Print the next record in the current database\&. +.RE +.PP +\fBcheck\fR +.RS 4 +Check the integrity of the current database\&. +.RE +.PP +\fBrepack\fR +.RS 4 +Repack a database using a temporary file to remove fragmentation\&. +.RE +.PP +\fBquit\fR +.RS 4 +Exit +\fBtdbtool\fR\&. +.RE +.SH "CAVEATS" +.PP +The contents of the Samba TDB files are private to the implementation and should not be altered with +\fBtdbtool\fR\&. +.SH "VERSION" +.PP +This man page is correct for version 3\&.6 of the Samba suite\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/testparm.1 b/net/samba416/files/man/testparm.1 new file mode 100644 index 000000000000..cc303c18403a --- /dev/null +++ b/net/samba416/files/man/testparm.1 @@ -0,0 +1,194 @@ +'\" t +.\" Title: testparm +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "TESTPARM" "1" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +testparm \- check an smb\&.conf configuration file for internal correctness +.SH "SYNOPSIS" +.HP \w'\ 'u +testparm [\-s|\-\-suppress\-prompt] [\-v|\-\-verbose] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] {config\ filename} [hostname\ hostIP] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +testparm +is a very simple test program to check an +\fBsmbd\fR(8) +configuration file for internal correctness\&. If this program reports no problems, you can use the configuration file with confidence that +smbd +will successfully load the configuration file\&. +.PP +Note that this is +\fINOT\fR +a guarantee that the services specified in the configuration file will be available or will operate as expected\&. +.PP +If the optional host name and host IP address are specified on the command line, this test program will run through the service entries reporting whether the specified host has access to each service\&. +.PP +If +testparm +finds an error in the +smb\&.conf +file it returns an exit code of 1 to the calling program, else it returns an exit code of 0\&. This allows shell scripts to test the output from +testparm\&. +.SH "OPTIONS" +.PP +\-s|\-\-suppress\-prompt +.RS 4 +Without this option, +testparm +will prompt for a carriage return after printing the service names and before dumping the service definitions\&. +.RE +.PP +\-v|\-\-verbose +.RS 4 +If this option is specified, testparm will also output all options that were not used in +\fBsmb.conf\fR(5) +and are thus set to their defaults\&. +.RE +.PP +\-\-parameter\-name parametername +.RS 4 +Dumps the named parameter\&. If no section\-name is set the view is limited by default to the global section\&. It is also possible to dump a parametrical option\&. Therefore the option has to be separated by a colon from the parametername\&. +.RE +.PP +\-\-section\-name sectionname +.RS 4 +Dumps the named section\&. +.RE +.PP +\-\-show\-all\-parameters +.RS 4 +Show the parameters, type, possible values\&. +.RE +.PP +\-l|\-\-skip\-logic\-checks +.RS 4 +Skip the global checks\&. +.RE +.PP +\-?|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +\-\-usage +.RS 4 +Display brief usage message\&. +.RE +.PP +\-d|\-\-debuglevel=DEBUGLEVEL +.RS 4 +\fIlevel\fR +is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&. +.sp +The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&. +.sp +Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&. +.sp +Note that specifying this parameter here will override the +\m[blue]\fBlog level\fR\m[] +parameter in the +smb\&.conf +file\&. +.RE +.PP +\-\-debug\-stdout +.RS 4 +This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&. +.RE +.PP +\-\-configfile= +.RS 4 +The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as +\m[blue]\fBclient smb encrypt\fR\m[]\&. See +smb\&.conf +for more information\&. The default configuration file name is determined at compile time\&. +.RE +.PP +\-\-option== +.RS 4 +Set the +\fBsmb.conf\fR(5) +option "" to value "" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&. +.RE +.PP +\-V|\-\-version +.RS 4 +Prints the program version number\&. +.RE +.PP +configfilename +.RS 4 +This is the name of the configuration file to check\&. If this parameter is not present then the default +\fBsmb.conf\fR(5) +file will be checked\&. +.RE +.PP +hostname +.RS 4 +If this parameter and the following are specified, then +testparm +will examine the +\fIhosts allow\fR +and +\fIhosts deny\fR +parameters in the +\fBsmb.conf\fR(5) +file to determine if the hostname with this IP address would be allowed access to the +smbd +server\&. If this parameter is supplied, the hostIP parameter must also be supplied\&. +.RE +.PP +hostIP +.RS 4 +This is the IP address of the host specified in the previous parameter\&. This address must be supplied if the hostname parameter is supplied\&. +.RE +.SH "FILES" +.PP +\fBsmb.conf\fR(5) +.RS 4 +This is usually the name of the configuration file used by +\fBsmbd\fR(8)\&. +.RE +.SH "DIAGNOSTICS" +.PP +The program will issue a message saying whether the configuration file loaded OK or not\&. This message may be preceded by errors and warnings if the file did not load\&. If the file was loaded OK, the program then dumps all known service details to stdout\&. +.PP +For certain use cases, SMB protocol requires use of cryptographic algorithms which are known to be weak and already broken\&. DES and ARCFOUR (RC4) ciphers and the SHA1 and MD5 hash algorithms are considered weak but they are required for backward compatibility\&. The testparm utility shows whether the Samba tools will fall back to these weak crypto algorithms if it is not possible to use strong cryptography by default\&. In FIPS mode weak crypto cannot be enabled\&. +.SH "VERSION" +.PP +This man page is part of version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBsmb.conf\fR(5), +\fBsmbd\fR(8) +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. diff --git a/net/samba416/files/man/traffic_learner.7 b/net/samba416/files/man/traffic_learner.7 new file mode 100644 index 000000000000..c6604e0e2579 --- /dev/null +++ b/net/samba416/files/man/traffic_learner.7 @@ -0,0 +1,128 @@ +'\" t +.\" Title: traffic_learner +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "TRAFFIC_LEARNER" "7" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +traffic_learner \- Samba tool to assist with traffic generation\&. +.SH "SYNOPSIS" +.HP \w'\ 'u +traffic_learner {\-o\ OUTPUT_FILE\ \&.\&.\&.} [\-h] [\-\-dns\-mode\ {inline|count}] [SUMMARY_FILE] [SUMMARY_FILE\ \&.\&.\&.] +.SH "DESCRIPTION" +.PP +This tool is part of the +\fBsamba\fR(7) +suite\&. +.PP +This tool assists with generation of Samba traffic\&. It takes a traffic\-summary file (produced by +traffic_summary\&.pl) as input and produces a traffic\-model file that can be used by +traffic_replay +for traffic generation\&. +.PP +The model file summarizes the types of traffic (\*(Aqconversations\*(Aq between a host and a Samba DC) that occur on a network\&. The model file describes the traffic in a way that allows it to be scaled so that either more (or fewer) packets get sent, and the packets can be sent at a faster (or slower) rate than that seen in the network\&. +.SH "OPTIONS" +.PP +\-h|\-\-help +.RS 4 +Print a summary of command line options\&. +.RE +.PP +SUMMARY_FILE +.RS 4 +File containing a network traffic\-summary\&. The traffic\-summary file should be generated by +traffic_summary\&.pl +from a packet capture of actual network traffic\&. More than one file can be specified, in which case the traffic will be combined into a single traffic\-model\&. If no SUMMARY_FILE is specified, this tool will read the traffic\-summary from STDIN, i\&.e\&. you can pipe the output from traffic_summary\&.pl directly to this tool\&. +.RE +.PP +\-o|\-\-out OUTPUT_FILE +.RS 4 +The traffic\-model that is produced will be written to this file\&. The OUTPUT_FILE can then be passed to +traffic_replay +to generate (and manipulate) Samba network traffic\&. +.RE +.PP +\-\-dns\-mode [inline|count] +.RS 4 +How DNS traffic should be handled by the model\&. +.RE +.SH "EXAMPLES" +.PP +To take a traffic\-summary file and produce a traffic\-model file, use: +.PP +traffic_learner traffic\-summary\&.txt \-o traffic\-model\&.txt +.PP +To generate a traffic\-model from a packet capture, you can pipe the traffic summary to STDIN using: +.PP +tshark \-r capture\&.pcapng \-T pdml | traffic_summary\&.pl | traffic_learner \-o traffic\-model\&.txt +.SH "OUTPUT FILE FORMAT" +.PP +The output model file describes a Markov model estimating the probability of a packet occurring given the last two packets\&. +.PP +The count of each continuation after a pair of successive packets is stored, and the ratios of these counts is used to calculate probabilities for the next packet\&. +.PP +The model is stored in JSON format, and also contains information about the packet rate and DNS traffic rate\&. +.SS "Example ngram listing" +.PP +The following listing shows a contrived example of a single ngram entry\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + "ngrams": { + "ldap:0\etdcerpc:11": { + "lsarpc:77": 1, + "ldap:2": 370, + "ldap:3": 62, + "wait:3": 2, + "\-": 1 + }, [\&.\&.\&.] + } + +.fi +.if n \{\ +.RE +.\} +.PP +This counts the observed continuations after an ldap packet with opcode 0 (a bind) followed by a dcerpc packet with opcode 11 (also a bind)\&. The most common next packet is "ldap:2" which is an unbind, so this is the most likely packet type to be selected in replay\&. At the other extreme, lsarpc opcode 77 (lookup names) has been seen only once, and it is unlikely but possible that this will be selected in replay\&. +.PP +There are two special packet types here\&. "wait:3" refers to a temporary pause in the conversation, where the "3" pseudo\-opcode indicates the length of the wait on an exponential scale\&. That is, a "wait:4" pause would be about 2\&.7 times longer that a "wait:3", which in turn would be similarly longer than a "wait:2"\&. +.PP +The other special packet is "\-", which represents the limit of the conversation\&. In the example, this indicates that one observed conversation ended after this particular ngram\&. This special opcode is also used at the beginning of conversations, which are indicated by the ngram "\-\et\-"\&. +.SH "VERSION" +.PP +This man page is complete for version 4\&.16\&.4 of the Samba suite\&. +.SH "SEE ALSO" +.PP +\fBtraffic_replay\fR(7)\&. +.SH "AUTHOR" +.PP +The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. +.PP +The traffic_learner tool was developed by the Samba team at Catalyst IT Ltd\&. +.PP +The traffic_learner manpage was written by Tim Beale\&. diff --git a/net/samba416/files/man/traffic_replay.7 b/net/samba416/files/man/traffic_replay.7 new file mode 100644 index 000000000000..a6599ce143bf --- /dev/null +++ b/net/samba416/files/man/traffic_replay.7 @@ -0,0 +1,380 @@ +'\" t +.\" Title: traffic_replay +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/09/2022 +.\" Manual: User Commands +.\" Source: Samba 4.16.4 +.\" Language: English +.\" +.TH "TRAFFIC_REPLAY" "7" "08/09/2022" "Samba 4\&.16\&.4" "User Commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +traffic_replay \- Samba traffic generation tool\&. +.SH "SYNOPSIS" +.HP \w'\ 'u +traffic_replay [\-F,\ \-\-fixed\-password\ ] [\-T,\ \-\-packets\-per\-second\ ] [\-S,\ \-\-scale\-traffic\ ] [\-r,\ \-\-replay\-rate\ ] [\-D,\ \-\-duration\ ] [\-\-traffic\-summary\ ] [\-I,\ \-\-instance\-id\ ] [\-K,\ \-\-prefer\-kerberos] [\-B,\ \-\-badpassword\-frequency\ ] [\-\-dns\-rate\ ] [\-t,\ \-\-timing\-data\ ] [\-\-random\-seed\ ] [\-U,\ \-\-username\ user] [\-\-password\ ] [\-W\ \-\-workgroup\ ] [\-\-realm\ ] [\-s,\ \-\-config\-file\ ] [\-k,\ \-\-kerberos\ ] [\-\-ipaddress\
] [\-P,\ \-\-machine\-pass] [\-\-option\