11
votes
4answers
2k views

How does the OS know that a command needs sudo?

When you run an executable, sometimes the OS will deny your permission to. For example running make install with the prefix being a system path will need sudo, while with the prefix being a ...
1
vote
2answers
41 views

relation between chmod and sudo on an executable file

What is the relationship between chmod and sudo on an executable file for a user? Are the cases that "a user needs sudo to run an executable" the same as the cases that "chmod hasn't set the ...
4
votes
1answer
123 views

View List of Sudoers with No Sudo Priviledges

If I'm not a sudoer, is it possible to view the list sudoers? Does /etc/group show this information?
5
votes
1answer
127 views

Give user permission to rm without password or sudo

I'm trying to give the ubuntu user on my machine the ability to rm folders and files (mainly in the /www/ folder) without the need to invoke a password or the need to use sudo. I've been following ...
2
votes
1answer
51 views

How do I limit local user file system access? What is the best method?

I have a Linux installation with a default user and an admin user (and root). On startup, the default user is automatically logged in and a particular application is launched. My intention is to ...
2
votes
1answer
451 views

Vim Error E138: Can't write viminfo file $HOME/.viminfo!

I'm afraid I've run into something rather strange. When I open a file normally, vim README.txt, everything is fine. But upon sudo vim README.txt, the file renders blank, and gives me a E138: Can't ...
4
votes
1answer
56 views

How can I run growisofs via sudo?

