If you're not using sudo, its configuration isn't relevant. sudo options are sudo's alone and don't matter when you don't use it.
If these things are being mounted by hand, could you just alias mount to sudo mount in their .bashrc? Users could thus run 'mount' and the shell would run 'sudo mount'. This is a lot safer than the alternative, i.e. setting the mount binary setuid so it always runs as root!
If you're not using sudo, its configuration isn't relevant. sudo options are sudo's alone and don't matter when you don't use it.
If these things are being mounted by hand, could you just alias mount to sudo mount in their .bashrc? Users could thus run 'mount' and the shell would run 'sudo mount'. This is a lot safer than the alternative, i.e. setting the mount binary setuid so it always runs as root!
Ultimately, I want to have this in a script.
As far as not using sudo, I'm confused then. In looking for how to run truecrypt without needing a password, I read that if this is added to the /etc/sudoers
then one can run truecrypt without having to type sudo.
This is in fact the case in my setup. If I have this line in sudoers then I can run truecrypt without prefixing it with sudo. If I don't have this line, then truecrypt asks for admin privileges.
To show truecrypt is not aliased :
Is truecrypt itself calling sudo to mount? If that is the case, then this makes a little more sense. The more I think of it, the more I feel it is likely this way. But still, truecrypt isn't needing a sudo prefix so how can modifying sudoers affect the truecrypt script? Can someone explain? Why don't I have to have sudo in from of truecrypt as in:
as evidenced by this result:
Furthermore, why wouldn't it require mount in sudoers rather than truecrypt if truecrypt is using "sudo mount ..."
Bewildered but enjoying learning,
Narnie
---------- Post updated at 06:15 PM ---------- Previous update was at 05:42 PM ----------
BTW, if I have either of the 2 mount/umount combos I listed in my first post in place I get this when trying to run sudo mount ...
It still wants a password if I prefix it with sudo even though I've tried:
As far as not using sudo, I'm confused then. In looking for how to run truecrypt without needing a password, I read that if this is added to the /etc/sudoers
then one can run truecrypt without having to type sudo.
truecrypt is smart enough to call sudo by itself. It's a fairly friendly program.
Quote:
Is truecrypt itself calling sudo to mount? If that is the case, then this makes a little more sense. The more I think of it, the more I feel it is likely this way.
Yes, truecrypt is calling sudo.
Quote:
But still, truecrypt isn't needing a sudo prefix so how can modifying sudoers affect the truecrypt script?
Because it calls sudo itself. it's not a "prefix". You're actually running a command named 'sudo'. Imagine you made a script that called 'sudo umount'.
As for the proper syntax, I have this line in my sudoers:
It lets anyone in the wheel group run powertop as root with no password. If you updated your users' groups recently, try logging out then back in.
You can put sudo in scripts. truecrypt is smart enough to call sudo by itself. It's a fairly friendly program. Yes, truecrypt is calling sudo. Because it calls sudo itself. it's not a "prefix". You're actually running a command named 'sudo'. Imagine you made a script that called 'sudo umount'.
As for the proper syntax, I have this line in my sudoers:
It lets anyone in the wheel group run powertop as root with no password. If you updated your users' groups recently, try logging out then back in.
Perhaps I shouldn't have said "prefix" in this context. I was not meaning test.txt as test is the prefix and txt is the suffix, just that you have to have "sudo something" to run something if something requires root access.
So I'm still puzzled why I don't have to put sudo in front of truecrypt when I run it.
Why doesn't the sudoers require mount to be mentioned and not truecrypt since sudo is elevating the privies of mount, not really truecrypt?
Also, why does "sudo mount --binding foo.bar foobar2" ask for the password even when I have mount set up as I have posted above which is identical to the code you have in the wheel line again?
The only difference is "admin" is in wheels place and /bin/mount is in /usr/bin/powertop's place.
Is mount "special?" If so, why does this work for truecrypt?
I'm sure I'm just being thick, but I really want to "get this."
With thanks for all the patience,
Narnie
---------- Post updated at 11:29 PM ---------- Previous update was at 10:48 PM ----------
OK, as far as why mount and umount are still requiring password was because I was blinded by the truecrypt line before it.
It should be /bin/mount or unmount not /usr/bin/mount.
Hi Folks,
Could anyone please assist me with the what could be the scenarios to test the file system mount/umount performance check in HPUX.
Thanks in advance,
Vaishey (5 Replies)
Hello Folks,
I need help on removing sudo access on one id but first of all, can i confirm that the user below is having sudo access ?
if he did have sudo access, how to remove ?
thanks
alrsprd3:root-/etc> more sudoers | grep fzcx0l
fzcx0l ALL=(ALL) ALL
alrsprd3:root-/etc> (2 Replies)
I have some questions:
1, I successfully mounted my usb drive with "sudo mount /dev/sdb1 /mnt", but I can't wirte, It says "read-only file system". But I can write it in windows.
2, After I umounted the usb drive the led of it still on, but not blinking. Is it safe to unplug it? How to let it's... (17 Replies)
Hello...
I've mounted a share using standard nomenclature for the NFS mount command with the following command line:
mount -t nfs -o rw {IP address1}:/ /mnt_for_70 / {IP address2}(rw)
mnt_for_70 is a mount point I created on {IP address2}
I'm confuse and want to be sure I use the... (1 Reply)
cat test.sh
sudo mount -t vfat /dev/sda7 /media/Ddrive
If i double click the test.sh file and select run in terminal then the terminal prompts for password.
How can i avoid typing password?
Or if i double click test.sh file and select run then nothing happens.
What i'm trying "Double... (3 Replies)
In Solaris 8, when I boot to single user mode, mount a device and then reboot or init 0, the system unmount it automatically. However, in Solaris 10 it does not seem to do the same. Here is what I did:
{0} ok boot -s
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0.... (11 Replies)
Is it possible to mount a disk from a non-root account?
I'm developing a Java application which executes commands in the shell using the java.lang.Runtime.exec api, which runs fine for commands ls, df, etc., but for commands mount and umount, i have problems as I need to be root to eecute these.... (8 Replies)
i'm prepping for my midterm, which i will bomb. i am scurrying to finish reading the final chapter before i get down into the review.
however, i came across something in chapter 8 - "mounting file systems" that has me really confused.
the text says the following:
then it goes on to... (2 Replies)
I have a 1 GB jazz drive. The jazz disk is used daily, both at home and at work on my Win 98 Server. So, I have to keep it in vfat format, which is fine because Linux rocks and will read it no problem. :-) However, I can't just stick the disk in the drive and open up the jazz folder in my mnt... (2 Replies)