Author Topic: Limiting user rights  (Read 1510 times)

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Limiting user rights
« on: June 20, 2010, 12:43:54 PM »
Hi. I have few questions.

1. How to give to user read only rights to all except his home folder?

2. How to change desktop background?

3. Is it possible for different users to use different system languages?

Thanks in advance

Offline Ramchu

  • Hero Member
  • *****
  • Posts: 1593
Re: Limiting user rights
« Reply #1 on: June 20, 2010, 01:56:51 PM »
Hi. I have few questions.

1. How to give to user read only rights to all except his home folder?

2. How to change desktop background?

3. Is it possible for different users to use different system languages?

Thanks in advance

To change the desktop background just right click on the desktop and choose folder view activity settings

I believe that if you create another/2nd user that if you install addlocale for that user they will be able to use a different language

As long as a 2nd user has there own user account and you do not add that user to any other user group then they will not be able to
modify any other files/folders except their own

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: Limiting user rights
« Reply #2 on: June 20, 2010, 02:14:17 PM »
Very welcome to the forums, Scanman!

Hi. I have few questions.

1. How to give to user read only rights to all except his home folder?


I take this to mean that you don't want your users to be able to write to anything outside their home folders. If so, that is the default.

If you also mean that you don't want them to be able to execute apps outside of their home folder, that is more problematic. It would be easy to set up, but they wouldn't be able to run any globally installed applications; they wouldn't really be running PCLinuxOS anymore. If they'd only be able to run programs installed in their home directory, they'd be running a very crippled setup without most of the things normally installed with Synaptic.

