Ubuntu :: Use Sudoers To Allow Any User To Chown A Certain Set Of Files?

Feb 16, 2011

I have a fairly complicated request The short version is, I want to set up a system so that any user can change the ownership of a certain set of files at any time without root access. I think it's possible to set up sudoers to do that, but so far I have failed miserably.I have tried setting up a wrapper script around chown, then putting that script into sudoers, but it didn't work. Here's the script and sudoers (paths changed to genericize them):

Code:
#!/bin/bash
#this script moves a copy of the code

[code]....

View 4 Replies


ADVERTISEMENT

Debian :: Visudo - Add A User To The Sudoers In Vps Host And Edit A Couple Of Files?

May 2, 2011

I need to add a user to the sudoers in my vps host and edit a couple of files and I just cannot make sense of visudo, vi or nano. The tutorials I find on the net just take too long to study and they are never complete, can someone explain what I need to do? I am running Debian 506.

View 8 Replies View Related

Ubuntu :: Can't Use Sudo After Chown -R User /usr/

Jan 12, 2011

title says it all. I know, I know, a recursive chown, what was I thinking. It was late.

I just straight up:

sudo chown -R user /usr/


Now I can't `sudo', error is "authentication failure".

View 1 Replies View Related

Ubuntu :: Chown As Non-root User (with Authentication)?

Sep 19, 2010

I am currently responsible for administering a shared Ubuntu machine with several unrelated users. Some of these users own multiple accounts and would like to "chown" files between them. Currently, I must handle such requests manually, and this is inconvenient.

I am looking for a way to allow non-root users to chown files with authentication (i.e. prompt for the password of the user to which ownership is being set to). This would prevent an exploit such as:

Quote:
cp /bin/bash ~/sudobash
chmod 4777 ~/sudobash
chown root:root ~/sudobash

Does such a solution exist?

View 2 Replies View Related

Ubuntu :: How To Add User Xyz To Sudoers File?

Feb 15, 2011

How do I add user xyz to sudoers?

View 1 Replies View Related

Ubuntu :: User Not In The Sudoers File?

Jul 15, 2011

I have a bit of a problem... I thought (for certain reasons) I would just add myself to root group and therefore gain some more rights for my account. I could sudo before... But once I gained the root group as a secondary group it says I am not in the sudoers file anymore...

Code:
id
uid=1000(kosta) gid=1000(kosta) groups=0(root),1000(kosta)
Code:
sudo ls
[sudo] password for kosta:

kosta is not in the sudoers file. This incident will be reported. It is really weird and messed up. I can view sudoers file but not edit it... I can cat passwd but I can not view syslog. Is there any way to fix this without having to reboot to recovery mode? And why the heck is this happening after all?

View 2 Replies View Related

Debian :: User Not In Sudoers

Feb 21, 2011

I have installed debian 6 recently, and during installation I selected not to allow root login (and thereby enable my standard user to use sudo).If I check sudoers (by using visudo) my standard user is not listed anywhere, but he can still use the sudo command without any problems.Where else could this permission be stored?

View 5 Replies View Related

Red Hat / Fedora :: Add User To Sudoers

Jul 16, 2010

