Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
# /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
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.
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.
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
Last edited by Chia L'Etranger; 04-24-2011 at 06:04 AM.
I have edited my post to include my new /etc/fstab
Edit:
Quote:
Originally Posted by tommcd
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.
Last edited by Chia L'Etranger; 04-24-2011 at 06:08 AM.
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.
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.
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.)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.