Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently replicating the setup of a CentOS box an am running into a strange error while trying to mount a samba share that resides on a NAS. The error I'm getting is:

mount error 127 = Key has expired

Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

The settings are identical to the old machine, the password is definitely correct as well. I have googled the issue of course, and looked at every single page that references this issue (not that many) and have still not found an answer.

The older CentOS box is using version 3.0.28-0.el4.9 of Samba and the one I'm trying to setup now is 3.0.33-3.7.el5_3.1. I don't know if this has anything to do with it but it's certainly one of the only differences between the 2 setups.

When I try the mount command this appears in the syslog:

Sep 8 10:51:54 helvetica2 kernel: Status code returned 0xc0000072 NT_STATUS_ACCOUNT_DISABLED

Sep 8 10:51:54 helvetica2 kernel: CIFS VFS: Send error in SessSetup = -127

Sep 8 10:51:54 helvetica2 kernel: CIFS VFS: cifs_mount failed w/return code = -127

The account is very much not disabled as it works on the old box using the same credentials.

Has anyone else seen this problem?

Thanks!

share|improve this question
1  
Are you using Kerberos on the old server by any chance to get an authenticated ticket, but not on the new system? –  pjd Dec 21 '09 at 4:11
add comment

7 Answers

Maybe you solved this....

Basically yoiu go to the computer you try to connect to, login and reissue the password for the account you use... you can re-use the same password if you want... you are then good for a certain number of days as per your system defaults if you didn't change anyting 8)

share|improve this answer
add comment

I had the similar problem. The reason for it is that your password may have expired or need to change it You can solve it as follows:

  1. Login into the Windows Machine or Remote Desktop it
  2. After entering your current correct credentials, you'll be prompted to change the password
  3. Provide a new password
  4. After the password is successfully changed, try mounting again (and it should work)
share|improve this answer
add comment

I've got same error with ubuntu 11.04/windows 7

After I tried to log in (on windows machine) as user, which credentials used in samba mount options,

windows said account password expired and prompted for new password.

I changed account password both at windows machine and in .credentials,

now my share mounts.

share|improve this answer
    
oops, it seems like I missed Laurent answer –  jonny May 27 '11 at 18:26
add comment

Maybe I'm pedant, but have you tried from another machine after you have got the error?

Are you really sure the account is not just expired now?

EDIT:

Does this post help?

EDIT2:

Does it works if you use smbfs instead of cifs ?

share|improve this answer
    
Yep, the old machine works fine. It can mount the share but the new one can't. The account is set to never expire in AD as well. –  djk Sep 8 '09 at 10:35
    
Thanks for the link in your edit but sadly trying what's in there doesn't make any difference. –  djk Sep 9 '09 at 8:57
    
Nope, smbfs isn't valid in CentOS 5.3. Have to use CIFS. –  djk Sep 9 '09 at 14:17
    
sorry can't help then –  AlberT Sep 9 '09 at 15:05
add comment

Are the date/time on your NAS and Linux machine synced?

share|improve this answer
    
Yep, both using the same NTP server. Exactly the same time on both. –  djk Sep 25 '09 at 10:30
add comment

the only three factor that I personnaly faced using CIFS on linux where (as said upper):

1°/-Kerberos ticket refresh error (umount your point, stop the kernel module, purge every cache).

2°/-Password issues due to some weird ciphering problems (quite impossible to solve quickly without deeper inspection of logs and network capture on both side).

3°/-Time setup on the linux side difer from the windows one for more than a second.

I do not said those upper points are the solution, but, it can help ;-)

See ya!

share|improve this answer
add comment

The same thing just happened to me. Check your login account and change the Password expires to Never

See below for my net user output.

C:\Users\usr>net user remote
User name                    remote
Full Name
Comment
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never

Password last set            9/15/2013 1:33:43 PM
Password expires             10/27/2013 1:33:43 PM <<<<<<< # password expired
Password changeable          9/15/2013 1:33:43 PM
Password required            Yes
User may change password     Yes

To set the account's Password expires field to Never, run the following command.

WMIC USERACCOUNT WHERE "Name='username" SET PasswordExpires=FALSE

So, for example, for my account, I would run:

WMIC USERACCOUNT WHERE "Name='remote" SET PasswordExpires=FALSE

Command prompt output:

wmic:root\cli>useraccount where "name='remote'" set PasswordExpires=FALSE
Update property(s) of '\\READINGRAINBOW\ROOT\CIMV2:Win32_UserAccount.Domain="ReadingRainbow",Name="remote"' (Y/N/?)? y
Property(s) update successful.
wmic:root\cli>

When you check the account again it should be changed to Never

C:\Users\usr>net user remote
User name                    remote
Full Name
Comment
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never

Password last set            10/28/2013 8:33:29 PM
Password expires             Never                  <<<<<<< # Changed to Never
Password changeable          10/28/2013 8:33:29 PM
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.