I recently installed Fedora 13 "Goddard" using the graphical installer (although I prefer the 'text/ reduced graphics' option.When I start the system (after installation completes), it runs in graphical mode and presents me with a graphical login prompt. However, due to security reasons (I'm told), it won't let me log on as the root/ admin user (which is fair enough).If I log on as another user (eg : alpha, charlie or delta, for this example), I can't edit the sudoes file to add one of these users (alpha) to the file. This is because these users aren't in the file, as far as I know.

At no stage during installation was I offered an option of either setting the runlevel or adding a non-root user to the sudoers file.I have found a way to change the runlevel setting, so that is not really an issue.What I would like is either of the following :

1. A modification to Fedora's graphical installer that allows for an explicit option to set the runlevel (graphical/ command-line) and another option to add the first created non-admin user (alpha in this example) to the sudoers file.

2. Information on how to add a user to the sudoers file without adding all others (eg : alpha, but not charlie and delta, in this example).

I have read the relevant man and info pages for the su, sudo, sudoers and visudo commands, but I only got confused. (I don't know BNF/ EBNF and I would like a solution that doesn't involve having to learn these BNF dialects, although I will if I have to.)Also, I have seen solutions that show how to add all users, but not individual users, to the sudoers file. What I want is to add an individual user (if this isn't clear already).Please feel free to send me an e-mail about this post : nigel.nq.ngw[at]gmail[dot]com with the subject line "Linux Forums - Fedora 13 Add User to Sudoers"

View 3 Replies View Related

Ubuntu :: Sudo: User Is Not In The Sudoers File

Mar 25, 2010

I get this message if i try to use sudo/gksudo. What causes this, how can I solve it? It has been working for years. If i remember correcttly there was a sudo update few days ago, maybe it doesnt work since then, i havent used it in the last few days.

View 9 Replies View Related

Ubuntu Security :: User Is Not In The Sudoers File

Mar 15, 2011

Suddenly I am not in the sudoers file. I am not sure how to recover from this. I have no grub screen at bootup, so I can't boot into single user. I think I am going to have to boot a live version of ubuntu to start with. Is that right? What's next after that? Also, how could this happen, I haven't touched the sudoers file or added users or anything like that (well not that I am aware of) I am a little concerned that this may be the result of someone breaking in? Would this be a likely symptom?

View 3 Replies View Related

Fedora :: Add User To Sudoers File?

Apr 18, 2011

How do I add myself to the Sudoers File? When I go to use the "Sudo" command, it tells me I am not in the Sudoers File, so I have to do "su -" to bypass it for the time being. How do I add myself?

View 12 Replies View Related

General :: Add A User In Sudoers File

Oct 4, 2010

How do I add a user in a sudoers file.

View 6 Replies View Related

Ubuntu Servers :: How To Setup User To Be In Sudoers File

Jan 31, 2010

I just installed Gutsy server. It is the only disk I can get to boot on this old PC trying to salvage. I'm at the "SERVER LOGIN" prompt. I created one user during the install. I can login as that user, but that user has "...Is not in the SudoersFile." How do I setup this user to be in the sudoers file, without having any ability to make changes to the system?

View 5 Replies View Related

Fedora :: User Login Not In Sudoers File

Oct 2, 2009

I wanted to do an installation from my user login so I typed
sudo make install
then it says
<my_user_loggin> is not in the sudoers file. This incident will be reported.
How to correct this matter...

View 4 Replies View Related

Ubuntu :: User Removed From Sudoers / Get Back To Promised Land?

Jan 9, 2010

I managed without knowing to remove my user from the sudo users group. I did usermod -G fuse <username> and now I can't sudo anymore. How do I get back to the promised land?

View 3 Replies View Related

Ubuntu Servers :: Unable To Add User Directly Into The Sudoers File

Jun 22, 2011

I'm running Ubuntu Server 11.04. It came time to add User to the sudoers file: so I decided to simple add User to the admin group: usermod -a -G admin user Then I used visudo to check if admin users had been set to receive sudo privileges. I uncommented the line admin ALL=(ALL) ALL. Nothing happened. I've even tried to add user directly into the sudoers file as user ALL=(ALL:ALL) ALL, but that failed too.

View 3 Replies View Related

Fedora :: Add The Default Normal User To The Sudoers Group?

Jul 3, 2010

How do i add the default normal user to the sudoers group? Is it normal for the main user to be kept out of the sudoers group or did i do something wrong during install?

View 2 Replies View Related

General :: User Not In The Sudoers File - This Incident Will Be Reported

Mar 12, 2010

I need to install a package. For that I need root access. However the system says that I am not in sudoers file. When trying to edit one, it complains alike! How I am supposed to add myself to the sudoers file if I don't have the right to edit one? I have installed this system and only administrator. What can I do?

Edit: I have tried visudo already. It requires me to be in sudoers in the first place.

amarzaya@linux-debian-gnu:/$ sudo /usr/sbin/visudo

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for amarzaya:
amarzaya is not in the sudoers file. This incident will be reported.
amarzaya@linux-debian-gnu:/$

View 5 Replies View Related

Ubuntu :: Adding A Line To Sudoers File So That Every User Can Run A Particular Program As Root?

Mar 27, 2010

is it possible to do so? I mean, I want every user to be able to run '/bin/x' for example, as root without entering a password. I know the security risks, but I'm trying this in a risk-free environment which security does not matter very much.

View 2 Replies View Related

Ubuntu :: Main User Account Not In Sudoers List Debian 6.0 Squeeze

Feb 23, 2011

When i installed the new version of debian on my laptop to try it out, i noticed that i can't sudo as my main account is not in the sudoers list and i cannot put me in because i'm not sudo.

Code:
cesar@debian:~$ groups

cesar cdrom floppy audio dip video plugdev netdev powerdev scanner bluetooth
I have to enter as a root account but don't know how, plus i forgot my root password.

note. i dualboot with ubuntu 10.04 and grub is managed by it.

View 1 Replies View Related

Server :: Sudoers Will Not Work - Error Says Sudu: Can't Open /etc/sudoers: Permission Denied

May 31, 2011

I have tried several things to attempt to fix my sudoers file however it is still coming up with errors. The error says

[code]...

the sudoers configuration file is set to the default as I have ran a dpkg on it, have also uninstalled and reinstalled it, and went over the configuration file ensuring it looked like the defaults I had seen online.

View 8 Replies View Related

Fedora :: Normal User In Sudoers Group But Can't Install Programs Without Root-users Password?

Jul 4, 2010

The normal user is now in the sudoers group. How can i allow it to install programs using it's own password rather than having to know the super-secret Root-Users password?

View 5 Replies View Related

General :: Correct Entries In Sudoers Files

Sep 24, 2010

After adding what I thought were the correct entries in /etc/sudoers so I'd be able to run commands without needing to sudo them, I keep having to. My sudoers file entries look like this:

Code:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
user_me ALL=(ALL) ALL

## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
user_me ALL=(ALL) ALL

## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
user_me ALL=(ALL) NOPASSWD: ALL

I have also confirmed that I'm a member of the wheel group in /etc/group:
Code:
wheel:x:10:root,user_me
And yet, I still have to sudo to do pretty much anything.

View 7 Replies View Related

Security :: Using Sudoers To Restrict Editing Of Certain Files?

Aug 2, 2010

In a recent discussion I had, I was led to believe I could use sudoers to restrict using vi (for example) for the editing of say specific config files. I know how to allow root use of vi and how to lock it down from getting to a bash prompt with NOEXEC tag,but I can't figure out how to restrict the use of vi to only edit certain files. Tutorials and howtos I have checked don't address this

View 7 Replies View Related

OpenSUSE Install :: Edit Some Files In /usr . So Did "chown -R Username /usr" As Root?

Jun 11, 2010

I was trying to edit some files in /usr . so I did "chown -R username /usr" as root . after editing, I did "chown -R root /usr" !!!!! it made me unable to open Yast and VirtualBox and many other features and applications . is there anyway to fix this ? I think some files in /usr was not owned by root,

View 4 Replies View Related

Server :: Hange The Owner Name Of Some Files But When Use "chown"?

Jun 30, 2010

I am trying to change the owner name of some files but when I use "chown" they keep changing for other different user name(postgres):

Code:
[root@server root]$ls -l
-rw-r--r-- 1 root root 3911 Nov 2 2008 test1
[root@server root]$chown newuser test1
[root@server root]$
[root@server root]$ls -l
-rw-r--r-- 1 postgres root 3911 Nov 2 2008 test1

How I would fix this, I tried to change the bashrc but I couldn't

View 2 Replies View Related

Fedora Security :: User Access To Start And Stop Tomcat But Also Gives User Access To Start And Stop Other Services "/etc/sudoers"

Mar 13, 2009

I am trying to give access to ONE single user to start and shutdown tomcat server. The problem being, when I enter syntax: username ALL= /etc/init.d/tomcat5, /usr/local/tomcat/webapps, PASSWD:ALL This gives the user access to start and stop tomcat but also gives user access to start and stop other services within /etc/init.d - such as httpd etc... What is the proper way to give user access to start and stop service, and limiting that power to only one service....

View 2 Replies View Related

OpenSUSE Network :: Root User Has Access To Remote Folders/files Of Any User?

Jan 21, 2010

Prelude: OpenSUSE 11.2 (2.6.31.8-0.1-desktop), installed Novell client 2.0 SP2 (novell-client-2.0-sp2-sle11-i586.iso).

I found that if any usual user is logged into a NDS-tree, then _local_ root has full access to user's network shares, including the user's home directory located on remote Netware-server. Is it by design or
have I missed something? Nevertheless in windows local admin has no access to network resources mounted of any other user. If you runas shell (as admin) then admin in principle can't "see" network shares which were mounted (connected) by other users - they are accessible ("visible") per session.

View 3 Replies View Related

General :: Change All Files Belonging To One User To Another User?

Jul 20, 2011

I'm looking for a Linux command that can change ownership of all files belonging to a given user,preferably in a targeted directory, to another specified user. My dream command would look something like this. chuser -R --olduser tom --newuser jerry

This is my scenario... I have a backup file (.tgz) with user and group information preserved in it. It was taken from a web server running Apache and MySQL. The files in the backup are from across the system and contain files from several different users and several system type accounts and it is key that when restored on the new server the settings are not lost. The problem is that the users on the machine the files are being restored to don't match the ones in the backup file. For instance both machines had a MySQL user but they have different user ids and there are several user ids that existed on both machines that belong to different users. This means there is no way to sync the users on the new machine to the ones on the old machine. I can find all the users files with the find command like this...

find /decompressed-backup-dir -uid 1050
or
find /decompressed-backup-dir -user tom

If, as I suspect, there is no way to do what I want with a single command then perhaps there is a way to pipe the results of the find command to another command to handle the ownership change?

I could do this with a PHP script but there are 4GB and tens of thousands of files in the backup so I don't want to use PHP or Perl but I would be happy with a shell script that could handle it.

View 2 Replies View Related

Ubuntu :: Command Line To Copy Files From One Location To Another / Retain Source Files Group / User?

Feb 20, 2011

Is there a method at the command line to copy files from one location to another and retain the source files group and user?I'm migrating some MySQL files from one machine to another.I want to back-up the original files in the directory presently. They have owner:group of mysql, some have owner:group root:mysql and so on. To copy them under cli or Nautilus everything changes to root for I execute sudo cp or gksudo nautilus and copy via gui.

Since it is MySQL data I could simply do a dump of the database and restore it on the other machine. But there's about 20 db's and I want to do this via a copy for it will be faster - at least that is what I think.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved