sudo blocks aliases

Vram lamsokvr at xprt.net
Fri Dec 30 02:32:08 UTC 2005


On Thu, 2005-12-29 at 18:11 -0800, James Diehl wrote:
> The Ubuntu shell is a small shell that works with Debian, not bash or
> korn.
> If you want to use the bash codes, you will have to change your shell
> to the Bourne Again shell (3.05 I believe), that uses the best
> attributes of bash and Korn, or install the larger bash or korn
> kernels.  I have tried several bash codes in terminal with the smaller
> Debian, and it didn't even recognize the codes I entering.
> Diehl, James



OK


Spoke too soon...

It looks like dash is the default shell

Closest to korn...

I can't remember when I installed last..
If dash was an option..




Sorry..

Part of man page.



NAME
     sh - command interpreter (shell)

SYNOPSIS
     sh [-aCefnuvxIimqVEb] [+aCefnuvxIimqVEb] [-o option_name]
        [+o option_name] [command_file [argument ...]]
     sh -c [-aCefnuvxIimqVEb] [+aCefnuvxIimqVEb] [-o option_name]
        [+o option_name] command_string [command_name [argument ...]]
     sh -s [-aCefnuvxIimqVEb] [+aCefnuvxIimqVEb] [-o option_name]
        [+o option_name] [argument ...]

DESCRIPTION
     sh is the standard command interpreter for the system.  The current
version of sh is in the process of being changed to conform with the
POSIX  1003.2 and 1003.2a specifications for the shell.  This version
has many      features which make it appear similar in some respects to
the Korn shell,   but it is not a Korn shell clone (see ksh(1)).  Only
features designated      by POSIX, plus a few Berkeley extensions, are
being incorporated into      this shell.  We expect POSIX conformance by
the time 4.4 BSD is released.      This man page is not intended to be a
tutorial or a complete specification of the shell.












Vram









> 
> Vram <lamsokvr at xprt.net> wrote:
>         On Fri, 2005-12-30 at 02:28 +0100, Leo Cacciari wrote:
>         > Il giorno gio, 29/12/2005 alle 13.35 -0500, alex ha scritto:
>         > > For several years, I've been using aliases like the
>         following in all
>         > > the linuxes that I've used.
>         > > 
>         > > alias xpa+='mount -t vfat /dev/hda1 /mnt/da1; cd /mnt/da1;
>         ls -aF'
>         > > --color=auto'
>         > > alias xpa-='cd; umount -l /mnt/da1'
>         > > 
>         > > These two and several others are stored in /root/.bashrc.
>         > > 
>         > > I'm having a problem with these aliases in ubuntu because
>         of 
>         > > sudo...I can't execute them from /root/.bashrc with or
>         without sudo.
>         > > 
>         > > In other Linuxes, all I have to do is type ... xpa+ or
>         xpa- and I have
>         > > access to Windows or in similar fashion, can access other
>         Linuxes.
>         > > For example, I have three ubuntus installed and can cross
>         access them
>         > > except from one of them. (Two of the ubuntus have sudo
>         disabled)
>         > 
>         > Well, there are two solutions I can see. First, you could
>         simply ignore
>         > the sudo thing and use your commands after becoming root
>         using 'su'.
>         > Another one is to add your aliases to the adminstrative user
>         aliases
>         > (/home/whatever/.bash_aliases). If you do this, however, you
>         must change
>         > your aliases by adding 'sudo' in front of them. Beware that
>         for multiple
>         > commands (such as the above examples) you must either add
>         sudo in front
>         > of each command, or execute them all in a subshell: 
>         > 
>         > alias xpa+='sudo sh -c "mount -t vfat /dev/hda1 /mnt/da1;\
>         > cd /mnt/da1; ls -aF'"
>         
>         quotes are backwards ^^^^^
>         
>         
>         I think
>         
>         Vram
>         
>         
>         > 
>         > Hope that helps
>         > 
>         > 
>         
>         
>         -- 
>         ubuntu-users mailing list
>         ubuntu-users at lists.ubuntu.com
>         http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 
> 
> 
> 





More information about the ubuntu-users mailing list