LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-20-2011, 10:20 PM   #16
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3

I'm finally trying to get this all working properly, but I've run into a bit of an issue.

The user IDs and group IDs (UID and GID) are different from my NAS to my workstation. The UID of the user I found out I can change with usermod -u new-uid username but how can change a group's GID?

So the user that owns the file is showing up properly, but group is wrong!

Any ideas?
 
Old 01-21-2011, 03:48 AM   #17
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Also with usermod, but using the -g option.

jlinkels
 
Old 01-22-2011, 07:35 PM   #18
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Quote:
Originally Posted by jlinkels View Post
Also with usermod, but using the -g option.
That only changes the user's primary group, not the group's GID.

The problem is my NAS user's are in a group called family with a GID of 101.

On my workstation there's a group called console with a GID of 101. That group was created by the installation routine so I don't want to change it. I'd rather change the GID of the family group on my NAS to 1001 and then create that group on my workstation too.

So, I'm still trying to figure that out.
 
Old 01-22-2011, 07:43 PM   #19
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Okay, google is my friend, I just found out there's a groupmod command - similar to the usermod command.

http://linux.die.net/man/8/groupmod

I think this one's just about solved then! Thanks for your help.
 
Old 01-24-2011, 09:01 AM   #20
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Unhappy It's not working!!!

So I thought I had everything I need to get this working - the UID and GID between my workstation and my NAS are sync'd, NFS is setup on the NAS, and I've tested mounting and umounting the NFS shares.

I created the following directories:
Code:
/media/network0
/media/network0/documents
/media/network0/music
/media/network0/pictures
/media/network0/videos
Then I created an auto.master
Code:
/media/network0  /etc/auto.nas1-shares
Then I created the /etc/auto.nas1-shares map
Code:
documents rw,user nas1:/documents
music     rw,user nas1:/media/Music
pictures  rw,user nas1:/media/Pictures
videos    rw,user nas1:/media/Videos
But when I start the automount daemon and check in the /media/network0 directory I don't even see the sub-directories I originally created?! I can't cd into them; if I try to mkdir them again I also get an error message (sorry, forgot to write it down).

Any ideas where I'm going wrong? I tried to start the automount daemon in debug mode but I have no idea where the log files end up.

Thanks,
 
Old 01-25-2011, 01:53 PM   #21
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Angry So close and yet so far!

So it's almost all working now!

The common shares that everyone can access, that are exported by NFS are automounted when I ever I open their root directory. But the user's shares won't automount because it's not accessible to root (and the automounter runs as root).

I have the following auto.master:
Code:
# auto.mount master file

# mount point for any host that exports shares
/media/network0		-hosts

# mount point for NAS1 shares
/media/network1		/etc/auto.nas1-shares	--ghost
And this is my auto.nas1-shares:
Code:
# Indirect automount map file for NAS1 shares

# common shares for everyone
documents	-rw,user	nas1:/documents
music		-rw,user	nas1:/media/Music
pictures	-rw,user	nas1:/media/Pictures
videos		-rw,user	nas1:/media/Videos

# user's personal shares
home		-rw,user	nas1:/$USER
It's the last line that doesn't work properly! Because only the user eric has access to that share so the automounter gets a permission denied when I try to access it (even though I'm logged in as eric on my workstation, the automounter is running as root).

Aaaaargh!!!

Any ideas?!
 
Old 01-26-2011, 06:55 AM   #22
mfaine
LQ Newbie
 
Registered: Nov 2009
Posts: 12

Original Poster
Rep: Reputation: 1
Yes, see the man page for autofs. What you want is for it to look like this:

Quote:
* server_ip:/volume1/homes/&
Where /volume1/homes is the base path to where home directories are stored on your NAS. "&" is just a placeholder that will be replaced by user name.

This goes in your auto.home that should be referenced in auto.master.
 
Old 01-27-2011, 11:01 AM   #23
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Still trying to get it to work

Quote:
Originally Posted by mfaine View Post
Where /volume1/homes is the base path to where home directories are stored on your NAS. "&" is just a placeholder that will be replaced by user name.
Thanks for the suggestion, but I've got two questions:

How will this work combined with the --ghost option? Since * is a wildcard catch-all then the keys won't be created as initial directories so that a user browsing the root will see the possibilities. Especially if they're using a GUI browser like Thunar.

And I don't see how this resolved my perceived permissions issue, it's still going to try to mount the same share (nas1:/eric).

Currently I've stopped using NFS and I'm trying to do everything over CIFS, but I've got a couple issues there too though they seem to be on the NAS side and not on my workstation.
 
Old 01-29-2011, 11:13 PM   #24
schultzter
Member
 
Registered: Sep 2009
Distribution: Arch Linux
Posts: 40

Rep: Reputation: 3
Smile [SOLVED] It's working now!

It works now!

Everything is going through Samba though, NFS was a valiant try but ultimately an unnecessary rat hole that I should have avoided.

Since I originally wanted to use NFS I started to synchronize my user UID's and group GID's on both my workstation and my NAS server. But if you groupmod a linux group you also have to net groupmap modify the samba group mapping!

So at the end of the day my auto.master looks like this:
Code:
# auto.mount master file

# mount point for any host that exports shares
/media/network0		program:/etc/auto.smb	

# mount point for NAS1 shares
/media/network1		/etc/auto.nas1-shares	--ghost
The fun thing about the --ghost option is that it populates the /media/network1 directory with keys found in the map file.

And my auto.nas1-shares looks like this:
Code:
# Indirect automount map file for NAS1 shares

# common shares for everyone
documents	-fstype=cifs,cred=$HOME/.smbcred,rw,user,uid=$USER,gid=family	://nas1/documents
music		-fstype=cifs,cred=$HOME/.smbcred,rw,user,uid=$USER,gid=family	://nas1/media/Music
pictures	-fstype=cifs,cred=$HOME/.smbcred,rw,user,uid=$USER,gid=family	://nas1/media/Pictures
videos		-fstype=cifs,cred=$HOME/.smbcred,rw,user,uid=$USER,gid=family	://nas1/media/Videos

# user's personal shares
home		-fstype=cifs,cred=$HOME/.smbcred,rw,user,uid=$USER,gid=family	://nas1/$USER
Here I'm using variable expansion so that the automounter is using the current user's login credentials for the shares. I'm not sure what would happen if several people were using the machine at one time; but for now at least that's not a concern.

Thanks everyone for their input!

Last edited by schultzter; 01-29-2011 at 11:15 PM. Reason: corrected a critical typo
 
Old 01-30-2011, 11:27 PM   #25
nicktickson122
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Rep: Reputation: 1
I someone all my networked machines functioning a NAS like /home. Performance with GUIs is exclusive slightly slower, and ordinarily undistinguished. I'm not actually using a NAS, but kinda a NFS setting to a server.
 
0 members found this post helpful.
  


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
Interpretation required for '(none) dhcpd: Sending on Socket/fallback/fallback-net' ttomsant Linux - Newbie 0 04-07-2009 02:31 PM
is this hardware for home storage (NAS) ok? OS: latest centos or fedora Yaniv-Fer Linux - Hardware 6 10-16-2008 05:19 PM
Home folder setup with a NAS trbelmore Linux - Server 1 10-10-2008 04:37 PM
Totally securing a home server and NAS meles meles Linux - Security 3 07-10-2006 12:31 PM
Linux Home on Windows NAS Box Pravat Linux - Networking 1 04-02-2006 04:05 PM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration