LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-12-2017, 01:21 PM   #1
leshol
LQ Newbie
 
Registered: Mar 2017
Location: Sweden
Distribution: Raspbian
Posts: 1

Rep: Reputation: Disabled
Talking How to build a permission structure like in Netware?


Hello

I´m a newbie to Linux but have bought a Raspberry Pi 3 and like to build a permission structure centered on groups not users and resources like printers for example.

I worked as a CNE consultant for many years and there it looked something like this:

1. Every user had their home directory like in Linux.
2. Every user was a member of a group named everyone.
3. Different groups were created for different tasks like economy, ITsupport, printers and so on.
4. Rights for the groups were assigned to directories and printers.

I would like to do something like this. I have tried the chmod and chown commands but I fail to get to grips with the big picture.

Tia Leslie
 
Old 03-12-2017, 05:52 PM   #2
rarog
LQ Newbie
 
Registered: May 2016
Distribution: Slackware
Posts: 14

Rep: Reputation: Disabled
Hi,

You may want to consider using file access list mechanism. It allows You to create more complex permission structure.

Check setfacl and getfacl commands.

Cheers
 
Old 03-13-2017, 03:50 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
This short explanation may help.
Users (aka user records in /etc/passwd) must have a unique userid (aka uid) and each user must belong to at least one group.
See useradd/adduser cmds.

The trick in your case is to design and create the groups first (groupadd/addgroup cmds) and then create the users into those groups.
See /etc/group.
As noted, each user must have a 'primary' group (as seen in /etc/passwd rec), but you can add them (usermod/moduser cmds) in to multiple groups.
This info appears in /etc/groups as you add the memberships.

Last but not least, files (inc dirs which are files in Linux) can be accessed through 3 sets of permissions: owner (aka user), group, other (aka world).
Each of these eg user perms consist of a combination of r (read), w(write), x (execute for files, search for dirs) in that order eg

Code:
drwxrwxrwx  # NB: 'd' is the file type; for a regular file its denoted '-'

# ie filetype user grp other
See the 'ls -l' cmd and spend some time reading up on all the cmds I've mentioned so far.

I've never really setup printers by group, but its likely do-able. I'm sure someone else will coma along and explain or you can try google.
Feel free to rtn here with more qns.

HTH & Welcome to LQ (I used to Admin Novell v2 & V3 back in the day).

PS: You can find plenty of manuals/books free to read online @ http://www.linuxtopia.org/
 
  


Reply



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
[SOLVED] "Permission denied when trying to build mono on slack 14.1 camorri Slackware 6 12-18-2014 02:49 PM
[SOLVED] ./build.sh - permission denied CollieJim Linux - General 5 02-15-2014 11:51 PM
mkdir -v ../binutils-build' : Permission denied mich04 Mandriva 3 12-18-2011 02:27 PM
Linux stations on netware network, how to use netware logins? exodist Linux - Networking 1 11-12-2006 12:36 AM
mkdir ../binutils-build permission denied TheBman Linux From Scratch 11 02-16-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:40 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
Open Source Consulting | Domain Registration