LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why do I keep losing full permissions? (https://www.linuxquestions.org/questions/linux-newbie-8/why-do-i-keep-losing-full-permissions-876753/)

Chia L'Etranger 04-24-2011 05:18 AM

Why do I keep losing full permissions?
 
I am currently running Ubuntu Studio (a variant of Ubuntu 10.10), dual-booted with Windows 7. For convenience's sake, I have three partitions - one for 7, one for Ubuntu, and a third shared partition, for all of my non-OS-specific media, documents and programs.
I am using RhythmBox Media Player, and have it pointed at a folder on the shared partition as a music library.
However, every time I boot, I have to re-mount the shared partition, which requires re-entering my login password.
In a similar vein, when I'm installing programs in terminal (doing 'sudo apt-get install [x]'), I have to re-enter my password each time I do a sudo command.
Is there any way to keep super-user permissions until I choose to drop them myself? Better yet, can I make it so that logging in as the admin account automatically instates super-user privileges?
Thanks in advance.

EricTRA 04-24-2011 05:22 AM

Hello and Welcome to LinuxQuestions,

That's the whole nature and advantage of sudo, limiting the powers a regular user has on a system and requiring a password to execute 'high level' commands. You can set up sudo no to use a password with the NOPASSWD option if that's really what's bothering you. Automatically obtaining root powers or logging in as root is really a bad idea since one simple mistake could render your system unusable.

Kind regards,

Eric

Chia L'Etranger 04-24-2011 05:24 AM

Hrrmmmm. Yes, good point. Okay, so in that case, is there another way around the problem with mounting the partition? How do I make mounting a partition a task that doesn't require root powers?

TobiSGD 04-24-2011 05:35 AM

Add your shared partition to your /etc/fstab, so that it gets automatically mounted at boot time.

EricTRA 04-24-2011 05:35 AM

Hi,

What have you got in your /etc/fstab for that partition?

Kind regards,

Eric

Chia L'Etranger 04-24-2011 05:38 AM

Hello,

My /etc/fstab reads:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=be975088-b323-4534-8b0f-3b8233386401 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
#UUID=09859a1b-af56-48e9-a061-5e550389d24e none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0

EricTRA 04-24-2011 05:43 AM

Hi,

As indicated by TobiSGD, add your shared partition to your /etc/fstab. Then execute:
Code:

sudo mount -a
to see if it gets mounted correctly (umount before to test). That way you'll make sure there are no errors in your fstab line so that it mounts automatically when booting.

Kind regards,

Eric

tommcd 04-24-2011 06:02 AM

Quote:

Originally Posted by Chia L'Etranger (Post 4334246)
In a similar vein, when I'm installing programs in terminal (doing 'sudo apt-get install [x]'), I have to re-enter my password each time I do a sudo command.

After you run a command with sudo in the terminal, Ubuntu should allow you to run additional commands using sudo for about 15 minutes without having to re-enter your password. Does it not give you this 15 minute period of using sudo without re-entering your password?
As long as you keep the terminal open, you should get this 15 minute grace period on Ubuntu.

Chia L'Etranger 04-24-2011 06:02 AM

Hello,

I'm not sure that I added it to /etc/fstab properly - the drive has disappeared from my Places menu.

I changed my fstab to read:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=be975088-b323-4534-8b0f-3b8233386401 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
#UUID=09859a1b-af56-48e9-a061-5e550389d24e none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
/dev/sda5 /mnt/shared ntfs ro,user,auto,umask=0 0 0

TobiSGD 04-24-2011 06:04 AM

Please show us your /etc/fstab, so that we can tell you.

Chia L'Etranger 04-24-2011 06:06 AM

I have edited my post to include my new /etc/fstab

Edit:
Quote:

Originally Posted by tommcd (Post 4334273)
After you run a command with sudo in the terminal, Ubuntu should allow you to run additional commands using sudo for about 15 minutes without having to re-enter your password. Does it not give you this 15 minute period of using sudo without re-entering your password?
As long as you keep the terminal open, you should get this 15 minute grace period on Ubuntu.

Didn't notice your post, sorry. Yes, I get the grace period, I was just wondering if there was a way to make it last longer.

EricTRA 04-24-2011 06:12 AM

Hi,

I'm not sure but why are you including umask=0? And if you include it, shouldn't it be umask=0000? On an additional note, I think it should be users and not user for NFS.

Kind regards,

Eric

TobiSGD 04-24-2011 06:16 AM

After fixing the umask entry (or just remove it, umask is for writing files, but you are using ro for mounting read-only) and making sure that /mnt/share exists itshould mount properly.
If it doesn't show up in your places (which I think is normal with drives that are mentioned in fstab), just bookmark it in your file-manager and it should show up.

Chia L'Etranger 04-24-2011 06:18 AM

Hello,

I was including umask=0 because that's what it said to do when I Googled it. >.>
Is this bad? The instructions I found here say that it allows "everybody to do everything with the files on disk", which I took as meaning that it gives read and write permissions.
(I couldn't find any rule against users with low post counts posting links, hope this is okay.)

EricTRA 04-24-2011 06:20 AM

Hi,

Already indicated by TobiSGD, umask is used for writing and you are defining your mount as read only (ro). Either change to rw or delete the umask entry.

Kind regards,

Eric


All times are GMT -5. The time now is 10:56 AM.