I was following a guide to stop Ubuntu from always asking the root password. And apparently i messed something up in vsudo edit or something like that i was in... So now when i put in a sudo command i get this...
Quote:
>>> /etc/sudoers: syntax error near line 18 <<< sudo: parse error in /etc/sudoers near line 18 sudo: no valid sudoers sources found, quitting
is there a way to edit which commands require a sudo? or some programs, like the CPU frequency monitor on panel, requires a password to change. where would i start if i want to change this?
I am a Mac/ Windows user, forced to use Linux for my college work. I do not know where to enter commands like $ sudo /usr/etc/eth0 mvntz -do4i or how to make them work
I had a problem - the Wi-fi card in my laptop was not working. All the forums were useless. They wanted me to READ about wireless networking !
Finally a good friend solved the problem in a simple way : it appears Ubuntu has not installed the drivers for my Broadcom wireless card since it was not open source. I had to download it myself. Here is how : Go to System menu on the top bar. Choose administration/ hardware devices. Tell it to activate the device. It will download the drivers through the cable attached to DSL modem and install.
Then clicked the network icon, selected edit connections, and entered my wireless network name and password. This solved all problems.
Why doesn't Linux give me a warning that the driver for something is not yet installed ? When I was struggling with the network setup wizard for the whole day, there was no clue about the missing driver.
Having a problem with sudo. I'm down as a user who can run all commands as root provided I enter my password. The relevant line from my /etc/sudoers file :
Code:
user1 ALL=(ALL) ALL
There are several commands that I run quite frequently such as mount and fdisk but would like to avoid having to enter a password each time I use them. What would be the appropriate change to the sudoers file ?
UPDATE: I neglected to scroll down to the bottom of the /etc/sudoers file where there was the line :
Code:
%admin ALL=(ALL) ALL
and since user1 was a member of the admin group any predeeding lines were being overidden by this. Commenting out this line and adding
trying to devise a new sudoers configuration while building a new SOE and would like to force everyone (including system administrators) to use rootsh in favour of doing things like sudo -s, sudo bash, sudo tcsh and so forth. Effectively, use sudo to use any shell other than rootsh. Is there a way to allow users to run anything they want except shells. I realise this is a default permit which inherently is defective, but I'm not convinced that going through the 1559 executable commands of my (as yet incomplete) built system to decided on the likely 1000+ commands I would want to be genuinely allowed. As I said this is for system administrators first, and I'd like to forcibly instil the habit of sudo <command> or using rootsh to get an audited shell. But I know people are already not doing enough sudo <command> as it stands, rather they switch to bash.
Customer asked me to create a menu for linux he also asked me to do this: Open like a command like where a user can execute commands...so for this the users have sudo enabled. The code below works OK. But it has an issue when a command is executed but the command does not need sudo
Like for instance Code: cd / sudo: cd: command not found
How can I allow a user to execute all commands when a command does not need sudo Code: echo -e "Press Control+C to finish" #echo -e " " while true; do read whichcmd?"Insert Command: " sudo $whichcmd done
I am learning linux commands. I just wanted to see what happens when I type
Code:
The screen became blank. Keyboard was not responding. I couldn't do a proper shutdown. I switched off computer by pulling out the plug. When I restarted, I heard a series of beeps (approximately 10 beeps). Then I was dropped to the grub prompt. The problem now is I can not type anything into the grub prompt, because the character 'c' is continously printed across the screen like this:
Code:
I couldn't stop the character 'c' from printing (I tried pressing Esc, Ctrl+C)
The solution is easy. I can reinstall grub from a livecd. Or even reinstalling the entire operating system wouldn't take more than 30 minutes. But I want to know:
1) What exactly happened to grub? What stage does this error belong to (1, 1.5 or 2)? What is the error number?
I did some digging on the sudo command and I do know the config file is /etc/sudoers Read the manual for sudoers and found out that I must use visudo to edit the file I read some of the examples at the bottom of the file and tried entering my own account in following the example. one of the commands I was trying to allow my account to perform without root login is the mount command So I tried adding this in (kreid8 /bin/mount ALL) I then saved & exited the file and logged out of root and tried sudo mount -t vfat /dev/sdc1 /media. I got an error saying I had to be root in order to do that But when I use the visudo -l option it shows that I have that privellege. Did I edit the file incorrectly?
I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords
Code:
pass () { cd $DIR/"$dt1"_"$dt" /usr/bin/perl << 'EOF' use strict;
[code]....
I want the same function to be used , when it expects for sudo passwords for any of the below lines:
Code:
[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.
since a recent upgrade to Mandriva 2010.1 I am not able to 'sudo' as administrator or when I use the 'root' password. I am the only user on this machine (Dell Inspiron 530S multi-booted with Window's Vista Home Premium, Ubuntu 10.4, and Mandriva 2010.1). I can get into the 'Manage Users' section of the control center by authenticating as 'root' but I can't access 'sudoers file' from command line.
I was trying to navigate by terminal and tried to change directories by typing- cd ./documents and terminal states no such directory. I can only navigate folders that I created with mkdir. Do I need to set permissions somewhere? Yes documents does exist in my home folder and I tried to open others with no luck.
i am using ubuntu 9.10 .i recently installed vmware server in ubuntu. since during installation of vmware i gave default values the default username for vmware server is root. inorder to access vmware server i changed the root password in terminal. i gave the following command in terminalsudo password rootit prompted for new password and i entered the password. after that i accessed the vmware server using the username as root and password. it worked fine,i created a virtual machine and it worked fine.now the problem is when i restarted the system and login to vmware server i was unable to access virtual machines created previously. also now i am not able to use sudo command .the following message shows up. sudo: must be setuid root. may be this prob is due to the command i gave sudo password root. can someone help me resolve this prob and go back to my previous state.before when i used to give a sudo command it asked for my account password.
I am attempting to fix a non-production server for a friend of mine. His initial complaint was that he wasn't able to use su or sudo anymore. Upon researching I noticed that he set the owner/group of his entire server to his personal user vs root and what not. I have attempted to run rpm -setguids -a and rpm -setperms -a and it doesn't appear to do anything except to yell at me that i don't have permisions to change the file permissions to root. I am going to be heading over there later tonight and i'm going to try logging in locally as root and then run the rpm -setguids -a. If this doesn't work, is there any other way I can recover the Centos 5.5 permissions back to default? Alternately, is there a way I can reinstall CentOS w/o losing the stuff he has in his /home folder. It is all 1 partition so I was unsure if it would just overwrite what is needed or if it will overwrite everything.
I have debian lenny, when I run an application is slow to load (example: iceweacel open and it takes, I can hold him iceweacel work normally), I tried to change from gnome to another and the same thing, went down some services (samba, squid) and nothing. I open a terminal and it takes, I want to duplicate it and do it fast. From a terminal without X (tty1) with root run mc and moves quickly, also run as root "sudo mc" and takes to boot.Any action done with sudo it takes to run.
Can not be what it takes to make starting the applications, not the PC because it is new, and from one moment to another I began to pass this
The sudoers file is fine, in the log's nothing unusual, since other PC take long to enter samba.
Unable to lock directory /var/cache/apt/archives/ Whenever I use sudo apt-get to install my apps in the terminal this pops up when its almost done downloading.
I'm running rhel6 64bit. Accidentally I ran % chmod -R 777 /etc and after that I have a problem to do 'su' or 'sudo'. When I did sudo it complained that /etc/sudoers has 777 while it should be 0440. I changed that and also restored right permission for:
Anyway it failed to 'su'. Then I restored back permissions on files in /etc/security and /etc/sysconfig. Still can't do 'su'. Note: I could login from console as root but can't 'su' or 'sudo'. when I do 'su' it gives error: Password: su: incorrect password
I installed Fedora 12 in my PC and after that when I tried to use minicom it was not installed. I tried copying the executable of minicom in /usr/bin from another PC and tried using it. But, I was not able to enter any commands in minicom..
Whenever I try to use the sudo command in the terminal I get the message unable to resolve host, then my computer name. Here's some command line output with some files which I think may be causing the problem. I have Operating Systems homework and need sudo
I made a Desktop User account. When I went on that account, it allowed me to execute sudo as if I was an administrator. I don't know what might be causing this. I do have ufw set up and blocking incoming connections. Do you guys know what might be at the root of this?Also, when I used sudo from the user account (which I shouldn't have been able to do), I provided the password for my admin account.
Accidently ran rm -rf while the pwd was /home/user-name
Now I'm unable to run any command whatsoever as root, ls,vi,cnf whatever, they don't work.
However the commands work as normal user.
I can guess that the files with root ownership in the home folder were deleted but I would like to revert everything back to normal and would like to know how to solve this problem.
I broke sudo when I wrongly edited a file in /etc/sudoers.d in vi(did not use visudo :-().I read that I could fix the same by rebooting into the 'Recovery Mode' by selecting the same from the grub menu.
However I'd earlier disabled the showing of the grub menu by editing /etc/default/grub. As a result I can't seem to go into recovery mode to fix my broken sudo.