Mounting cifs share exported by one host (hostx) works ok:[piotr@demon ~]$ sudo mount -t cifs //hostx.intranet.local/pdobrogost /home/piotr/remote/hostx/ --verbose -o credentials=/home/piotr/.config/cifs-credentials.conf,uid=piotr,gid=piotrdomain=domainxmount.cifs kernel mount options: ip=1.2.3.4,unc=\\hostx.intranet.local\pdobrogost,uid=1000,gid=1000,user=pdobrogost,,domain=domainx,pass=********The same does not work for cifs share exported by another host (hosty):[piotr@demon ~]$ sudo mount -t cifs //hosty.intranet.local/pdobrogost /home/piotr/remote/hosty/ --verbose -o credentials=/home/piotr/.config/cifs-credentials.conf,uid=piotr,gid=piotrdomain=domainxmount.cifs kernel mount options: ip=1.2.3.5,unc=\\hosty.intranet.local\pdobrogost,uid=1000,gid=1000,user=pdobrogost,,domain=domainx,pass=********mount error(22): Invalid argumentRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)/home/piotr/.config/cifs-credentials.conf looks like this:username=my_cifs_usernamepassword=my_cifs_passworddomain=domainxI tried connecting to cifs share on hosty using smbclient and got this:[piotr@demon ~]$ smbclient -d 3 -A /home/piotr/.config/cifs-credentials.conf -W domainx //hosty.intranet.local/pdobrogostlp_load_ex: refreshing parametersInitialising global parametersrlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)params.c:pm_process() - Processing configuration file /etc/samba/smb.confProcessing section [global]added interface p1p1 ip=10.92.2.80 bcast=10.92.2.255 netmask=255.255.255.0Client started (version 4.1.6).tdb(/var/lib/samba/gencache.tdb): tdb_open_ex: could not open file /var/lib/samba/gencache.tdb: Permission deniedresolve_lmhosts: Attempting lmhosts lookup for name hosty.intranet.local<0x20>resolve_lmhosts: Attempting lmhosts lookup for name hosty.intranet.local<0x20>resolve_wins: WINS server resolution selected and no WINS servers listed.resolve_hosts: Attempting host lookup for name hosty.intranet.local<0x20>Connecting to 1.2.3.5 at port 445Doing spnego session setup (blob length=97)got OID=1.2.840.113554.1.2.2got OID=1.2.840.48018.1.2.2got OID=1.3.6.1.4.1.311.2.2.10got principal=cifs/hosty.intranet.local@INTRANET.LOCALGot challenge flags:Got NTLMSSP neg_flags=0x60898215NTLMSSP: Set final flags:Got NTLMSSP neg_flags=0x60088215NTLMSSP Sign/Seal - Initialising with flags:Got NTLMSSP neg_flags=0x60088215SPNEGO login failed: Unexpected information receivedsession setup failed: NT_STATUS_INVALID_PARAMETERlocal system running Fedora 20mount.cifs version: 6.3smbclient version: 4.1.6hostx running Debian 6.0.10Samba version on hostx: 2:3.5.6~dfsg-3squeeze11hosty running Red Hat Enterprise Linux ES release 4Samba version on hosty: samba-3.0.33-0.19.el4_8.3In samba logs on hosty there are the following entries:Nov 14 15:09:37 hosty smbd[28956]: [2014/11/14 15:09:37, 0] rpc_client/cli_pipe.c:cli_pipe_verify_schannel(354)Nov 14 15:09:37 hosty smbd[28956]:   cli_pipe_verify_schannel: auth_len 56.Nov 14 15:09:37 hosty smbd[28956]: [2014/11/14 15:09:37, 0] auth/auth_domain.c:domain_client_validate(260)Nov 14 15:09:37 hosty smbd[28956]:   domain_client_validate: unable to validate password for user pdobrogost in domain domainx to Domain controller A.INTRANET.LOCAL. Error was NT_STATUS_INVALID_PARAMETER.which would suggest the problem lies in authorizing my password by Active Directory domain controller.
How to debug NT_STATUS_INVALID_PARAMETER when mounting cifs share?
mount;windows;cifs