I'm trying to make a particular file accessible on my computer ( /dev/uinput ) without having to use sudo or su - I've set up a wiimote to act as a remote for my media player, and it requires access to that file. When I use chmod, chgrp or chown to change the file's settings, it enables access to the file - however, when I reboot my PC, the settings get reset, and I have to change the access rights when I first use it again. I've tried using the following commands to make the changes (substituting my username/groupname as user and group below), as root:
I've just installed Ubuntu 10.10 AMD-64 and mounted several partitions into /mnt/ directory. Now I want to be able to perform operations on those partitions without limitations. I'm trying to change the owner and group but it doesn't work. I'm typing sudo chown username filename to perform the operations.
ok so im working on homework and im not understanding what my teacher is wanting me to do and i dont have time to email him seeing as he might not read it until tomorrow. so ill copy and paste and if anyone can better explain it,
2) Use the umask command to change your file creation mask such that,by default for new files and directories you create, no permissions are taken away from the 'user' (owner), write permissions are taken away from the 'group' (group owner), and all permissions (read, write and execute) are taken away from 'other'. Take a screenshot of your terminal window showing the results of this step.
3) Use the touch command to create a new file called testfile. Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.
4) Use the chown command to change the user associated with testfile (the owner) to cint201. Take a screenshot of your terminal window showing the results of this step.
5) Use the chgrp command to change the the group associated with testfile (the group owner) to users. Take a screenshot of your terminal window showing the results of this step.
6) Use the chmod command to change the permissions for testfile such that the 'user' (owner) permissions are set to read, write and execute, the 'group' (group owner) permission are set to read and execute, the 'other' permissions are set to grant neither read, write nor execute, and finally set the SUID bit for the file. Take a screenshot of your terminal window showing the results of this step.
7) Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.
As root, I use crontab to run mirrordir to backup directories. Everything gets copied over properly, but owner information isn't preserved and root is the owner of all the backed up files. I can deal with that, but crontab reports tons and tons of chown/chgrp errors for mirrordir every time I do back ups--which is every day--and the multiple emails to root of thousands of chown/chgrp errors is very annoying. The error is "Operation not permitted," but that doesn't make sense to me because the job runs as root (right?) and clearly the job is permitted to create the backup files, so why would it fail to chown and chgrp?
I've had the exact same setup on another server for years, and crontab has always run mirrordir without error. Any suggestions how to clear the errors on my new server?
I am desperately trying to recover two folders from a Freecom FSG 3 NAS. As far as I am aware it is running Linux 2.6 based on Snapgear. After working through the hardwares' recovery procedure a number of times, the state of the device appears to get worse and worse. So I have attempted to rescue the files by using a program called Putty to access the device over SSH.When I access the device using Putty I login as admin. The folders I need to recover are located in the home folder. Listing the contents of the directory I get...
I occasionally get into areas in Linux where I get my own ignorance demonstrated....System is a core quad running OpenSuse 11.2 64 bit on a LAN at home. I added a 750 GB SATA drive with the idea of putting all media on the drive i.e.music primarily plus a few movies and making the data sharable by anyone across the LAN i.e. the computer in the living room with an audio line to the stereo. My room mate is strictly a Windoze user so I figured if she wanted stuff on her machine as well then format the new drive with NTFS which I did using GPartd. I then set the drive to mount as /storage under root.
I loaded the music library &c and although I can play music from my user account on this machine I can not add music or videos or anything else except as root. I dont want to have to change to /root to do this. I attempted a chmod tonight as su from a terminal then in the root GUI using dolphin and resetting the permissions under properties and nothing changes. The drive appears in the filesystem as /storage with ownership as root. The permissions are
trying to chmod as root has no effect at all. I would like to be able to add content from any machine on the LAN plus be able to play a movie or video as well as music (I assume this would need the execute permission) but chmod -R 777 storage has no effect. Neither does cd'ing to the directory and trying to change ownership or permissions on the individual files or directories on the drive.Command line as su or as root from that gui, no difference. I do a
chmod g+w,o+rw storage
and the command appears to execute.However I ls -l and find the permissions unchanged. I obviously have or am doing something wrong, possibly in the way I set the drive up in the first place.
I need to actively make sure some files, in a specific directory, are chmod 750 and owned by transmission:media-daemons. Other users will save to this directory, with other permissions and UID/GID but I must make sureto reinforce this default.
So I have this on my /etc/crontab:
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do.
I have a box with multiple users on it and I want everyone to be able to have full access to their home folders, but not be able to see the contents of /home/ or another user's home folder (I.E. bob has full access to /home/bob but cannot access or even see the contents of /home/john)Right now users can see other user's home folders but can't modify what's inside. How do I prevent them from seeing the contents at all?
I'm using Linux in a large multi-user network. Let A be some group which I'm am member of, but which is not my primary group. According to chmod(2) I should be able to chgrp a file to group A. Trying to do so succeeds on a local as well as on a NFSv3 mount, but not on a NFSv4/Kerberos mount (EPERM). Are there any special considerations regarding chgrp when using NFSv4 mounts?
i would like to prevent all users other than the user "parker" on my system from using the su or sudo commands. I have not attempted to modify the sudoers file so it just contains the standard root ALL = (ALL) ALL.
so we need to remove the suid for that command as follows :- chmod u-s /usr/bin/passwd now normal users won't be able to change their own passwords - and only the root user will be able to do it for them.
If there is a simple way to prevent accidental shutdown when the following situation occurs:
Sometimes, I log in on my father's computer to run some administrations' tasks (updates...). For that, I use SSH since I'm frequently far from my parents and what I want is to prevent a shutdown run by my father. Of course, he should be able to turn off by himself if nobody else is connected.
Molly-Guard allows to prevent distant shutdown, my request is a kind of complementary software.
Does anyone know a project which could fit with this request? Do you have simple ideas to write a short code I know bash, perl, python...
I use the following method for preventing the users from changing their passwords , is there any other method other than this ?ls -l /usr/bin/passwd-rwsr-xr-x 1 root root 37140 2010-01-26 12:09 /usr/bin/passwdso we need to remove the suid for that command as follows :- chmod u-s /usr/bin/passwdnow normal users won't be able to change their own passwords - and only the root user will be able to do it for them.
How can I prevent users from changing their own password? I was surprisingly unsuccessfull in finding a solution for this on google. Lots of stuff about hardening ssh access or dealing with password aging using "chage" but nowhere could I find an answer for my question.
I am administrating a system with about 40 or 50 users, and we recently jumped ship from windows to ubuntu. Most of my users are getting along fine, but it seems every few days, i have to help someone who accidentally changed something, and now their account (or more rarely, the machine) is unusable, and has to be reset.
I know configuring /etc/sudoers is a huge step toward fixing my problem, but that still will not completely solve it. What I would like to do is prevent users from making ANY changes to the system (aside from their work files and the like), including themes, icons, desktop, background, etc.
I'm looking for a manner to prevent users from changing the desktop background/wallpaper and all other gnome configuration with booth Ubuntu and Kubuntu. This too (Abraxis, some years ago, have same my problem) [URL] do not solve the problem, for example if I change whit chown (*) own and group of this file to root /.gconf/desktop/gnome/background/%gconf.xml, at the next reboot file return in the previous state. (I don't like Pessulus). (*) chown root:root %gconf.xml chmod 644 %gconf.xml At the reboot file change automatically owner to "student", I don't know why?
but the user could tamper with the histfile itself. Like: rm -f $HISTFILE; rm -f $HISTFILE; mkdir $HISTFILE; rm -f $HISTFILE; ln -s /dev/null $HISTFILE;
I'm experimenting with PROMPT_COMMAND to execute a command each time the user executes a command and so log it somewhere else.This post was pruned from the 2009 Is there a way to prevent users from changing or unset their HISTFILE variable? thread. Please do not resurrect old threads but instead create your own (and maybe provide a link to the old one).
I have a created a wireless connection from the main admin account and checked the box saying "Available to all users", everything is working correctly. I only need to prevent the Desktop Users from switching the connection to another one.
My home/container has me as the owner but the contents all belong to root...I've tried >chown cbjhawks /home/cbjhawks but that didn't change anything. Should it be >chown -R cbjhawks /home/cbjhawks? Or what is the proper command for doing this...
When I installed a new copy of my distro on another partition, in order to preserve all the settings from my old my user account, I made a user account with the same name on the new installation, and then copied my old user account's files (in their entirety) to the new user account, overwriting it. I did the copying from the root account (where else? I assume the new user account can't overwrite itself while it's open), and root became the owner of everything I copied, making it impossible to open the new user account. So I then chowned the new user account's folder to myself. I still can't get in, because apparently, chown only chowned the top folder, leaving all subdirectories owned by root. How do I make chown include all subdirectories? I scanned the man page, but didn't see a parameter.