[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Eeek?! smbmount is deprecated?!



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kent West yazmış:
> 
> So it appears there's something screwy about the cifs filesystem-type.
> So this issue remains.
> 
> Another one of my issues was that smbmount all of a sudden (after my
> rebuild) started mounting the shares with the mount point being owned by
> root. With this working "mount -t smbfs" command, the addition of the
> uid= option takes care of that issue.
> 
> And finally, the last issue remains: if mount normally must be run by
> root, how can I give non-root users access to mount shares without
> knowing before-hand what shares to pre-populate /etc/fstab with?
> 
> It would be much easier just to continue using smbmount, but like I say,
> I'm trying to be a good, forward-going sort of guy rather than living in
> the fading past....
> 
> Thanks!
> 
Here is my scripts to sync laptop and desktop:

sync-lapt-desk:
#! /bin/sh
echo "enter the sudo pass:"
sudo /home/tejas/Desktop/bagla #mount script

if [ "$?" != 0 ]; then echo "couldn't mount"; exit 1 ; fi

echo "syncing firefox..." && rsync -rv --delete
/home/tejas/Desktop/firefox/ /your/firefox/profile/ && echo "example1
synced."


echo "unmounting shares..."
sudo /home/tejas/Desktop/ayir # unmount script

bagla:(mount script)
SHA="masaustu firefox thunderbird Downloads"
if [ `whoami` != "root" ]; then echo "you must be root."; exit; fi
	for i in $SHA; do
		echo "mounting $i..."
		mount -t cifs -o iocharset=utf8,user=hede //192.168.2.2/$i
/home/tejas/Desktop/$i
		sleep 3
		if [ "$?" == "0" ]; then echo "mounted $i."; fi
	done

and ayir: (unmount script)

#! /bin/bash	
SHA="masaustu firefox thunderbird Downloads"
if [ `whoami` != "root" ]; then echo "you must be root"; exit; fi

	for i in $SHA; do
		sudo umount -l /home/tejas/Desktop/$i
		sleep 5
	done

Notice here; this script mounts as a root, but sync as a normal user.
And IIRC, this script works. (I tried it on Dapper and Etch.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRpYulnCg+7fCe3L1AQLc6QgAo/28A/KXsG2UgcjKTbtapSatseB1syHE
EGgCCGQa7gefs4yzX8yS1vqeZ6/aqXYJ25mi/vO9l6nzV2FTeYnz6hXHT8DfOGPz
VC/fFMCNKB3jtjNL1m4v8JxGqtJztT30s6UoPhpArQzecXPbq63PQYFiTXnYYvy3
rmMsAU0Rczo1yE2+edygyP9FClxNegwOZ7SFb/yLT3ggAQHiu1TQA5FaPgY5DwKe
huRlZoE5wBSJIf/xtS0lwxuNkl5HKueZNu4GFmXhcJgMSyWNs3WrjRAf57GzG1Y0
MA8bNSzP3uto1vNhRwR0/piHK9VHsXJeyYDe8r0FOWPEeTg70xm38Q==
=zF2R
-----END PGP SIGNATURE-----



Reply to: