explain the difference between these two commands. I'm currently reading about changing your mac address and both of these commands show up a lot. They sound like the same thing to me. Is one better than the other, or do you need to use both to change your mac address?
Code: sudo ifconfig eth0 down sudo /etc/init.d/networking stop
I have a problem when I want to use su I get this error:Code:su: pam_start: error 26I have googled it so I found this topic (http://www.linuxquestions.org/questi...r-26-a-615024/) but it didn't really help me. There was a reply on that topic and his question was what the output of this was:
A day ago I finally got around to upgrading the PackageKit installation that had been sitting for a week and a half, so I found a new upgrade for sudo available - the one that gives the sudoreplay command, I forget which version number it is exactly. When I try to use the sudo command I get this notice in my terminal:Code:Can't open /var/db/sudo/me/1: Permission deniedI didn't get it before. What do I have to do to make it open? I'm using SELinux in enforcing mode if that helps.
What are the differences if I build (./configure, make, make install) an app when log in as root vs a "regular" user other than I have to use sudo for make install? If an app is built from a non-root account, will it be available to every other user on the system?
I have read a lot of questions from people wanting to take Debian (or some other distribution) and make its sudo command act more like the way Ubuntu's sudo does. I want to do the exact opposite, I want to make Ubuntu's sudo command act more like the sudo command from another distribution. ie I want there to be one root password
can anyone tell me the difference between "sudo shutdown now" and "sudo shutdown 0"
i know that "sudo shutdown 0" will shutdown the system in 0 seconds. but when i run sudo shutdown now my system goes into the maintenance mode?? what is maintenance mode??
I am having trouble running commands by using sudo. I configured visudo file with localuser ALL=(ALL) ALL but I can't run any command, it tells me command not found.
I am new to fedora (been using debian based distro's for the longest time). With the new release I decided to give FC13 (The kde 64 bit spin) a try. I told it to wipe my entire hdd and encrypt the partitions. The partition manager made a few LVM partitions which I assume are encrypted.
The problem I am having is that if I attempt to use an application that would normally need root access to run, I am not prompted to enter my root password. Instead, I am required to logout and log back in as root. Is there a way to make it so that FC13 will prompt me to enter in my root password so I do not need to log in and out? Or is there something Different I should have done during the install process? Also, what is the terminal equivalent of "sudo" in fedora, or is it still sudo/KDEsudo
I also have not used SE Linux before. Do I need to manually enforce the permissions for my applications and generate my own profiles for it, or is that done automatically?
What is the difference between the commands "su" and "sudo -i"?
When I do sudo -i, it asks me the password and after typing my password, I login.
But when I do "su",it asks for my password, and I type the same password as for the sudo -i, but the terminal shows su: Authentication failure Why is it so? Does these commands have different passwords? If so I've forget password for "su". Now what to do?
If I try "shutdown" as a normal user on Debian it give the "command not found" error. OK it's not in my PATH. But if I "sudo shutdown" it works. Somehow sudo seems to change my PATH.
Do the same in Slackware however and sudo makes no difference, I get "command not found" each time.
My OS is Linux Fedora 11.PC is IBM 1.8 GiB memory, Intel Duo E8500@3.1GHz.The modem I want to install is a USB stick from 'Cell C' the service provider.The code I got from the internet is for Ubuntu. I am new to Linux. When I type the code in at the Terminal, it tells me that Fdeb (my user login name) is not in the sudo file. How do i get my name in the sudo file?
As user lukas, who is listed in 'sudoers' with the same rights as root (ie ALL=(ALL))
I can't cd 'into' dir /var/spool/cron:
As root i can cd into it no problem. As lukas, i get permission denied, and if I try 'sudo cd cron' I get an error saying command 'cd' is not recognised.
I have an old server running RHEL 5.5 and I normally just type sudo nothing else and I'm instantly root. I copied my sudoers file from here to a new server but it seems not to work cause I type sudo and it ask for usage. Is something else besides the sudoers file that prevents me from logging in with sudo only.
If I have the below sudoers entryusera ALL=(userb) NOPASSWD: /home/userc/bin/executable-fileusera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-fileWhen I log-on as usera and try running the below commands, it workssudo -u userb /home/userc/bin/executable-filebut NOT the one below.sudo -u userb /home/userc/bin/link-to-another-executable-fileSorry, user usera is not allowed to execute '/home/userc/bin/link-to-another-executable-file' as userb on hostname.
I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this:
alias rm=trash This works fine as a normal user, and it works fine when I use sudo -i to get a root shell prompt, but if I use sudo rm, the alias does not apply. So where do I need to put my alias so that it works in one-off sudo commands?
This is on my host machine. I'm the only one using it so it's fairly safe, but I have a very complex password that is hard to type over and over. I use the console for moving files around and executing arbitrary commands a LOT, and I switch terminals, so sudo remembering for the console isn't enough (AND I still have to type in my terrible password at least once!) In the past I have used the NOPASSWD trick in sudoers but I've decided to be more secure. Is there any sort of compromise besides allowing no password access to certain apps? (which can still be insecure) Something that will stop malware and remote logins from sudo rm -rf /-ing me, but in my terminals I can type happily away? Can I have this per terminal, perhaps, so just random commands won't make it through? I've tried running the terminal emulations as sudo, but that puts me as root.
Sometimes I type 'sudo su - user' in linux and then realise I'm typing it from an application account rather than a user account. I want to ctrl+c to abort the password entry. When I do this, it always freezes for a couple of seconds before it aborts the process and returns me to the shell.
I am working in a CentOS environment with numerous CentOS machines. Currently there are multiple developers that each have their own login/home directory and then for various admin tasks we all share a single super user account.
The problem
I have a number of aliases, variables, functions, and settings that exist in my personal login's .bash_profile. None of these are available in the shared super user's .bash_profile. My current work around is that everytime I sudo in as the super user and I re-execute my .bash_profile from my personal user's home directory. I am not allowed to edit the init stuff for the super user
The Question
Is there any way I can automate my sudo sequence such that it will execute my personal .bash_profile after I've executed sudo without requiring me to edit the super user's bash init stuff?
In short: how to make sudo not to flush PATH everytime?
I have some websites deployed on my server (Debian testing) written with Ruby on Rails. I use Mongrel+Nginx to host them, but there is one problem that comes when I need to restart Mongrel (e.g. after making some changes).
All sites are checked in VCS (git, but it is not important) and have owner and group set to my user, whereas Mongrel runs under the, huh, mongrel user that is severely restricted in it's rights. So Mongrel must be started under root (it can automatically change UID) or mongrel.
To manage mongrel I use mongrel_cluster gem because it allows starting or stopping any amount of Mongrel servers with just one command. But it needs the directory /var/lib/gems/1.8/bin to be in PATH: this is not enough to start it with absolute path.
Modifying PATH in root .bashrc changed nothing, tweaking sudo's env_reset and env_keep didn't either.
So the question: how to add a directory to PATH or keep user's PATH in sudo?
I thought ubuntu was the only distro that requires the 'sudo' command. I could have sworn I just read that OpenSUSE does, too. So who all *requres* it?