Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I could not find a pdbedit or smbldap-userlist option to list just the active samba users.

Solution on Question [1] lists all users and machines and smbldap-userlist -ua lists all users, even if they are inactive. I mean Inactive, not a logged off user but a user that is not active on the domain anymore.

I tried awk and grep to parse the output but I could not match a pattern on [status SMB] column.

Does somebody has a command-line or shell solution? (although, a Python solution will be very welcome)

[1] List Samba users?

share|improve this question

1 Answer 1

The "smbstatus" tool should show the currently active users on a server. There might be some false positives as workstations often keep connections open after a user has logged off.

share|improve this answer
    
Thanks for the reply. But I didn't explain the problem well. I want the users that CAN login, not the users logged on a certain time. I rephrased the question. –  Josir Nov 9 '11 at 19:16

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.