Ubuntu :: Unable To Use Sudo And Su - Commands
May 23, 2011
I am unable to use sudo and su - commands. check my output below:
Code:
ubuntu@user1:~$ su -
Segmentation fault
ubuntu@user1:~$ sudo visudo
bash: /usr/bin/sudo: Permission denied
[code].....
View 9 Replies
ADVERTISEMENT
Mar 20, 2010
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
so i cant even get back to undo what i edited.
View 8 Replies
View Related
Aug 2, 2010
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?
View 2 Replies
View Related
Nov 7, 2010
does anyone know how to set restrictions on the commands a user can run as sudo? i want to make it so they can only halt the system.
View 1 Replies
View Related
Aug 28, 2010
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.
View 6 Replies
View Related
Feb 16, 2010
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
Code:
user1 ALL= NOPASSWD: /bin/mount, /sbin/fdisk
View 1 Replies
View Related
Jan 10, 2011
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.
View 7 Replies
View Related
Apr 30, 2010
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
View 3 Replies
View Related
Feb 22, 2011
In order to allow me to shutdown my PC from within fluxbox without being root I ran "visudo" and added the following line:
Code:
psionl0 ALL=(ALL) NOPASSWD: ALL
A check that the line had been accepted showed all ok:
Code:
bash-4.1$ sudo -l
User psionl0 may run the following commands on this host:
(ALL) NOPASSWD: ALL
Yet when I tested it out, I got nowhere:
Code:
bash-4.1$ sudo pkgtool
sudo: pkgtool: command not found
bash-4.1$ sudo shutdown -h now
sudo: shutdown: command not found
bash-4.1$
Have I done something wrong or isn't sudo meant to be used this way?
View 12 Replies
View Related
Jul 11, 2011
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?
2) How can running "sudo kill -9 -1" affect grub?
View 5 Replies
View Related
Jan 17, 2011
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?
View 6 Replies
View Related
May 31, 2011
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.
Code:
ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"
This is my script output
Quote:
[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x
[code]....
how to automate the password prompt required for sudo commands.
View 8 Replies
View Related
Aug 16, 2010
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.
View 4 Replies
View Related
Sep 10, 2010
I was wondering is there a way to bind say "F5" to the command sudo apt-get update so I can press one key to write this into the terminal?
View 1 Replies
View Related
Jan 7, 2010
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.
View 1 Replies
View Related
Feb 24, 2010
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.
View 9 Replies
View Related
Oct 18, 2010
At the terminal prompt, I can't login using su nor sudo. I can only login as root at the dialog level. How do I correct this?
View 6 Replies
View Related
May 18, 2010
I am unable to run the several commands like:
init 0
init 6
shutdown.....etc..
The error message is "bash command not found."I am using RH9.
View 2 Replies
View Related
Mar 25, 2011
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.
View 3 Replies
View Related
Sep 1, 2010
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.
View 1 Replies
View Related
Aug 10, 2011
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.
View 3 Replies
View Related
Nov 26, 2010
When I try to launch something from terminal, it shows this error.
gksudo gedit /etc/hosts
Quote:
127.0.0.1localhost
127.0.1.1matt-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
My computer always had this name and I never had concerns related to his name. So, what's wrong now?
View 8 Replies
View Related
Sep 14, 2010
Install wireshark and added it to visudo. But wireshark refused to start in konsole
Code:
# sudo wireshark
(wireshark:7493): Gtk-WARNING **: cannot open display:
However, wireshark will start without problem when in root.
View 6 Replies
View Related
May 19, 2011
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:
-rw-r--r-- 1 root root 1966 May 19 13:41 /etc/passwd
-r-------- 1 root root 1161 May 19 13:42 /etc/shadow
-r--r----- 1 root root 3746 Apr 23 01:38 /etc/sudoers
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
View 2 Replies
View Related
Nov 3, 2010
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..
View 1 Replies
View Related
May 21, 2010
I am having a problem with Ubuntu 10.04. I was setting up network sharing with Samba. Set up went fine, then I decided to change the hostname.
Following instructions I found on the web, I edited etc/samba/samba.conf to reflect my desired hostname.
Now I have to use superuser to run synaptic or update center. I don't know what else I have "broken".
I would like to change my hostname, if I did it incorrectly for 10.04 please enlighten me.
View 2 Replies
View Related
Nov 4, 2010
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
steve@steve-laptop:~$ sudo gedit /etc/resolv.conf
sudo: unable to resolve host steve-laptop
steve@steve-laptop:~$ cat /etc/resolv.conf
# Generated by NetworkManager
domain domain_not_set.invalid
search domain_not_set.invalid
nameserver 68.237.161.12
[Code].....
View 1 Replies
View Related
Dec 19, 2010
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.
View 9 Replies
View Related
Jun 13, 2010
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.
View 5 Replies
View Related
May 5, 2011
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.
View 1 Replies
View Related