SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Linux OS.: Technical questions -- Ignore unavailable to you. Want to Upgrade?


To: Thomas A Watson who wrote (347)9/28/2004 1:10:55 AM
From: Thomas A Watson  Respond to of 484
 
Fixing a popup like problem on mozilla.

Recently I loaded a web page that sends a swf file. Every time mozilla would popup the how do I handle this swf file. I have yet to find and get swf files to work with a plugin. Anyway this constant popup is a pain. So I thought how about if I create and applicaltion to handle the swf files.

I created this simple script and told mozilla to use it to handle files.swf. the application is nullit.

I not certain I needed to cat $1 to /dev/null. Simply call a null function script that did nothing would suffice.

[ 4211 ] > cat /usr/local/bin/nullit
#!/bin/tcsh
cat $1 /dev/null



To: Thomas A Watson who wrote (347)10/13/2004 8:20:07 PM
From: Thomas A Watson  Respond to of 484
 
smbmount, mount a shared drive. additional example. adding to Message #347

Example command mounting from a win2000 share to a redhat linux 7.3.. win2000 is computer square. acute is redhat 7.3 all done using plaintextpasswords on unix and msft systems.
additional smbmount commands to access shared win2000 USB drives on linux box.

created mount point /share as root.
command.

mount a subdirectory or folder.
//computer name/folder or device /mounting_directory_on_linux_box.

mount -t smbfs -o username=Administrator,password=yabadabadoo //half/F707 /share

mount a device C:\ G:\ etc. ie. G$ This works with
mount -t smbfs -o username=Administrator,password=yabadabadoo //half/G$ /share this syntax does not work with USB 2.0 drives.

When mounting a shared USB 2.0 drive, I found that J: K: would only mount if the $ were not used as shown above.

mount -t smbfs -o username=Administrator,password=yabadabadoo //half/G /share

Both mounts have the problem that only root can write to the USB 2.0. If one looks at the smbmount options one can see how to fix this. One way is to mount it as root, but mount it with the uid and or gid that would allow another user write. This in conjunction with the dmask option will give write permission to a user, a group or everyone on the unix box.

the uid number can be found by greping a user name in /etc/passwd

mount -t smbfs -o Username=admin_or_user,password=fuddyduddy,uid=511,gid=511,dmask=777,fmask=666 //half/J /J

dmask=777 give all rw permission on mount. dmask=775 would give only user and group write permission.

output of smbmoung /usr/bin/smbmount

[root@acute PHOTO]# smbmount
Usage: mount.smbfs service mountpoint [-o options,...]
Version 2.2.7-security-rollup-fix

Options:
username=<arg> SMB username
password=<arg> SMB password
credentials=<filename> file with username/password
netbiosname=<arg> source NetBIOS name
uid=<arg> mount uid or username
gid=<arg> mount gid or groupname
port=<arg> remote SMB port number
fmask=<arg> file umask
dmask=<arg> directory umask
debug=<arg> debug level
ip=<arg> destination host or IP address
workgroup=<arg> workgroup on destination
sockopt=<arg> TCP socket options
scope=<arg> NetBIOS scope
iocharset=<arg> Linux charset (iso8859-1, utf8)
codepage=<arg> server codepage (cp850)
ttl=<arg> dircache time to live
guest don't prompt for a password
ro mount read-only
rw mount read-write

This command is designed to be run from within /bin/mount by giving
the option '-t smbfs'. For example:
mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test