LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2015, 11:05 AM   #16
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,076

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861

samba is a hack to try to get windows file sharing to work with linux. the smb relative paths mite be fudging up the process; is it possible to mount the server in a more standard form (like nfs/sshfs) ?
 
Old 06-17-2015, 11:50 AM   #17
antiX-Dave
LQ Newbie
 
Registered: Dec 2013
Distribution: antiX
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by JackDinn View Post
Hi, I am re-visiting this as i want to make a credentials file rather than have my PW in the fstab file but i cant figure it

why cant i do this (the links above say i can):-

Code:
//192.168.1.1/volume(sda1) /home/greg/NAS cifs username=greg,password=password
or this (not sure which it should be anyhow)
Code:
//192.168.1.1/volume(sda1) /home/greg/NAS cifs username=root,password=password
the only way iv got this part to work is like this :-

Code:
//192.168.1.1/volume(sda1) /home/greg/NAS cifs user,password=password
but i cant make a credentials file for that (user=?)
Well I think it explains it in the arch wiki link I gave from earlier, however as best I can see without actually trying it is to have something like this in your fstab
Code:
//192.168.1.1/volume(sda1) /mnt/greg/NAS cifs user,credentials=/etc/samba/sambacreds 0 0
Then edit /etc/samba/sambacreds with your favourite editor as root and input something like

Code:
username=greg
password=GregsPassword
You might want to change the permissions on it so that only root user can read / write the credentials file for security reasons. However I would get it working with the standard permission set before changing it.

Link to appropriate part in arch wiki with the "how to mount as user" section immediately following.
https://wiki.archlinux.org/index.php....2Fetc.2Ffstab
 
Old 06-17-2015, 12:16 PM   #18
JackDinn
Member
 
Registered: May 2015
Posts: 218

Original Poster
Rep: Reputation: Disabled
edit:- O i see you put cifs user,credentials= , well thats not how all the sites iv been reading have it :-/ o well i shall try when iv got a moment, thx.

Last edited by JackDinn; 06-17-2015 at 12:26 PM.
 
Old 06-17-2015, 12:47 PM   #19
JackDinn
Member
 
Registered: May 2015
Posts: 218

Original Poster
Rep: Reputation: Disabled
great stuff, seems to work so many thx but iv read your link again and it does not say to use it that way (user,credentials=) it says:-

Quote:
The simplest way to add an fstab entry is something like this:

/etc/fstab

//SERVER/sharename /mnt/mountpoint cifs username=username,password=password 0 0

However, storing passwords in a world readable file is not recommended! A safer method would be to use a credentials file. As an example, create a file and chmod 600 filename so only the owning user can read and write to it. It should contain the following information:

/path/to/credentials/sambacreds

username=username
password=password

and the line in your fstab should look something like this:

/etc/fstab

//SERVER/SHARENAME /mnt/mountpoint cifs credentials=/path/to/credentials/sambacreds 0 0
I can see Linux is going to be an uphill battle.

Thank you though

Last edited by JackDinn; 06-17-2015 at 12:49 PM.
 
Old 06-17-2015, 04:22 PM   #20
antiX-Dave
LQ Newbie
 
Registered: Dec 2013
Distribution: antiX
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by JackDinn View Post
I can see Linux is going to be an uphill battle.

Thank you though

No Problem.
Yes it can be an uphill battle, most people do not like to write with the -v option... so you get only the key points in most articles... However after a bit you will start to skip to only the key points yourself, and, well, as such, you will start to "fill in the blanks" so to say.
IMHO if one is to write a how to once figured out they should
A) clearly state they are going from memory on key points
B) go through the whole procedure again from memory and write a note for everything that they do and specify the system they are using.
 
Old 06-17-2015, 06:19 PM   #21
JackDinn
Member
 
Registered: May 2015
Posts: 218

Original Poster
Rep: Reputation: Disabled
thats cool, i dont even know what a/the -v option is but im sure its in the "man mount" so you lost me anyhow but its working now, iv taken my notes on this to add to the many many others iv already gathered with all the problems i'v had just getting linux up and running really. I have a long way to go but thank you for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate backup of Google Apps accounts ifeatu Programming 3 02-03-2010 01:10 PM
Buffalo NAS - how do we get files on NAS syncing with Windows Sync? bykerbob Linux - Newbie 0 10-21-2008 08:59 PM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM
cannot automate rsync backup jahjr Linux - Server 6 12-21-2006 04:54 AM
automate database backup Stormproof Linux - Networking 1 10-19-2004 03:19 AM


All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration