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
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.
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.
Hi
I never use sudo (except for using osc and it’s only for /usr/bin/build via sudoers file) and only su -
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 …
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.