Mounting an smbfs using fstab
I'm trying to get a samba share to mount at startup. Here's my fstab entry:
Code:
//server/directory /mnt/sambashare smbfs credentials=/etc/samba/cred-file,uid=ronadams,gid=users,fmask=0770,dmask=0770 0 0 Code:
username right_username Code:
sudo mount -a Code:
6744: session setup failed: ERRDOS - ERRnoaccess (Access denied.) Any ideas? |
I'd suggest adding a 'users' entry to the mount options, and
give the sudo-bit a miss. See whether a manual mount /mnt/sambashare works after that. Cheers, Tink |
Quote:
I have to sudo, to mount anything in the /mnt folder, unless this 'users' entry you speak of fixes that as well... |
Quote:
|
This sis what you want in your fstab
Code:
//server/directory /mnt/sambashare smbfs user,credentials=/etc/samba/cred-file,uid=rondams,gid=users,fmask=0770,dmask=0770 0 0 |
I actually said and meant users, because that way anyone can mount
and unmount, while with user only the person who mounted it can unmount it again (and root, of course). Cheers, Tink |
Quote:
Some terminal output that might prove helpful: Code:
ronadams@Foucalt:~$ sudo smbmount //wecco_serv/F_Drive /mnt/fdrive smbfs credentials=/etc/samba/cred-file,uid=ronadams,gid=users 0 0 |
the command you want is:
Code:
sudo mount -t smbfs //wecco_serv/F_Drive /mnt/fdrive smbfs -o credentials=/etc/samba/cred-file,uid=ronadams,gid=users Quote:
|
Quote:
|
My samba credentials file is formatted like
Code:
username=myUserName A bit of a long shot, but worth a shot. --- rod. |
It's not clear to me that you are entering the right password at the right prompt. You do understand that each time you run sudo, you will need to enter a password (if it is configured to require a password, at all). So running
Code:
sudo mount -a I just want to clarify that you understand this concept. In a similar vein, what happens if you run Code:
mount -a --- rod. |
in fstab put
Code:
//wecco_serv/F_Drive /mnt/fdrive smbfs credentials=/etc/samba/cred-file,uid=ronadams,gid=users 0 0 Code:
sudo mount -t smbfs //wecco_serv/F_Drive /mnt/fdrive -o credentials=/etc/samba/cred-file,uid=ronadams,gid=users Quote:
Code:
sudo -i |
Quote:
PS: Regarding logging in as root, one of the first things I do with any new Ubuntu install is Code:
sudo passwd root Cheers! |
I'm glad you got it to work
For the credentials file the man page says its in the format username = <value> password = <value> (with spaces) but I guess it's a bit forgiving. I know about "sudo passwd root" (was also the 1st thing I did) but not all users will have it so that's why i gave the sugestion "sudo -i" works well, you could even do "sudo bash" |
Quote:
Quote:
|
All times are GMT -5. The time now is 06:21 PM. |