Ubuntu :: Allow A Specific User To Mount Or Remount A Specific Partition?
Jun 9, 2010
my system I want user1 and only user1 to be able to mount and unmount a specific partition, this partition contains backups and is usually mounted read only, needs to be temporarily mounted read/write by user1 while doing the backup.user1 is an unprivileged user. I've read that the user option will let any user mount the file-system (and only that user can then subsequently unmount it) and that the users option allows any user to mount or unmount the file-system.I also found this in mount's man pageQuote:The owner option is similar to the user option, with the restriction that the user must be the owner of the special file. This may be useful e.g. for /dev/fd if a login script makes the console user owner of this device. The group option is similar, with the restriction that the user must be member of the group of the special file.So it looks like I'd need a login script for that user to make the user owner of the device file (/dev/voiceserv/backup in this case)
How do I give permission to a logged in user to stop/start a specific service without entering a root/sudo password? So they can do a simple "service SomeService stop|start" It is for a headless Ubuntu server.
How can I mount a device with specific user rights on start up? I still have some problems figuring it out. I would like to mount the divide with uid=1000 and gid=1000. My current entry to the /etc/fstab/ file looks like this:
I've just started playing with virtualization and I started my first VM. I would like to know if it's possible for the host machine to mount the partitions of the VM when it's closed. Right now the VM uses /dev/vg0/vm1 and has 3 partitions on it. I tried mount /dev/vg0/vm1 ~/vm1 at first before I remembered that I'd need a way to mount a specific partition inside the logical volume, not the volume itself!
I need to search a bunch of files in a specific folder for a specific number and add all the numbers together to a total sum. I use Rsync everyday, everytime I run rsync i get a logfile (rsync output) witch contains the textstring "Total bytes sent: xxxxxx".
The "xxxxx" can vary in lenght. I need to extract the "xxxxxx" from each file and add the numbers together to a total size over a week or a month. Is this possible? And I wish to only use bash. One way of doing stuff at a time my friends .
I'm trying to configure our mail server to block email from a specific sender reaching a specific recipient. In other words, if one of our employees is getting harassed by a 'stalker', how would one go about blocking, at the MTA (Sendmail) level, a specific sender email address from reaching a particular users inbox? We do not want to capture the email - simply block it before it consumes server resources.The Sendmail server (MTA) is a front end to our Exchange server so no user accounts exist on the Linux server. We simply use it as a SPAM and Virus scanner then forward clean email to the Exchange server.
we are in a place where we have to give an account (with sudo access...) to a user we don't completely trust (I am reminded of this comic). What we need to set up is some way of logging pretty much everything that this user does, especially what he does as root (via sudo or sudo -s). Now, I know that anything we do can easily be undone by another user with root access, but we feel that if he does disable logging we can use this as a really good excuse to revoke his access. So, does anyone know what logging stuff I'd have to set up to completely monitor one user (it is ok if we are monitoring everyone, but we'd prefer to watch one user if possible)?
I want to know, how to allow to a specific user to run an application (for example Virtual Machine Manager) without entering a password? I have tried to add this user into appropriate groups, but it didn't helped.
I have a very peculiar issue - I can't log in to KDE as one particular user (andrew, which is my regular account) though all other users including root, mythtv & other family members can log in without any problem. When I try to login as andrew the X server appears to crash as the screen goes blank and I have to press Ctrl+Alt+BkSp to get back to the KDM login screen. The proximate cause seems to have been updating KDE to 4.4.5 using yum - I did this logged in as andrew in a terminal session using su - root, and the black screen problem arose next time I tried to log in.
I can log in OK as andrew using a different desktop manager e.g. Sugar. I am using radeonhd graphics driver; if I change to "vesa" in xorg.conf I can log in OK. If I change the home directory for andrew to that of another test user and change the file ownerships, I can log in OK. Therefore the problem must lie in a config file(s) somewhere in the andrew home directory tree, which is specific to KDE and also radeonhd. I have checked in all the obvious (and unobvious) places but can't find anything. There are no relevant SELinux errors or entries in syslog or Xorg.0.log. The .xsession-errors file from a failed login attempt is here [URL] it isn't significantly different from a normal one, and as the entries are not time-stamped I am not sure which ones arise during the login and which when I restart the X server. I am running F13 (kernel 188.8.131.52-147.fc13.x86_64) without any other significant issues.
Because I keep a lot of data on a Netgear ReadyNAS which can be presented as a NFS server, I would like to have the default CentOS user have a uid and gid that match those for the user that owns the main NFS share. That way I can treat it as if it were a directory that I owned on the local machine. I'm probably going to install CentOS 5.3 over again to get a totally clean system. What is the neatest way to ensure that the default user has the desired uid and gid? Or is there a better way to work with the NAS? (Right now I'm running it with CIFS shares, but these are quirky and do not behave quite like a local file system, I'm hoping that NFS would be more consistent, but previously attempts to run NFS were hampered by different uid and gid values).
I just set up my own server and basically my folder is on say /media/disk1/ and my girlfriends is on /media/patato/ is there a way i can set it so that if i log in it goes to my folder and if she does it goes to hers.... I've currently got it set up as /media/ that it goes to but i cant get it to change it for each user (we can also browse each others drive and we dont want that, we want to be tied into /media/ourdirectory and all of its subdirectories) problem is that it is running on a computer that use to be functional (same install because I cant find my disk drive) so it cant use home folders....
Here is what I want to do: have procmail get my mail from all of the different mail servers, and then put them in my inbox folder (I'm able to do all of this), but also have my emails sorted by domain into subfolders.So for example, procmail downloads my email, puts it into the gmail folder which is a subfolder of my inbox folder.I know how to get all of my email into the inbox folder - but not into a specific subfolder.
I have many partition for many different operating systems. I have Windows 7 on partition 2, and Ubuntu on partiton 3. Previously I could use GParted to set the boot flag for the drive to whichever partition I desired. If I set it to partition 2, I got the Windows bootloader, and if I set it to partition 3, I got the Ubuntu bootloader. Now if I set the boot flag to my Ubuntu partition, I get a message something along the lines of "disk not found". I can't recall its exact message at the moment. When setting up Ubuntu the installer has the "Advanced" button on the last page which gives you the option of which partition to install Grub to. Is there any way I can access this again, or a utility that will do the same thing? I have used the grub program in the following way to restore the Ubuntu bootloader
sudo grub root (hd0,0) setup (hd0)
but the boot flag is still on my Windows partition, suggesting Grub has overwritten Windows' bootloader. How can I tell grub which partition to install to? I'm using 10.04 and Grub2.
How can I assign a directory to a specific partition (another hard drive)?How would someone move / home/ username/music to another drive or partition? But do so in a way that it no longer writes MP3's (or FLAC) files in the original directory of the root drive?
I have installed gpg (GNU privacy guard) Now I have done this in root and therefore it was installed in the folder /usr/bin/gpg Now my other non-root user accounts have all functionality except main ones (ls, mkdir etc...) disabled. I require more functionality on this websever, especially to enable the use of the binary gpg How do I enable these commands for that specific user? I have tried to figure this out for so long,
I have a need to run a specific app as a specific user when the machine boots into init 3. I can not run this as root so I need to specify a user. Can someone tell me how to accomplish this?I usually have to log in and start this application by typing check -D which starts this app and daemonizes it. I want to be able to run that at boot with my normal user not root.I hope I explained this correctly.I have added it to rc.local but it runs as root.
None of these work. The only thing I've found that does work is:in.telnetd : IP_addressBut this is only a semi-viable solution because we will soon have multiple logins for the one username from different servers and sub-nets. Ideally, I'd like to be able to deny telnet and ssh access to this username regardless of where the login originates. I suppose it would be possible to specify each server IP, but that'll be a bear to maintain
So right now VNC is starting a session using :1. When I connect to that session, the terminal is logged in as root. I'd like for the terminal to be logged in as a different user as some of my end users are going to be using this and don't require such privileges. I found that I can "su" to a different user and start a new VNC daemon on :2 and when I connect to that session, the terminal is logged in as that user. What I want to do is get that to run at boot-up.
I know if I run repquota -a I can see the quotas set for all users.How do I modify the quota for a specific user?So say the output for john is:User used soft hard grace used soft hard grace----------------------------------------------------------------------john.someth -- 122844 51200 51200 4995 0 0How do I make his block limits 0 so they are unlimited?
I was doing an exam the other day and they wanted me to create a partition /dev/hdd5 so I saw there was a /dev/hdd so when I created the partition it obviously named it /dev/hdd1. How do I get it to be hdd5?
I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.
I'm using rsync and crontab to do automatic backups from my /home partition on /dev/sda to my backup drive /dev/sdb3. The backup partition is ext4.
But the backup partition (sdb3) is obviously on a secondary drive, and I want to automount it when I log in. I read that you have to edit /etc/fstab to do this, but I'm not familiar with the process and can't find clear enough instructions, so I was wondering if someone could give me the command I need and maybe explain how it works?