Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
#I apologize for this written 'poem', i can't find "/Hide"-option to hide some of my text here, like in this forum : "Reveal hidden contents"-part.
Hallo everyone,
have few questions about my tasks for school : NIS auth + Samba share + CUPs printer server (from Samba itself).
My systems are : VMs & normal PCs with CentOs 7 on server/client, no Win systems.
Foreword :
Quote:
I know that NIS is old system, but i need to use it as my First Task.
Started from beginning on NiS-server+NFS for sharing "Home"ies on server (base-tut's from here+ Google), till now everything "works" fine, created groups/users and i can login on client-PCs with NIS-maps without any troubles. Commands like ypwhich,ypcat... works as well.
NiS Main function is that every user don't have own workplace, they all can login on any PC inside domain/network (something like vendor of a large media store). Finally got NiS/NFS worked in combination with AutoFS. All clients sync their Home-folders to server automatic when they login on any Client PC.
Now with Samba i got 50/50 worked for 'Virtual'-company with next departments/groups:
-Heads-where director and all admins from all departments/groups]
-ICT
-Mark
-Fin
-Pers
-Public Shared Folder - for everyone from this company
-Private Shared Folder - only for "Home"-folders from logged users.
Second Task is to export Samba-shared folders of every department from Server to Client PC, with AutoFS/automount. This is also done, but main trouble is that when for example ICT-admin logs into any client PC - he must see only his shared folders (Public, ICT and Heads-group > because he is admin of ICT-group), or when Marketing employee logs - he must see only Mark and Public-shares.
What i have (tried add "hide unreadable" and/or "access based share enum" options in smb.conf file) is when any user logs in - he see all shares in folder /Samba, which are mounted with AutoFS from Server to Client. But good news is, when i see shares in terminal with : smbclient -L "IP-server" -U "username" -> it shows only shares, where user is member, this is what i need in /Samba-folder.
My question is: is there any possibility to show on client PC limited User-specific Samba-shares through AutoFS? Something with {$USER}-depend script where system looks for options "Valid User" in smb.conf or in NiS-group files on UiD and GiD.
[global]
workgroup = WORKGROUP
security = user
netbios name = nis.project
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
passwd program = /bin/yppasswd %u
domain logons = no
hosts allow = 192.168.1.
access based share enum = yes
[public]
path = /sambashare/public
comment = Public folder for Company
valid users = @grpall
write list = @grpall
force group = grpall
browseable = yes
writeable = yes
guest ok = no
read only = no
create mask = 0660
directory mask = 0770
hide unreadable = no
[groupheads]
path = /sambashare/groupheads
valid users = @grpheads
force group = grpheads
browseable = no
writeable = yes
guest ok = no
read only = no
create mask = 0660
directory mask = 0770
hide unreadable = yes
[groupict]
path = /sambashare/groupict
valid users = @grpict
force group = grpict
browseable = no
writeable = yes
guest ok = no
read only = no
create mask = 0660
directory mask = 0770
hide unreadable = yes
...and so on for other groups with their groupnames and permissions
[groupmark],[groupfin],[grouppers]
On client PCs: normal configuration for NiS,NFS like here descrypted.
Files "credentials" are stored in root-folder with "root:root 0400" permissions. As you can see in auto.samba file, with this configuration it works, but cant get it to work when "credentials" are stored on Server - AutoFS don't see them.
Hope that my Third Task - CUPs-server will be without troubles. Every department must have own printer which is not visible to others. Normally same configuration as above in smb.conf.
Thanks for reading this book
Will be very grateful for any help.
With best regards.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.