LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-01-2006, 06:22 AM   #1
LiNuXkOlOnIe
Member
 
Registered: Dec 2005
Location: North germany
Distribution: Linux Mint
Posts: 45

Rep: Reputation: 16
Question Share configuratin dir (.dir) for 3 accounts on local computer


Happy new year to all of you.
I want to share an configuration folder for an group where i can't specify in which directory
to store the configuration. Which is true for the most of all apps i think. I made it this way and think this is
not the best way (security):

+ group "<softuser>" holds the users for access to "<program>"
+ chmod 750 for /usr/bin/<program>
+ added shell-script "/usr/bin/<program>-start" in with chmod 750,chown root,chgrp "<softuser>"
content:
#!/bin/sh
#
chgrp <softuser> -R /opt/<programdir>/.<program-config>
chown root -R /opt/<programdir>/.<program-config> # <--- user can't change owner to root !!!
chmod 770 -R /opt/<programdir>/.<program-config>
/usr/bin/<program>

so user can now start program with "<program>-start" and has access to same documents which another
user modified/created etc. This is what i want. Full Acess for everyone in the group but only in this dir.

I tried 's' flag for <program> but the rights are only then for the specific user. I thought it will be using
the group context but it sets the group to the user-group, how it should be, but not what i want in this case.
I need this on my single-pc. No network access. I have 3 accounts and want them to share this directory for the application only.

Any 'good' advises how to setup something like this in a professional and secure way ?

I forgot to write the reason why it is not a good solution is that the files will be stored with user/usergroup rights so that another account has no access. How said above this is ok but not for my purpose.

Thank you.

Last edited by LiNuXkOlOnIe; 01-01-2006 at 09:15 AM.
 
Old 01-02-2006, 04:22 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
NOTE: This is only an untested theory.

You could create a "shared user" and have all users run the program as that user.

Put in /etc/passwd file.
shareduser::10000:10000:User to run program:/opt/programdir:/bin/bash

chown shareduser:shareduser /opt/<programdir>
chmod 770 /opt/<programdir>

In your startup script:

#!/bin/sh
#
su -c /usr/bin/<program> shareduser

Last edited by /bin/bash; 01-02-2006 at 04:23 AM.
 
Old 01-03-2006, 01:08 PM   #3
LiNuXkOlOnIe
Member
 
Registered: Dec 2005
Location: North germany
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 16
Post

Quote:
Originally Posted by /bin/bash
NOTE: This is only an untested theory.

You could create a "shared user" and have all users run the program as that user.

Put in /etc/passwd file.
shareduser::10000:10000:User to run program:/opt/programdir:/bin/bash

chown shareduser:shareduser /opt/<programdir>
chmod 770 /opt/<programdir>

In your startup script:

#!/bin/sh
#
su -c /usr/bin/<program> shareduser
Thank you for the tip but it's a gui-app and this works only on console, prompting for passwd. I tried it. But the program didn't start. Additonally i must the hidden .<program> config dir to the new 'shareuser' which i did and it does not work. I thought
it might be easier to write a script which will execute after every
lougout for the 3 users to change the group so that any user has access to the documents which were created by the others. But
.bash_logout does only work for the console. I need something for the gui Gnome/KDE or which desktop will ever be used in the future.

Maybe you have another good idea. Thanx anyway.

Last edited by LiNuXkOlOnIe; 01-03-2006 at 01:17 PM.
 
Old 01-05-2006, 01:24 PM   #4
LiNuXkOlOnIe
Member
 
Registered: Dec 2005
Location: North germany
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 16
d:-(

Yoo. Dat wars dann wohl. :-(
 
Old 01-07-2006, 03:58 AM   #5
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Well howanout substituting su with kdesu or some gnome alternate? It will then ask for the password with a fancy GUI box..
 
Old 01-08-2006, 03:36 AM   #6
LiNuXkOlOnIe
Member
 
Registered: Dec 2005
Location: North germany
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 16
Thumbs up

Quote:
Originally Posted by Artanicus
Well howanout substituting su with kdesu or some gnome alternate? It will then ask for the password with a fancy GUI box..
Hmmm. Thats the point. Thank you. I try it again.
 
  


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
install local dir as yum repository unixmad Linux - Newbie 2 10-01-2004 04:07 PM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 07:54 PM
can two distros share a /home dir ? ruwach Linux - Distributions 3 03-06-2004 08:37 PM
Can I share temp dir? powadha Linux - General 1 03-06-2004 07:19 AM
Adding default Dir to New user Accounts Joshsawyer77 Linux - General 2 01-25-2003 02:38 PM


All times are GMT -5. The time now is 11:54 PM.

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