Privilege problems

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Privilege problems

Postby Asimov » Sat Nov 03, 2012 20:43

I have multiple problem related to privilege:

- I can't make copy from my windoes partition.
- I want to be able to write and read, as an user, on my usr directory.

I don't know who started this new paranoia for security, but i making a great job to p*ssed beginner and make them quit.
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Re: Privilege problems

Postby Fitzcarraldo » Sun Nov 04, 2012 7:23

1. Regarding your "usr directory", do you actually mean the Linux home directory for your user account (e.g. /home/asimov if your username is "asimov")? If you have logged in with the user's username and password then you should be able to read and write those files without any problem. If you are having trouble doing that then either your installation has not been performed correctly or you are doing something incorrectly. There is no "new paranoia for security"; SL works like other Linux distributions. In Linux there is also a directory named /usr/ but that is a system directory, not a user directory. To be able to write to files in the /usr/ directory you need to be the root user (analogous to the System Administrator in Windows), in which case you need to log in as root user, not as a normal user. The root user's username is "root" (without the quotation marks), and the password for the root user is the password you specified for the root user when you installed Linux.

2. Regarding your Windows (NTFS) partition, make sure you have the package sys-fs/ntfs3g installed in Linux, and edit your Linux file /etc/fstab (as root user) to include the appropriate read-write permissions. For example, my fstab files looks like this (my Windows partition is on sda2 and is mounted on /media/Windows7/, so check what your's is):

Code: Select all
/dev/sda6               /                       ext4    user_xattr,noatime        1 1
/dev/sda7               /home                   ext4    user_xattr,noatime        1 2
/dev/sda3               /boot                   ext4    user_xattr,noatime,noauto 1 2
/dev/shm                /dev/shm                tmpfs   defaults                  0 0
/dev/sda5               swap                    swap    defaults                  0 0
/dev/sda2               /media/Windows7         ntfs-3g defaults                  0 0
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Privilege problems

Postby Asimov » Sun Nov 04, 2012 19:42

Fitzcarraldo wrote:1. Regarding your "usr directory", do you actually mean the Linux home directory for your user account (e.g. /home/asimov if your username is "asimov")? If you have logged in with the user's username and password then you should be able to read and write those files without any problem. If you are having trouble doing that then either your installation has not been performed correctly or you are doing something incorrectly. There is no "new paranoia for security"; SL works like other Linux distributions. In Linux there is also a directory named /usr/ but that is a system directory, not a user directory. To be able to write to files in the /usr/ directory you need to be the root user (analogous to the System Administrator in Windows), in which case you need to log in as root user, not as a normal user. The root user's username is "root" (without the quotation marks), and the password for the root user is the password you specified for the root user when you installed Linux.


I can't log as root in graphical mode
nor
in console mode

madmac@apollo ~ $ sudo dolphin
sudo: effective uid is not 0, is sudo installed setuid root?


Fitzcarraldo wrote:2. Regarding your Windows (NTFS) partition, make sure you have the package sys-fs/ntfs3g installed in Linux, and edit your Linux file /etc/fstab (as root user) to include the appropriate read-write permissions. For example, my fstab files looks like this (my Windows partition is on sda2 and is mounted on /media/Windows7/, so check what your's is):

Code: Select all
/dev/sda6               /                       ext4    user_xattr,noatime        1 1
/dev/sda7               /home                   ext4    user_xattr,noatime        1 2
/dev/sda3               /boot                   ext4    user_xattr,noatime,noauto 1 2
/dev/shm                /dev/shm                tmpfs   defaults                  0 0
/dev/sda5               swap                    swap    defaults                  0 0
/dev/sda2               /media/Windows7         ntfs-3g defaults                  0 0


what the expression in english: Be stocked in the middle of a rock and ...

madmac@apollo ~ $ sudo mc
sudo: effective uid is not 0, is sudo installed setuid root?
madmac@apollo ~ $


By the way my cd/dvd reader is invisible too.
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Re: Privilege problems

Postby Fitzcarraldo » Sun Nov 04, 2012 20:36

With KDE, the correct way to launch e.g. KWrite, Dolphin etc. with root user's privileges is to use the kdesu command. For example, if you want to launch KWrite with root user's privileges you would use KRunner (press Alt-F2 to launch KRunner) and enter the command kdesu kwrite in the KRunner window. You would then be prompted in a pop-up window to enter the root user's password (not your password).

Alternatively, you could launch Konsole and enter the command there instead:

Code: Select all
$ kdesu kwrite


N.B. sudo and su are not the same thing. See e.g. equo : why sudo should not be use ?.

To become root user:

Code: Select all
$ su
Password: <--- Enter the root user's password here, not your password.
#

When you use the above-mentioned command line method of becoming root user, avoid launching KDE GUI tools as root user. To edit files, use instead the nano editor (the nano menu will be displayed at the bottom of the Konsole window once you launch nano). For example:

Code: Select all
$ su
Password: <--- Enter the root user's password here, not your password.
# nano /etc/fstab
# exit
exit
$


(Try to forget the way Ubuntu does things for the time being, as it is not 'typical' Linux.)
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Privilege problems

Postby Asimov » Sun Nov 04, 2012 20:52

i manage to start dolphin, but there is some problem there too.

madmac@apollo ~ $ su root
Password:
apollo madmac # dolphin
dolphin(15513)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'dolphin' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-apollo/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
drkonqi(15514)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)


rigo do not work either, but equo is working.
RigoDaemon service is not available


my fdisk:

Disk /dev/sda: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x22eb22eb

Device Boot Start End Blocks Id System
/dev/sda1 63 147589154 73794546 7 HPFS/NTFS/exFAT
/dev/sda2 * 147589155 149629409 1020127+ 83 Linux
/dev/sda3 149629410 157806494 4088542+ 82 Linux swap / Solaris
/dev/sda4 157806556 625137344 233665394+ f W95 Ext'd (LBA)
/dev/sda5 157806558 207375020 24784231+ 83 Linux
/dev/sda6 260204868 270438209 5116671 83 Linux
/dev/sda7 270438273 290905019 10233373+ 83 Linux
/dev/sda8 290905083 321621299 15358108+ 83 Linux
/dev/sda9 321621363 464969294 71673966 7 HPFS/NTFS/exFAT
/dev/sda10 464969358 625137344 80083993+ 7 HPFS/NTFS/exFAT


my ftab
#
# /etc/fstab
# Created by anaconda on Fri Nov 2 17:14:07 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=0b374559-e194-4efa-b984-36210f497a83 / ext4 defaults 1 1
UUID=1fbfd831-07ed-4ffd-8d80-9a04cb5420d4 /boot ext4 defaults 1 2
UUID=fd4bef1d-67a0-4b58-86c0-f3ff9377fb3f /home ext4 defaults 1 2
UUID=f571f149-226f-490f-be20-e0b3223a5bc7 /tmp ext4 defaults 1 2
UUID=5d68f538-8f34-49cc-89a5-3a25332901a3 /usr/local ext4 defaults 1 2
UUID=cb86a0fc-dc64-4f0e-82da-6d4e0353e64d swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda9 /media/extra1 ntfs-3g defaults 0 0
/dev/sda10 /media/extra2 ntfs-3g defaults 0 0


The're still a problem. I can see the icons in the media repertory, but i can't open the partition in root mode


the kdesu trick is working! :D
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Re: Privilege problems

Postby Fitzcarraldo » Sun Nov 04, 2012 21:23

Asimov wrote:i manage to start dolphin, but there is some problem there too.

Code: Select all
madmac@apollo ~ $ su root
Password:
apollo madmac # dolphin

:shock: I just told you not to do that. You need to use the kdesu command:

Code: Select all
$ kdesu dolphin

How are you launching Rigo? If you're trying to launch it as root user, don't. Either launch it from the KDE Menu or double-click on the Rigo icon on the desktop (if you have not deleted it) and it will prompt you to enter the root user's password when it needs root user privileges.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Privilege problems

Postby Asimov » Sun Nov 04, 2012 21:28

My problem with my windows partition is solved: fuse was missing ...

but my cd/dvd drive do not work.

Rigo do not start either ways. I got a notitication that is saying: Entropy DBus service is not available: unable to communicate with the update service. I'm using equo for the moment.
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Re: Privilege problems

Postby Fitzcarraldo » Sun Nov 04, 2012 21:47

The SL KDE ISO includes sys-fs/fuse. Did you use another method of installing SL and KDE? What precisely did you do?
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Privilege problems

Postby Asimov » Sun Nov 04, 2012 22:24

Fitzcarraldo wrote:The SL KDE ISO includes sys-fs/fuse. Did you use another method of installing SL and KDE? What precisely did you do?


KDE was install with the Sabayon installation. I don't know what is "SL". I guess a missed something in the partition step, and if you don't declare that a have VFAT partitions, there is no installation sys-fs/fuse?

In retrospection,if i remember these partitions was qualified as "unknown" for the installation application.
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Re: Privilege problems

Postby Asimov » Mon Nov 05, 2012 1:09

I finally manage to have my cd-rom reader but i'm a bit surprised not to see any form of indication appeared somewhere on the desktop when i mounting a cd-rom. Is it normal?

I finally take the time to read your link on sudo. Should a ban sudo when i make and compilation or a package, too ? is "su root" is a better alternative?
Asimov
Young Hen
 
Posts: 38
Joined: Sat Nov 03, 2012 20:27

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests