General :: Aliases Work After Running Sudo SU Command?

May 7, 2010

I can make aliases fine by editing the .bashrc file in my home directory, but the first thing I do when I open a terminal window is sudo su so I don't have to type sudo in front of every command. The problem is, I am then not able to use my aliases. How can I make aliases that work after I run the sudo su command?

View 2 Replies


ADVERTISEMENT

General :: VI Command Mode - Aliases Only Work In RHEL4

Jul 1, 2009

When in command mode one can come out of the file temporarily by Code: :sh in command mode. When I find myself on the shell on RH 9 the aliases dont work but in RHEL 4 all aliases work like charm. Does anyone know why is it so?

View 4 Replies View Related

General :: Specify Password For Sudo Command When Running Bg Process?

Jun 23, 2010

I'd like to start a background job using the sudo command and route its output to a file. This presents a problem because the prompt for the password doesn't work properly. It looks something like this when I try it:

Code:
Mac:server user$ sudo php crossdomain_server.php > data/crosscomain_output.txt &
[3] 30303
Mac:server user$ Password:
[3]+ Stopped sudo php crossdomain_server.php > data/crosscomain_output.txt
Mac:server user$

Basically I'm not properly prompted for the password and as soon as I type anything in my background job fails because it didn't receive the password. Is there any way to execute a sudo command by supplying the password on the same line as the command?

View 9 Replies View Related

General :: Sudo Command Doesn't Work

Oct 17, 2010

I want to install some software using sudo apt-get command,but it dosen't work.(my network works well) how to handle it? below is the output of terminal:

@ubuntu:~/Downloads$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4
Reading package lists... Done
Building dependency tree

[Code].....

View 4 Replies View Related

General :: Running This Command, And Seems Not To Work?

Jun 3, 2011

I'm running this command, and seems not to work, following the command:Quote:for nic in `ls /sys/class/net | grep -v lo`; do echo ${nic}; udevinfo -a -p /class/net/{nic} | grep -i address; doneThe output is the following:Quote:eth0eth1But the output should show something like this: (showing the MAC address)uote:

View 6 Replies View Related

General :: Sudo Cd /root Gives Sudo - Cd - Command Not Found

Jan 6, 2011

Kernel 2.6.21.5, Slackware 12.0

Code:

Code:

On the other hand

Code:

So, I do not understand why the notification "sudo: cd: command not found", considering cd is a bash built-in command.

View 3 Replies View Related

Ubuntu :: Su Command Won't Work, But Sudo Will?

Oct 16, 2010

I was attempting to install the fglrx driver on my new ubuntu insallation, following a guide I found from google. At one point it says I need to login as super user, so I tried and no matter how many times I try it just keeps saying authentication failed. I even tried typing in my password with 1 finger, multiple times, every single time, authentication failed. So I decided to try the sudo command with fdisk -l, worked flawlessly. Tried the su command again, authentication failed, I have no idea what in heck is causing this but it just won't stop happening.

View 1 Replies View Related

Ubuntu :: Sudo Command Doesn't Work Anymore - No Valid Sudoers Sources Found

Jan 21, 2011

I was changing some file permissions with the chmod 777 command and i accidentally executed:

Code:

sudo chmod 777 /*/*/*/*

and now i can't get root access to anything. If I try executing a sudo command i get:

sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers sources found, quitting

View 9 Replies View Related

Slackware :: Getting Aliases To Work As Root?

Aug 22, 2010

How can I get aliases working as root? Here is my Slackware 13.1's /etc/profile file followed by my *Slackware 11's* /etc/profile file [as a comparison]. My Slackware 11's root aliases work in addition to my username ones *without* needing a separate .bashrc in my home dir. In S13.1 I have created a .bashrc for my username and it works fine, but I want those same aliases operating when I'm root, and cannot for the life of me figure how to achieve it.

S13.1 /etc/profile:
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"
# If the user doesn't have a .inputrc, use the one in /etc.....

View 15 Replies View Related

Software :: Aliases - Using /etc/aliases - Does Not Get Routed To My Email

Apr 1, 2009

I am able to send a mail message to myself from a server without any problem...

But after I have updated /etc/aliases and added the line for all of root's mail to be routed to me....

Added:
root: myemail@company.com

and ran newaliases to implement it....

If I send a mail message to root, it does not get routed to my email...

View 3 Replies View Related

Fedora :: Defined Aliases In File Not Working - No Command Found

Apr 15, 2011

Defining tcsh aliases through a .aliases file has worked perfectly for me for years and years using cygwin and older versions of mandriva. I am encountering very annoying and mysterious problems when attempting to do the same thing with a .aliases file in a fedora 64-bit VM. Strangely, if I define aliases in the file, they won't work, but if I do so on the command line, then they will.

Here's a simple example: Suppose I define an alias for "ls" in the file:
alias ls '/bin/ls'
Then source the file. This happens:
me: ls : Command not found.
me: alias ls
/bin/ls
me: /bin/ls
file1 file2 file3 etc.
me: unalias ls
me: ls
file1 file2 file3 etc.
me: alias ls '/bin/ls'
me: ls
file1 file2 file3 etc.

A second example: if I place either of these lines in my .aliases file:
alias d '/bin/ls -alF !:1'
alias d '/bin/ls -alF !*'and source the alias file, this happens:/ me: d
Bad ! arg selector. However, if I define the alias on the command line:
/ me: alias d '/bin/ls -alF !*'then the alias behaves correctly:/ me: dtotal 376
drwxr-xr-x. 10 r r 4096 Apr 14 16:05 ./
drwxrwxr-x. 6 r r 4096 Feb 21 16:15 ../
drwxr-xr-x. 3 r r 4096 Apr 14 16:05 bin.v2/
-rwxr-xr-x. 1 r r 193872 Apr 14 15:35 bjam*
-rw-r--r--. 1 r r 52804 Apr 14 17:20 bjam.my.log
drwxr-xr-x. 77 r r 4096 Nov 17 09:49 boost/
-rw-r--r--. 1 r r 989 Nov 17 04:51 boost.css

View 2 Replies View Related

General :: How To Alias A Command For Sudo

Sep 25, 2010

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?

View 1 Replies View Related

General :: Execute A Command After Sudo?

May 4, 2011

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?

View 3 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

General :: Write A Script To Sudo The Last Command?

Feb 19, 2011

for some commands such as apt-get install xxx, I forget to add sudo first, then I need to retype it. What I want is in such cases, I just type a simple command, for example resudo. It will sudo my last command sudo apt-get install xxx. Is it possible in bash?

View 1 Replies View Related

General :: Run Ubuntu Command Sudo Apt-get In Mandriva?

Sep 12, 2011

How i can run the following command (for Ubuntu) in Mandriva 2005 ? What is the similar command ?

sudo apt-get install python-wxgtk2.8 pyro mercurial build-essential bison flex mercurial python-numpy

View 1 Replies View Related

General :: Execute Root Command Without Sudo?

Jan 24, 2010

On my ubuntu I have a command pm-suspend, which puts the computer to sleep. It has to be run with sudo. Since it is inconvenient to be forced to type the password every time I want my computer to sleep, I thought maybe there's a way around it. Naively I thought that if I'd create a script as root, that invokes pm-suspend, and then let anyone execute that script, I could run that script as my own user and then that script would be considered run by root and hence be allowed to run pm-suspend. Obviously that didn't work. The root-check procedure in pm-suspend still found out that the original executor was someone different from root.

Still I think something similar (although slightly more elaborate) should work.I'm thinking about the process that allows the user to mount hard drives for example. Normally root is required, but it is somehow bypassed by the gnome utility mounting.

View 8 Replies View Related

General :: Sudo Versus SU - SAX2 Command?

Jun 3, 2010

I've been using SuSE for a while and something has been bugging me. Not a show stopper, but nevertheless, an interesting one. Most tutorials, forum posts, etc. recommend using a sudo command to accomplish stuff. For example:

Code:
sudo make install
sudo vi file

However, this does not always work. For instance, I was recently working on a resolution problem with my ViewSonic VX922 - it would only display at 1024x768 rather than the native 1280x1024. Viewing some posts, I found the command "sudo sax2 -r". What I discovered is that there seems to be a big difference between sudo and su

Code:
drkhelmt@SPACEBALL1:">sudo sax2
root's password:
sudo: sax2: command not found
drkhelmt@SPACEBALL1:">su
Password:
SPACEBALL1:/home/drkhelmt: #sax2
SaX: Checking update status for intel driver
SaX: initialization already done
SaX: cal [ sax2 -r ] if your system has been changed !
SaX: startup
SaX: X server:0.0-> grant
SaX: importing current configuration
SPACEBALL1:/home/drkhelmt: #

So the question, why does the command sax2 (and others) work when after the su command rather than a sudo?

View 5 Replies View Related

General :: Usage Of Sudo Command In Ubuntu And Red Hat?

Apr 18, 2010

In Red Hat, suppose if root user wishes to give a privilege to run the fdisk command to a user named sam.And he makes appropriate configuration changes in /etc/sudoers file. Now when sam wishes to run the fdisk command, then he has to issue:

Code:
[sam@system43~]$sudo /sbin/fdisk -l
Password: But in ubuntu, after the same configuration being done, what sam needs to do is:
Code:
[sam@somesystem43~]$sudo fdisk -l
Password: ***

That means, in ubuntu the user need not type the full path of the command. I wish to know how can I make red hat system work like ubuntu as far as the sudo usage is concerned.

View 3 Replies View Related

General :: Automate Sudo Su - User Command From A Script?

Feb 9, 2011

i want to automate sudo su - user command from a script...it will then ask for a password...how do i automate this?

View 3 Replies View Related

General :: Sudo For A Single Command With No Password Entry

Apr 20, 2010

I wish to allow a user to use sudo to run a single command (service app status) to determine if my application app is running, in my sudoers file i have: user ALL= /sbin/service app status I understand that there is a parameter called timestamp_timeout that will set the timeout for the 'user', but requires at least 1 entry of the root password.

I wish to allow the user to do "sudo service app status" and not have to enter the root password ever(maybe once is ok), but still make the user enter the root password for all other root activities. Is there a way to prevent the password entry for this command only and no others?

View 3 Replies View Related

General :: Trying Sudo MV Command On File - Permission Denied

Jul 17, 2010

If I try the sudo mv command on the file listed below I get the error listed. I am confused. It is my file & I have permissions. Somehow a slew of files on my system are now showing this way. This seems to correspond when I ran rsync from my netbook to sync it up with my desktop where I am having a problem.

Potential Source ->
sudo rsync -av --delete --rsh=ssh joe@192.168.1.4:/media/Abyss/Memories/ /home/joe/Pictures/

Type of issue ->
mv: cannot remove `100_2259.jpg': Permission denied

joe@Tux-Box:/media/Abyss/Memories/2009/3-09$ stat 100_2259.jpg
File: `100_2259.jpg'
Size: 243012 Blocks: 480 IO Block: 4096 regular file
Device: 811h/2065dInode: 1312030 Links: 1
Access: (0777/-rwxrwxrwx) Uid: (1000/joe) Gid: (1000/joe)
Access: 2010-07-17 11:41:26.708020712 -0400
Modify: 2009-12-13 21:49:59.501938000 -0500
Change: 2009-12-24 05:54:02.854309200 -0500

View 7 Replies View Related

General :: Sudo Aptitude Update Command Not Found?

May 7, 2011

trying to get wine working was reading the tutorial-

"Complete Guide to Using Wine from the Command Line (Ubuntu)" first thing it said to do for ubuntu user's was this-

"Before I continue with my rant about gaming on Linux I would like to point out right now that the very first thing you should do when you install your ubuntu set up is to run the following:

Code:
user@ubuntu$ sudo aptitude update
user@ubuntu$ sudo aptitude install ubuntu-restricted-extras

but when i try and run in the terminal i get "command not found".

using ubuntu 11.4 natty kernel linux 2.6.38-8 generic gnome 2.32.1

View 5 Replies View Related

Server :: Sudo - Command Can't Run By Sudo

Jun 18, 2010

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.

View 8 Replies View Related

Ubuntu Servers :: Use The Mail Command Line Program To Occasionally Send Log Output To Email Aliases?

Jan 27, 2011

Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.

View 2 Replies View Related

General :: Ubuntu / Sudo Also Doesn't Work

Jun 30, 2011

I have ubuntu server 8.x which works Ok but the other day I changed the owner of some files "the directory /etc" from root me. Now a lot commands do not work like reboot and such. So I tried to put ownership back to root and I can't. I say I dont have proper privilege. Sudo also doesn't work. I conect to the server using ssh with putty. What could I do to fix the problem? Update to the new version? This server has been working really well for a few years. The reason I changed the owner of the directory to myself is so I could edit some config files from my windows machine using a FTP client like WinSCP.

View 3 Replies View Related

General :: Sudo And Command Line - Get The Result Without Having To Supply A Password

Mar 31, 2011

I have the following commande /sbin/fuser -f -u /u/DT01/F010107 1>/tmp/null 2>/tmp/seausr.T0069 when executing as root 'su' this give me all user using the file. but when tried with 'sudo' i am asked with 'user password'. Is ther anyway to simply get the result without having to supply a password and to see all user not only me. (i have the file open also).

View 1 Replies View Related

General :: Sudo Command Occasionally Asks For Root Password?

Sep 9, 2010

In Ubuntu 10.04, I logged in as user1 and when I open a new terminal and issue any command it is asking password.user@ubun-laptop:~$ sudo ifconfig[sudo] password for user: It is asking for password only for first time.From the next command onwards it is not asking.Can some one please tell me if it is possible to issue ONLY ONE COMMAND, in which even if the password request comes, it will automatically fill the password.Just like "ps -elf | grep NetworkManager". I am expecting any combination of commands in a single line, so that password is filled automatically IF PASSWORD IS ASKED. If password is not asked, the command must be executed.

View 17 Replies View Related

General :: What Is Difference Between Power Broker Utility And Sudo Command

Aug 11, 2011

I just wanted to know the difference between Using Sudo mechanism over using Power breaker utilities.

View 4 Replies View Related

General :: Why Doesn't 'sudo Gedit' Work In Vinagre

Oct 13, 2010

I've set up a low cost box with Ubuntu Lucid Lynx at home behind a router, and managed to get remote access running. My goal is to be able to host a small website and work on it remotely, so I isntalled ftp (vsftpd). When I tried to edit the vsftpd.conf file in Vinagre from work, I could only open it read-only, no surprise. When I tried 'sudo gedit' or 'sudo gedit /etc/vsftpd.conf' from terminal in Vinagre, I received the prompt for the password to elevate privileges (again, expected); however, after I hit Enter, nothing happens. I've tried a bunch of different things, but I can't get it to work. I can stop & start my ftp service with 'sudo service vsftpd stop/start' and it seems to work fine.

View 2 Replies View Related







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