But if you mean that you don't want them to have access to folders outside their home, i.e. look at what's in them, thats easily fixed. (E.g. traditionally nobody but root has been able to access the /root folder. In PCLinuxOS 2010 anybody can do it, but that's probably an oversight, and as I said, not hard to fix.)

So if you could be a little more specific it would be easier to help you.

Quote
2. How to change desktop background?


That depends on which version of PCLinuxOS you're running. You could have a look at this thread:
http://www.pclinuxos.com/forum/index.php/topic,74821.msg614572.html#msg614572.
(It contains a lot of other stuff too.)

Quote
3. Is it possible for different users to use different system languages?


Yes it is (if you by "languages" mean the everyday human ones). But you may have to set up them separately for several applications.

I would have given more detailed answers if you hadn't asked three very complex questions in one single post. Just one question per post, please. Don't be afraid to post multiple times.
« Last Edit: June 20, 2010, 02:19:57 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #3 on: June 22, 2010, 03:28:38 AM »
Thanks for your responses.

The wallpaper is solved, it was very easy, but I was trying it with the "configure your desktop".

About the second user. I have made user for a little girl on my pc. I want that she can use the applications but I do not want that her to be able to delete files from my windows partition or other important linux folders. In the meantime I don´t mind if she can look movies from the windows partition - read only.

I have changed her add locale in Spanish and the system language was changed but it affected my system language as well. I wonder if it is possible to have two completely different system languages for two different users and how to make it.

There is other thing. I have tried to install wine with Synaptic and I get message

Code: [Select]
W: Failed to fetch http://ftp.heanet.ie/pub/pclinuxos/apt/pclinuxos/2010/RPMS.updates/libwine1-1.2-0.RC2.1pclos2010.i586.rpm
  404 Not Found [IP: 193.1.193.64 80]


W: Failed to fetch http://ftp.heanet.ie/pub/pclinuxos/apt/pclinuxos/2010/RPMS.updates/wine-1.2-0.RC2.1pclos2010.i586.rpm
  404 Not Found [IP: 193.1.193.64 80]


Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12655
Re: Limiting user rights
« Reply #4 on: June 22, 2010, 03:48:53 AM »
The Synaptic software repository is not static therefore you should always press reload to get a current file listing. The wine packages are now at version 1.2-RC3.

Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: Limiting user rights
« Reply #5 on: June 22, 2010, 04:35:12 AM »
I have changed her add locale in Spanish and the system language was changed but it affected my system language as well. I wonder if it is possible to have two completely different system languages for two different users and how to make it.

Yes, Addlocale is a very good script that changes the language of a large mumber of applications, but it does so for all users.

If you are running KDE you can easily choose another language for a single user by opening Configure Your Desktop as that user and going to "Personal"->"Regional & Language"->"Country/Region & Language", but then the changes only affect KDE apps.

You could set English as root's (and your own) language and Spanish as the little girl's in KDE. She probably wouldn't use so many non-KDE apps that you couldn't edit their language settings manually -- particularly as you probably don't want her to get her hands on most global setup tools.
« Last Edit: June 23, 2010, 02:04:25 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: Limiting user rights
« Reply #6 on: June 22, 2010, 04:46:46 AM »
About the second user. I have made user for a little girl on my pc. I want that she can use the applications but I do not want that her to be able to delete files from my windows partition or other important linux folders. In the meantime I don´t mind if she can look movies from the windows partition - read only.

A Windows partition is a bit of a special case: Windows partitions don't have Linux permissions, so we may have to limit her access by editing the file /etc/fstab. What does it look like now?
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #7 on: June 22, 2010, 06:08:27 AM »
About the second user. I have made user for a little girl on my pc. I want that she can use the applications but I do not want that her to be able to delete files from my windows partition or other important linux folders. In the meantime I don´t mind if she can look movies from the windows partition - read only.

A Windows partition is a bit of a special case: Windows partitions don't have Linux permissions, so we may have to limit her access by editing the file /etc/fstab. What does it look like now?

Thanks I have changed language of KDE to Spanish.

The fstab file shows this


It looks like
Code: [Select]
# Entry for /dev/sda5 :
UUID=88e7e129-f5ed-482f-b7f5-de45780244ff / ext4 defaults 1 1
# Entry for /dev/sda7 :
UUID=27dbd980-6e27-4b1d-a472-bd4d40130910 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=77716520-14d1-4771-9ba2-a7a2e3a1842a swap swap defaults 0 0
none /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
« Last Edit: June 22, 2010, 06:20:44 AM by scanman »

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
Re: Limiting user rights
« Reply #8 on: June 22, 2010, 06:19:42 AM »
Does the Windows partition mount on boot? It doesn't look like it, in which case only root can mount it.

If you want her to be able to access it at all, you will need to set it to mount. You should be able to set permissions on the mount point (directory) to give her read-only access (set it 755 and have it owned by your normal user, or set it 775 if you want it to be owned by root, but grouped to a group your normal user belongs to but the girl does not), but I would test it first. Alternatively, you could set the mount option to read-only, but that would affect all users.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #9 on: June 22, 2010, 06:28:25 AM »
Does the Windows partition mount on boot? It doesn't look like it, in which case only root can mount it.

If you want her to be able to access it at all, you will need to set it to mount. You should be able to set permissions on the mount point (directory) to give her read-only access (set it 755 and have it owned by your normal user, or set it 775 if you want it to be owned by root, but grouped to a group your normal user belongs to but the girl does not), but I would test it first. Alternatively, you could set the mount option to read-only, but that would affect all users.


It looks complicated to me, I prefer to not take such risks. Maybe there is solution with the graphical interface?

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #10 on: June 22, 2010, 06:29:03 AM »
The Synaptic software repository is not static therefore you should always press reload to get a current file listing. The wine packages are now at version 1.2-RC3.

Success, thanks it is installed.

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
Re: Limiting user rights
« Reply #11 on: June 22, 2010, 06:53:31 AM »
Does the Windows partition mount on boot? It doesn't look like it, in which case only root can mount it.

If you want her to be able to access it at all, you will need to set it to mount. You should be able to set permissions on the mount point (directory) to give her read-only access (set it 755 and have it owned by your normal user, or set it 775 if you want it to be owned by root, but grouped to a group your normal user belongs to but the girl does not), but I would test it first. Alternatively, you could set the mount option to read-only, but that would affect all users.


It looks complicated to me, I prefer to not take such risks. Maybe there is solution with the graphical interface?

Yes, you can do it all through the graphical interface, but the first question is - do you want to access the Windows partition from pclos? According to the fstab you posted, ordinary users shouldn't be able to see it at all, so there's no problem unless you actually want to see it from there.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #12 on: June 22, 2010, 08:56:04 AM »
Does the Windows partition mount on boot? It doesn't look like it, in which case only root can mount it.

If you want her to be able to access it at all, you will need to set it to mount. You should be able to set permissions on the mount point (directory) to give her read-only access (set it 755 and have it owned by your normal user, or set it 775 if you want it to be owned by root, but grouped to a group your normal user belongs to but the girl does not), but I would test it first. Alternatively, you could set the mount option to read-only, but that would affect all users.


It looks complicated to me, I prefer to not take such risks. Maybe there is solution with the graphical interface?

Yes, you can do it all through the graphical interface, but the first question is - do you want to access the Windows partition from pclos? According to the fstab you posted, ordinary users shouldn't be able to see it at all, so there's no problem unless you actually want to see it from there.

Yes I want to see and to use the space of windows partition and to share  with windows the multimedia files. Generally I want to use Linux and to keep the windows just in case.

But you are right, I can see the windows partition only as a root. Strange, I am sure I have seen it with different user and I hided it for not to be seen with right click and hide... something. Now I don't see the windows partition.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: Limiting user rights
« Reply #13 on: June 22, 2010, 09:26:47 AM »
Does the Windows partition mount on boot? It doesn't look like it, in which case only root can mount it.

That's how it used to be, and that's how (I think) it should be. But on my system HAL obligingly mounts any partition that isn't handled by /etc/fstab for anyone that clicks the partition in Dolphin. You can of course do what Scanman obviously has done and hide the partition, but then you only need two mouse-clicks to unhide it.

Quote
If you want her to be able to access it at all, you will need to set it to mount. You should be able to set permissions on the mount point (directory) to give her read-only access (set it 755 and have it owned by your normal user, or set it 775 if you want it to be owned by root, but grouped to a group your normal user belongs to but the girl does not), but I would test it first.

I would too, and in fact I did, and it doesn't work with a Windows partition. Traditionally one should be able to set the Windows read-only attribute by manipulating Linux permissions, but just a few minutes ago I found that PCLinuxOS simply won't let me do it. Not from a CLI and not from the GUI.

So I still think adding a line to /etc/fstab is the best solution. One would have to specify a user ID, a group ID, and a suitable umask. To write the line we would just have to know the device name or the UUID of the partition in question -- and whether it is an NTFS or a FAT partition. Knowing PCLinuxOS one can guess what the UID and GID numbers are. (If you don't like living dangerously the id command will show them.)
« Last Edit: June 23, 2010, 02:05:30 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline scanman

  • Jr. Member
  • **
  • Posts: 14
Re: Limiting user rights
« Reply #14 on: June 23, 2010, 12:11:11 PM »
It looks too complicated for me. I think I will live the things like they are. Thanks a lot for the help!