why superuser shell in russian and italian?

on my desktop running KDE my su konsole shell respond in italian and russian at the same time, how can I have only Italian?

procuste@server3TW:~> su
Password: 
server3TW:/home/procuste # fdisk -l
Диск /dev/sda: 256.2 GiB, 275064201216 байт, 537234768 секторов
Disk model: Crucial_CT275MX3
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 512 байт
Размер I/O (минимальный/оптимальный): 512 байт / 512 байт
Тип метки диска: gpt
Идентификатор диска: 4A657D0B-9084-478A-A73A-9CC754DF7419

Dispositivo    начало      Fine   Settori Размер Tipo
/dev/sda1        2048    321535    319488   156M BIOS boot
/dev/sda2      321536   4530175   4208640     2G Файловая система Linux
/dev/sda3     4530176  88422399  83892224    40G Файловая система Linux
/dev/sda4   171900928 537233407 365332480 174.2G Файловая система Linux
/dev/sda5    88422400 171900927  83478528  39.8G Файловая система Linux

Элементы таблицы разделов упорядочены не так, как на диске.


Диск /dev/sdb: 3.7 TiB, 4000787030016 байт, 7814037168 секторов
Disk model: ST4000VN000-1H41
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт
Тип метки диска: gpt
Идентификатор диска: F5651539-2BD6-4CB6-802E-7481175FF985
 

And your locale settings in this terminal are … (output of “locale”)?

Please, at least use

su -

instead of plain su.

locale

procuste@server3TW:~> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_DK.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
procuste@server3TW:~> 


su locaLE

procuste@server3TW:~> su
Password:  
**server3TW:/home/procuste #** locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_DK.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
**server3TW:/home/procuste #** 


su - locale

procuste@server3TW:~> su -
Password:  
**server3TW:~ #** locale
LANG=POSIX
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
**server3TW:~ #** 


manythanks, with su - it result better, but what have I tu change to have the result in italian with plain su??

**server3TW:~ #** fdisk -l
**Disk /dev/sda: 256.2 GiB, 275064201216 bytes, 537234768 sectors**
Disk model: Crucial_CT275MX3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4A657D0B-9084-478A-A73A-9CC754DF7419

**Device**     **    Start** **      End** **  Sectors** **  Size** **Type**
/dev/sda1       2048    321535    319488   156M BIOS boot
/dev/sda2     321536   4530175   4208640     2G Linux filesystem
/dev/sda3    4530176  88422399  83892224    40G Linux filesystem
/dev/sda4  171900928 537233407 365332480 174.2G Linux filesystem
/dev/sda5   88422400 171900927  83478528  39.8G Linux filesystem

Partition table entries are not in disk order.


**Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors**
Disk model: ST4000VN000-1H41
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F5651539-2BD6-4CB6-802E-7481175FF985

**Device**     **Start** **       End** **   Sectors** ** Size** **Type**
/dev/sdb1   2048 7814035455 7814033408  3.7T Microsoft basic data


**Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors**
Disk model: Hitachi HDT72101
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00095e4e

**Device**     **Boot** **Start** **       End** **   Sectors** **  Size** **Id** **Type**
/dev/sdc1  *       63 1953520064 1953520002 931.5G 83 Linux


**Disk /dev/sdd: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors**
Disk model: ST4000VN000-1H41
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: CF43BA16-8331-4CCB-ABB9-C0EE3C9E54FC


You do not understand it: do not use plain su!

While su was changed, a few years ago or so, to avoid the most serious security issues when using it without -l (or - for short), it is still unwise IMHO. And your experience is proof of it.

oh yes, I didn’t understand at all:O
so you are saying me that I have not to use plain su any more, I have to use su - or su -l in future?

I am not only saying that must do that for now and the future, I am slo saying that you should not have done that in the past.

<shrug>

Regarding su vs su - (which is a shortcut for --login),
Best to just read the MAN page,
http://man7.org/linux/man-pages/man1/su.1.html

If you just want to elevate and don’t really care about paths, environment settings, etc, today I can’t see any problem using “su” without specifying “–login” but you do have to understand that you aren’t “fully” root, you’ve elevated permissions but likely still retain aspects of your ordinary non-root User…

Which is what doesn’t happen with “su --login” or “su -” for short.
By re-logging in as the User you specify using the “su” command (and root is default if you don’t specify a Username), you properly and fully reset everything about your environment, you not only are root you are root with root paths, environment settings, etc. Note this is all sandboxed only within the console and nowhere else in your system.

So,
A couple examples…
If I wanted to run an application as root with environment settings and paths to the root home folder, I’d have to use

su --login

or

su -

But if I was simply elevating to run a command like running an app in Super User mode or launching Yast,
I hardly see any reason to do more than the bare

su

If you don’t want to understand the difference between “su” and “su -” then I guess “su -” should generally be used.

As to whether this should be recommended for the problem described in this thread, IMO YMMV.
Looks to me it’s simply specifying a different set of environment variables without trying to fix any problems in one.
If the localization problem isn’t showing up elsewhere, then I supposed it’s a “good enough” fix without spending too much energy.

Just IMO and always standing to be corrected,
TSU

Hi
I never use sudo (except for using osc and it’s only for /usr/bin/build via sudoers file) and only su - :wink:

As indicated, I would suggest to err on the side of caution and do a full switch via su - using su will not change directory either, so users often wonder why permissions change in $HOME or strange files appear owned by root, or in the directory they happen to be in when just using su.

What “su --login” does, is to login to the user “root” – even better, use “/usr/bin/su --login” …

Once “/usr/bin/su --login” has been executed, a “pwd” should indicate that, you’re logged in to the Home directory of the user “root” – ‘/root’.

Edit the ‘~/.profile’ file of the user “root” – by default you’ll see:


# Most applications support several languages for their output.
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
# This overwrites the system default set in /etc/sysconfig/language
# in the variable RC_LANG.
#
#export LANG=de_DE.UTF-8        # uncomment this line for German output
#export LANG=fr_FR.UTF-8        # uncomment this line for French output
#export LANG=es_ES.UTF-8        # uncomment this line for Spanish output

Insert either “export LANG=it_IT.UTF-8” or “export LANG=it_IT.ISO-8859-1”.

  • The UTF-8 directory is here: ‘/usr/lib/locale/it_IT.utf8/’ …

Logout from the user “root” session and then, log back in again – now it should be “Et voilà !” in Italian …

Pier,

Just a side-note on “superuser shell”.

The “su” stands for substitute user. I have heard the superuser misconception before. Switching to root is just the default when a target user is not specified.

To be fair, the menu entry in KDE is “Terminal - Super User Mode”.

Yes, that icon is for running a terminal with a root login shell. It is uses su for that

su root --login

or, when man uses all defaults to minimize that command:

su -

But su itself is not restricted to change to root only.

====================

BTW, I hope that all posting here have now at least read

man su

so that all can assume the same background knowledge available to the discussion partners.