freebsd-ports/net/smb4k-kde4/files/smb2nsmbrc
Josh Paetzel ca99a7c61e Smb4K is an SMB share browser for KDE. Its features are inspired by Komba2
by Frank Schwanz. It uses the Samba software suite for an easy access
to the SMB shares of your local network neighborhood.

Features so far:

- Scanning for (active) workgroups, hosts, and shares
- Mounting and unmounting of SMB and CIFS shares, including unmounting
  all shares at once
- Access to the files of a mounted SMB or CIFS share using Konqueror
- Auto-detection of external mounts/unmounts
- Remounting of recently used shares on program start
- Miscellaneous infos about the mounted SMB and CIFS shares
- Network search
- WINS server support
- Preview of shares
- Selectable look-up and search methods
- Default login
- Ability to execute mount and umount SUID root (using super or sudo)
- Special handling of homes shares
- Ability to bookmark favorite shares
- And many more :)

WWW: http://smb4k.berlios.de
2011-01-03 16:29:22 +00:00

43 lines
1.3 KiB
Bash

#!/bin/sh
# Convert list of Windows/Samba boxes in local network to .nsmbrc format
# Args, if any passed directly to findsmb - network address and broadcast address
# $Id: smb2nsmbrc,v 1.4 2004/08/05 06:50:32 shelton Exp $
find="findsmb" # Script to display boxes list
util="smbutil" # Utility to convert plaintext password to hashed
outfile=".nsmbrctmp" # Generated file name
# First, we check on presence findsmb
wfind=`whereis -b $find | awk '{print $2}'`
if [ -z $wfind ]; then
echo FindSMB did not found in your system, please install samba package first
exit 5
fi
# Second, we check on presence smbutil
wutil=`whereis -b $util | awk '{print $2}'`
if [ -z $wfind ]; then
echo SMBUtil did not found in your system, please install samba package first
exit 5
fi
# Now we ask username
echo -n "Please enter username (UPPER CASE!): "
read username
# Now we ask password and crypt by smbutil
password=`$util crypt`
# Now we detect all Windows/Samba boxes and taking their NetBIOS names
netnames=`findsmb $1 $2 | awk -f /usr/local/bin/smb2awk`
# And at least we generating temporarly file with username, password and
# sections for all detected boxes
for netname in $netnames
do
echo "[$netname:$username]" >> $outfile
echo "password=$password" >> $outfile
echo "" >> $outfile
done