Whenever I've attempted to run growisofs via sudo I've always gotten the following error message. $ sudo -i growisofs :-( growisofs is being executed under sudo, aborting! See NOTES paragraph in ...
0
votes
1answer
29 views

Write a file in /var/lib/sysnews/ [duplicate]

In that folder are stored the news files: they can be created by the system administrator to write some informations for the users, as suggested in this link. I tried as a normal user to add a file ...
4
votes
1answer
210 views

Sudo permissions by ldap groups via nslcd

I have a problem with my sudo permissions in an MS ActiveDirectory to Debian LDAP authentication/authorization setup. What I have so far I've configured nslcd with libpam-ldap via ldaps and ssh login ...
-1
votes
1answer
74 views

Why sudo ./bin/mysqld_safe & on Mac OS X 10.6.8 doesn't ask for password?

I get the following permissions from terminal: $ cd /usr/local/mysql $ ls -l drwxr-xr-x 41 root wheel 1394 29 Apr 00:55 bin drwxr-xr-x 4 root wheel 136 29 Apr 00:55 docs ...
0
votes
1answer
47 views

Can't simulate initial login using sudo

$ sudo -iu cyrus sudo: unable to change directory to /srv/cyrus: Permission denied sudo: unable to execute /bin/zsh: Permission denied I don't understand why I would get permission denied for ...
5
votes
1answer
202 views

Writing raw images safely to USB sticks

Trying lots of different linux, on all kinds of hardware I find my self typing commands like this quite often: sudo dd if=xubuntu-13.10-desktop-amd64.iso of=/dev/sdc bs=10240 Needless to say, ...
1
vote
2answers
222 views

How to edit /etc/hosts without sudo?

I have a machine that I can only access using SSH. I was messing with the hostnames, and now it says: ssh: unable to resolve hostname I know how to fix it in /etc/hosts. Problem is, I need sudo ...
9
votes
4answers
1k views

Sudoers for one day per week?

I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like rm -f * that occured not long ago. Right now, we ...
0
votes
2answers
30 views

How to create a directory which will have access to the user who is installing a package?

I am packaging one of my projects on Debian. The project expects a directory to be created at XDG_DATA_HOME or ~/.local/share/ where the data files will be kept. Now I am trying to create and feed the ...
1
vote
3answers
443 views

Run Linux “motion” app as user

I'm trying to run Motion app on a Linux box. For various security reasons, I'd rather run it as regular user than sudo. However, when I run "service motion start" without the sudo in front, it says: ...
0
votes
1answer
197 views

Can't access the directory /etc/ppp/peers?

I want to read some configuration file. The problem is that I can't move in the folder peers and typing the command ls -l, I see this permission's record: drwxr-s--- root dip ... I never seen that ...
6
votes
1answer
148 views

Cannot expand asterisk without proper permission

Can someone explain to me the following? $ ls -ld /temp/sit/build/ dr-xr-s--- 3 asdf qwer 4096 Jan 31 2012 /temp/sit/build/ $ ls -ld /temp/sit/build/* ls: /temp/sit/build/*: Permission denied So ...
0
votes
1answer
195 views

Can't sudo after lock password, can I recover from that?

After setup ubuntu with default settings, It allows user to login with password, so I use passwd -l [username] to forbid password login both in ssh and console. But when I use sudo to execute ...
2
votes
2answers
983 views

Unable to run 'sudo chmod +w /etc/hosts'

I am logged into my remote VM (running out of ESXi) as user xyz. I wanted to change my /etc/hosts to add some network names that were not visible by default. I first tried to run sudo vi /etc/hosts ...
3
votes
2answers
461 views

Who is file owner if the file is created using sudo command?

I logged in using my username ravbholua: ravbholua@ravbholua-Aspire-5315:~$ echo $LOGNAME ravbholua I create file named a1: ravbholua@ravbholua-Aspire-5315:~$ echo>a1 ...
2
votes
3answers
2k views

Allow a user to view the home directory of other users via sudo

I am new to system administration. We have a lab set up where we have a server and client machines. The client machines have LDAP users which has the work area for all the users in the centralized ...
1
vote
2answers
164 views

Can't run su after changing permissions to su file

I am running Linux Slackware 14.0. I wanted to allow to do su only to the members of wheel group, so I modified the permissions of /bin/su and /usr/bin/sudo files to this: bash-4.2# ls -la /bin/su ...
0
votes
1answer
619 views

Allow www-data to perform specific commands

I need a PHP script to perform git pull however I am not naive enough to give it permissions on git. I've wrapped git pull in a script which www-data has permissions for, but I'm not sure how to give ...
3
votes
1answer
606 views

Can edit file as root, but not using sudo

I just faced a really strange situation. I was trying to edit file /usr/lib/thunderbird/thunderbird.sh, which has the following permissions: $ ll /usr/lib/thunderbird/thunderbird.sh -rwxr-xr-x 1 ...
2
votes
1answer
240 views

How do I grant someone else access to my linux server

If you administer a Linux server, what steps do you take to properly grant someone else access? Assuming they will log in over ssh, don't already have an account, and will need root access. ...
3
votes
1answer
586 views

Poweroff or Reboot as normal User

To run the command poweroff or reboot one needs to be super user. Is there anyway I can run this as a normal user? I just don't want to sudo and enter my password every time I reboot or power off.
0
votes
2answers
682 views

Ubuntu : unable to copy file to dir created under same credentials

I am Windows 7 remoting to Ubuntu 12.04.2 LTS I am new to Ubuntu ( and *nix in general ) and need to understand how permissions are assigned to newly created dirs. Via Putty ssh session : $bash ...
0
votes
2answers
61 views

Have rights during shell but not in a script (unless I sudo it)

I have a really basic confusion. How does sudo work? I noticed that when I ran a script it failed, since it tried to write a file in a directory that the following permissions: $ ls -l thedir ...
3
votes
5answers
483 views

Protect folder from sudoers

Is there an ability to not allow sudoers view your folder (only you and root can access folder)?
1
vote
1answer
398 views

Can't edit /proc/sys/net/core/wmem_max [duplicate]

Recently my wireless network has being stopping to transfer data from some irregular time intervals that vary from 30 seconds to 20 minutes, and every time I need to plug off and then on the wireless ...
3
votes
2answers
2k views

Allow a specific user or group root access without password to /bin/date

As the title would suggest, I'd like to give a user or group full root access to the /bin/date command, including any manner of arguments as defined in the man pages. I understand /etc/sudoers ...
0
votes
2answers
155 views

Files created by 'make' aren't getting executable permissions by default

I'm trying to build a project, and when I use the command make, I get the following errors: /bin/sh: line 4: .deps/ipset_bitmap_ipmac.Tpo: Permission denied make[2]: *** [ipset_bitmap_ipmac.lo] Error ...
3
votes
1answer
207 views

Redirecting output in the shell, permissions

I have a question about permissions. Distro: Debian GNU/Linux 6.0.4 (squeeze) So I have a folder with a php script in it. Both folder and file are owned by User1 If I do this: php script.php I ...
1
vote
2answers
120 views

run a command as different user with available sudo permissions

I want to run the below command echo 1000 > /sys/class/backlight/intel_backlight/brightness i cannot do it it like below beecause bash is the process that actually directs output to the ...
1
vote
0answers
134 views

External HDD read/write permission changing from a cron job

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
0
votes
1answer
264 views

Execute John the Ripper on multiple processors using mpirun

I am a linux noob trying to optimize John the Ripper for a security class. I am trying to use both processors to run John by using the mpirun program as suggested in this tutorial. I installed mpirun, ...
0
votes
0answers
49 views

Root user can't do everything? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don’t have write permission on I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint. If I go to /opt and do ...
1
vote
2answers
2k views

How to allow www-data to create a folder without giving read access to the parent folder

I'm not exactly sure the right question to ask, so I'll try to explain what I'm trying to do. I have an internal web application (in PHP) that I want to be able to create a folder. The trouble is ...
1
vote
1answer
844 views

add members of wheel group, sudo access

On Fedora15, following this wiki, I added a user to wheel group, which is already in the sudoer config file. but still I get not-a-sudoer error prompt. Should I specifically name every member of a ...
0
votes
2answers
270 views

sudo: script launched from another script won't redirect standard output

I'm using AIX 5.3 with sudo 1.6.9p23. Sudoers file grants user fcomartin permission to run any command as user oas: fcomarti ALL=(oas) ALL User oas has a bash script called menu, which launches ...
7
votes
2answers
7k views

How do I find out if I am sudoer?

How does Linux system behave when I am not sudoer? Here is what happens if I try to use sudo: server:/tmp>$ sudo cal [sudo] password for user: Sorry, try again. Is it possible that I just don't ...
4
votes
1answer
181 views

Emptying a directory owned by another user weekly

I have a temp directory set up where users can place whatever files they need to send to other users via HTTP. The owner of this directory is an SFTP user, and cannot run cron jobs. I have one shell ...
1
vote
3answers
2k views

Root permission - username ALL=(ALL) ALL does not work

I'm a beginner. I'm trying to give my user root permissions, so I edited the sudoers file like this: black ALL=(ALL) ALL "black" is my username. But I still don't have root permissions, and ...
1
vote
1answer
1k views

exclude commands from user's sudo permissions

Consider the following line in a /etc/sudoers file: username ALL=(ALL) ALL, !/usr/bin/passwd as far as I know, this allows user username to use sudo, unless he not uses /usr/bin/passwd. But ...
1
vote
2answers
1k views

How to configure sudoers to allow running sudo command under other group and user name?

How to configure sudoers to prevent having the Sorry, user ****** is not allowed to execute error message. Background For the purpose of testing how a python script under a less privileged user and ...
1
vote
2answers
717 views

permission reporting on sudoers

I'm looking for a good, consistent and easy way to do a report of sudoers permissions for every user and group on the system. For users, I want the report to include permissions granted via group ...
5
votes
2answers
5k views

tail program output to file in Linux

I know we can use below format to redirect the screen output to a file: $ your_program > /tmp/output.txt However when I used below command, it says "-bash: /home/user/errors.txt: Permission ...
2
votes
3answers
6k views

Run sudo as another non-root user and save in this user's home directory

I added a new group: ircuser and a new user: ircuser In visudo I placed this line: myuser localhost=(ircuser) NOPASSWD: /usr/bin/irssi Created ircuser directory, where config files, caches, etc ...
1
vote
3answers
2k views

permission denied when redirecting sudo sed output [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I'm trying to install drupal according to the instructions given in this tutorial: ...