Display connected users in the GUI?

Status
Not open for further replies.

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
I"m plugging through some connection issues, and I would love to be able to see the credentials that Windows is passing as a client to the Freenas server to connect to the CIFS shares, and subsequently what Local Freenas user and group they get assigned to (it's not the matching Freenas users that I've set up, and it's not 'guest'...). Is there a way in the GUI to see a list of connected users? I've looked, but maybe I'm missing it.

In second preference, are there FreeBSD commands in the CLI?
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I' using this script:

Code:
#!/bin/sh
# show all users currently logged in via SSH and SAMBA
echo SFTP Users:
fstat | grep internet | grep "sshd" | grep -v "root" | cut -d ' ' -f 1
echo _______________
echo SAMBA Users:
fstat | grep internet | grep "smbd" | grep -v "root" | cut -d ' ' -f 1
 

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
OK, I've played with smbstatus and looked up what fstat, grep, and cut do. It looks like the latter would do something at least similar to the former, and given that I have no idea how to save or execute a script, I'll need to rely on the former...

Smbstatus does give some nice visibility that I didn't have. However, looking at the results, I guess what I really need to have are details of failed login attempts, rather than current connections. Despite all the Freenas users that I've created with and without passwords that match Windows users with and without passwords, and unrelated Freenas users that I specifically enter the credentials for in Windows, the only logins that get through are those that resolve to the guest account, as shown by "Uid" in the smbstatus results. I can achieve full access from my Windows machines by checking "only allow guest access" for a given share. Then those connections do show up in the "Locked files" list (as they should). The second I uncheck "only allow guest access", no permutation of Freenas user and credentials entered in Windows is successful.

Is there a way to display the credentials used in unsuccessful login attampts?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Is there a way to display the credentials used in unsuccessful login attampts?
Add these two lines to Services->CIFS->Auxiliary parameters:
[PANEL]log level = auth:4
syslog only = no[/PANEL]
You can then check /var/log/samba/log.smbd to see authentication attempts (run tail -f /var/log/samba/log.smbd to monitor for new lines in the file).
However, I don't think you will be be able to see the passwords used (security reasons).
 

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
Cool, thanks (and thanks for letting me know how to view the results of the logging - that saved me an hour or two of further searching and asking).

For posterity, after further messing around, I can say that the complete lack of access from Windows had a lot to do with the permissions on the volume being fubar'ed. I didn't test whether the permissions was the only reason for lack of guest access, or that and checking "only allow guest access" were both required to restore guest access.
 

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
Dusan, your tricks worked perfectly. Windows 8 is sending the email address associated with my Microsoft account as the username - no relation whatsoever to my login screen name on Win 8. I was thinking maybe the <space> in the forced [First] <space> [Last] Microsoft account was the problem. Now it looks like I'll have to deal with an '@' and a '.' , not to mention an email address that's too long for the GUI to take as a user name.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yet another example why I'm glad to have started using Linux this year.
 

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
By the way, thank you very much!

A little googeling, and I have the answer to authenticating my Microsoft account, from within Windows 8, on Freenas. In Windows 8 preferences, go into "Credential Manager", select "Windows Credentials", then down below click "Add a Windows credential".
  • For Internet or network address, just enter the name of your Freenas server - just the name and no other bits like '\\'.
  • For User name and Password, just enter the exact user name and password of the user account on Freenas that you're trying to connect to
  • Verify that you've connected with those credentials, and not as "guest", with Dusan's procedure above.
 

freshfeesh

Explorer
Joined
Oct 10, 2011
Messages
72
Yet another example why I'm glad to have started using Linux this year.
Curious: from Windows? XP?

I'm certainly not out of the woods yet - my files and folders are a train wreck of recursively and non-recursively applied Windows and FreeBSD permissions. And here I was hoping that my next Freenas project was going to be playing with some of those cool new Freenas plugins.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yeah, started using Linux Mint back in April or May. It's so much easier, faster, and more efficient to get stuff done. I had Windows 7. I consider XP to be "dead" as security updates are going to be discontinued in less than 6 months. At that point anyone running XP is in for a fun filled mess.

There's already talk of adware/spyware companies writing code to target the the roughly 1/2 billion(yes.. with a B) that will have XP the day after it is no longer maintained. They're going to have a hayday and love every minute of it. In some countries the local government is giving out Linux CDs to allow people to "upgrade" out of XP. Their logic is that its better for them to give out Linux disks than to use XP because of the potential complications that their constituents will have to deal with.

One of my friends is convinced that MS will cave and extend support for XP because "his family can't afford new computers". Not likely to happen. Besides, what will convince you to get a new machine faster than a machine pwned to death with pop-ups and spyware installed all over the place and you can't do a darn thing about it?

Just for the record, I am dual boot on my laptop. Sometimes I need to help someone with something that I can do on Windows but am not familiar with on Linux. It's very easy to do and you always have Windows in your back pocket if you get into a situation you can't get out of.
 

beberobu

Cadet
Joined
May 22, 2014
Messages
7
Hello all,
i open "Shell" in GUI and type smbstatus but nothing (no user and no process) is listed and i know certainly that it is a least one use loged!
What's wrong?
 
Status
Not open for further replies.
Top