Sign up ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sometimes, when need restart my Lion server, it warns me about the "connected users".

How is possible to show who is connected?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Try running the following terminal command to see the IP addresses of connected users:

netstat -f inet -n | grep '.548 ' | awk '{ print $5 }'   | sed 's/\.[^.]*$//'
share|improve this answer
grep followed by awk can always be combined into one awk command: | awk '/\.548 / { print $5 }' –  patrix Oct 12 '12 at 20:53
;-) thanx. So, the only way is grepping netstat for appletalk ports? Ok, while this is an working solution (i can grep for samba ports too, or simply check all connected ports) - i was hoping in something more userfriendly solution.. ;) Simply don't understadn why mac warn about the connected users without showing them (like: user: xxx, proto: samba or something like.. ) :) thanx anyway. –  kobame Oct 12 '12 at 20:56
serveradmin command smb:command = getConnectedUsers
serveradmin command afp:command = getConnectedUsers
share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer


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.