|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
After
$ su you can do:Code:
export PS1='# '
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Quote:
It seems odd to me that when I login, I'm greeted with Code:
foo$ Code:
foo# |
|
||||
Quote:
https://github.com/openbsd/src/blob/.../ksh.kshrc#L33 Any changes to that file will be lost if the base file set is upgraded.
__________________
Are you infected with Wetiko? Last edited by Head_on_a_Stick; 29th October 2020 at 09:00 AM. Reason: s|ksh/kshrc|ksh.kshrc|' |
|
|||
From ksh(1)
Quote:
Code:
PS1="\u@\h[\w]" export PS1 Code:
root@alix[~]cd /var/log root@alix[/var/log] $ su root ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
~/.profile executes once per logon, the value of $ENV executes every time ksh starts.
Add this line into ~/.xsession and ~/.profile Code:
export ENV=$HOME/.kshrc Code:
currentUserName=$(whoami) if [ $currentUserName == 'root' ]; then PS1='# ' else PS1='$ ' fi |
|
|||
Hi PingPing,
Just a question -- not necessarily to answer here, but to think about. Why are you using su to run commands as root? The recommended way to execute commands requiring root permission is to use $ doas . You run this command as a regular user, using your own password. doas(1) - DESCRIPTION Quote:
OpenBSD - FAQ - System management - Executing Commands as Another User (emphasis mine): Quote:
$ doas <command> . Type your user password at the prompt and the command will execute as root. All other commands will be run with regular-user privileges.
|
|
||||
@J65nko
As explained below, I'm trying to keep my keystrokes down to a minimum so 'su root' is a bridge too far for me. @sabrina Thanks. That gives me what I'm looking for. @gustaf Yes, I do use 'doas'. However, when I'm doing admin work that requires repeated 'doas', it gets tedious. Otherwise, I do use 'doas'. |
Thread Tools | |
Display Modes | |
|
|