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 have screwed my system up again!! I was trying to get mountpy to run w/o requiring a password every time. I followed the advice the app gave me and added
"gregg ALL = NOPASSWD: /usr/bin/mountpy, usr/bin/umountpy"
to the end of my etc/sudoers then every time I try to sudo anything I get a failure telling me that there is a error in line 36 of etc/sudoers.
How do I restore etc/sudoers without root acess?? I am running Kubuntu feisty if that makes any difference to anything.
it shouldn't matter if the live cd is a different distro should it??
Nope, all you're doing is editing a text file.
Quote:
Also, should the line I added be in a specific place in the file? I just added it at the end.
That should be fine.
Just out of curiosity, is all this necessary because you don't get a root account with Ubuntu? Is it true that if you want a root account you have to go through a song and dance to set one up?
I can't believe that. It must be an urban myth.
cheers,
jdk
Is it true that if you want a root account you have to go through a song and dance to set one up?
I can't believe that. It must be an urban myth.
A song and dance like changing the password for root to something other than the default value? How dare they make us do so much work to have a root account!
A song and dance like changing the password for root to something other than the default value? How dare they make us do so much work to have a root account!
While there is a reason the root account is inaccessable by default, if users will insist on having passwordless sudo ...
Still, passwordless sudo is still more secure than passwordless root... just.
I'm having trouble following this logic. Are you saying that if users will insist on having sudo with no password (not even their own?!?!?!) then they will insist on having a root account with no password. I can't imagine anyone wanting either one. Are you claiming that systems with a root account such as Debian are inherently less secure than those that don't provide one by default? As I see it, not having a root account gives you the opportunity to paint yourself into a box, which is what happened to the OP. I he had had a root account the solution to his problem would have been trivial. That's all I was saying.
cheers,
jdk
I am not great with the whole linux thing yet, I moved over from windows a while back and don't read too much!!
Any way, I'm now logged into my live system (Xubuntu) and am having another fairly basic problem. I can't figure out how to mount my drive(s). I would usually see them as unmounted in the left hand pane of Dolphin, click, enter root password (which I do have!) and presto.
In my Xubuntu live system, I do not have a nice easy gui option (that I know of) so its into terminal. How do I locate the drive to mount? Like I said, it's a basic problem, but I spend as little time with cli as possible as I don't know my way around!!
Thanks again.
OK Sussed it, I opened the partition editor and all my drives popped open in seperate Thunar windows.
Trying a reboot into Kubuntu next. Hopefully I'll be back to give the all clear shortly.
Thanks again though, us muppets need a little steering occasionally:-)
Last edited by PClOStinspace; 03-01-2009 at 01:07 PM.
I'm back to square one again. I had to go back into the live cd again and remove the whole line as it still caused an issue even with the amended syntax.
The whole reason for doing this is I have a couple of drives that I want to mount automatically at startup. I have tried editing fstab before to achieve this to no avail.
I'll keep on plodding and look for another solution.
I'm back to square one again. I had to go back into the live cd again and remove the whole line as it still caused an issue even with the amended syntax.
I'm running Kubuntu. The sudoers file has several examples. If you look at those and then look at the entry that you created it should be evident how your entry does not conform to the syntax.
Quote:
Originally Posted by PClOStinspace
The whole reason for doing this is I have a couple of drives that I want to mount automatically at startup. I have tried editing fstab before to achieve this to no avail.
Nevertheless the better approach is to create entries in the /etc/fstab file to automatically mount disk partitions at boot time.
Quote:
Originally Posted by PClOStinspace
I'll keep on plodding and look for another solution.
What are the device mappings to the disk partitions that are not working? (/dev/sda1, /dev/hdc4, ???)
The basic syntax of /etc/fstab entries are as follows:
While there is a reason the root account is inaccessable by default, if users will insist on having passwordless sudo ...
Still, passwordless sudo is still more secure than passwordless root... just.
If the command is one such as ejecting the cdrom drive, I don't think there is much of a problem. Using polkit might be better for this because you can indicate that it is a local user.
---
The OP should have used the "visudo" program to edit the sudoers file. That adds error detection and gives you the option to fix the problem or abort the edit.
---
If the partitions are on external drives, use the "noauto" option in /etc/fstab. Also use UUID=<the_uuid_number> instead of the device name. If you own the filesystem and also use the "users" option, you can mount the partition as a normal user. You don't need to use sudo at all. You could even put the mount command in your .bash_login (or .profile) file so they mount when you login. ( note: maybe add some logic to test for the device before trying ).
The mount command is one of the few that are legitimately suid root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.