The officially official Devuan Forum!

You are not logged in.

#126 Re: Other Issues » [SOLVED] Sharing files between users with stickybit and setgid » 2022-04-19 11:00:25

Thanks HOAS, I don't understand I beleive my commands cover whats in that link..

btw Marie & John are both in the tester group

cat /etc/group | grep tester
tester:x:1001:John,marie

and the file created by John has it GID as tester

getfacl /home/tester/by_john.txt

# file: home/tester/by_John.txt
# owner: John
# group: tester
user::rw-
group::r-x			#effective:r--
group:tester:rwx		#effective:rw-
mask::rw-
other::---

and we can see --> group:tester:rwx
So why marie that part of tester can't delete/modify it ?

Additionnaly ls -l on the /home/tester give:

drwxrws--T+  2 root    tester  4.0K Apr 18 11:17 tester

As it should be, right ?

#127 Re: Other Issues » [SOLVED] Can't stop the WiFi spoofed / Cloned MAC address :'( » 2022-04-18 14:04:20

SpongeBOB wrote:

Is there a way to set manually a static MAC ?

Oh, I found (there was even a tool tip) I'm ashamed smile I can directly enter in the cloned mac address a mac address smile

#129 Other Issues » [SOLVED] Sharing files between users with stickybit and setgid » 2022-04-18 09:21:25

SpongeBOB
Replies: 4

Hi everyone,

I would like to share files between users ( /home/tester )

I would like that only members of the group tester have access to that folder and can only delete their files

I've tried the following

su

groupadd tester
useradd -m -c "John Doe" John
passwd John

usermod -aG tester John
usermod -aG tester Marie

mkdir /home/tester
cd /home/tester

chown :tester .
chmod +t .
chmod -R g+s .
setfacl -Rm g:tester:rwx,d:g:tester;rwx .

so John and Marie have access to /home/tester they can create files, read the files of the others, but can't edit files from others.. any ideas ?

su

getfacl /home/tester/by_john.txt

# file: home/tester/by_John.txt
# owner: John
# group: tester
user::rw-
group::r-x			#effective:r--
group:tester:rwx		#effective:rw-
mask::rw-
other::---

#130 Re: Other Issues » [SOLVED] /home/newuser do not match the umask » 2022-04-18 06:36:01

Hoo I didn't know for the ACLs and extended attributes are copied.

I just modified the attributes of the files within the SKEL and indeed it works !

Thanks HOAS

#131 Re: Other Issues » [SOLVED] Can't stop the WiFi spoofed / Cloned MAC address :'( » 2022-04-17 12:29:08

Humm suddenly in the GUI\Device appear a second option wlan0(24:xxxxxxxxxxx)
and now the MAC is static.

#132 Other Issues » [SOLVED] Can't stop the WiFi spoofed / Cloned MAC address :'( » 2022-04-17 12:07:40

SpongeBOB
Replies: 4

Hi everyone,

I'm testing the desktop-live Chimaera 4.0

How can I stop the Cloned MAC address ?

I've tried trough
- the GUI Advanced Network Configuration and set the Cloned MAC address to Permanent or Preserve.
- nmcli
- nmtui

The MAC is always renewed...

any ideas ?

Thanks.

#133 Re: Other Issues » [SOLVED] /home/newuser do not match the umask » 2022-04-17 06:12:14

Indeed /home/john directory is 750 when changing the UMASK in /etc/login.defs

but some of the 4 defaults files (before user login) are not as intended (in bold)

644 .bash_logout
644 .bashrc
750 .config (dir)
644 .profile

640 .config/autostart/oneshot.desktop

Any ideas ?

#134 Re: Other Issues » [SOLVED] /home/newuser do not match the umask » 2022-04-17 05:27:51

Thanks HOAS !

So what is the "order of authority" with UMASK ?

  • /etc/login.defs

  • ~/.profile

  • /etc/profile

  • /etc/pam.d/

#135 Other Issues » [SOLVED] /home/newuser do not match the umask » 2022-04-16 06:38:09

SpongeBOB
Replies: 5

Hi everyone,

On my loved Devuan (chimaera) my umask is set a 027

Trough

/etc/pam.d/common-session wrote:

session optional pam_umask.so umask=027

So every new files is 640 (As attended)

What is weird when I do a  useradd -m -c "John doe" John

I've got 755 on /home/John

Why useradd doesn't apply the umask ?

When the user login all the newly created sub folders such as /home/john/Desktop are 640

any ideas ?

#136 Re: Other Issues » [SOLVED] Launching a terminal from a subshell ? » 2022-04-16 05:38:15

🙇 Thanks again HOAS !!! that's a detailed answer, thank you so much !

I'm ashamed to ask, but does someone have a an explanation about

echo -ne "\033]0;Title Of Terminal\007"

 
I've man echo But this doesn't help to understand why the echo is going to the title.. (I've look also on some's search engine but found nothing.. hmm )

Thanks

#137 Re: Other Issues » [SOLVED] Launching a terminal from a subshell ? » 2022-04-15 08:17:15

Voila,

I've done it slightly differently

So I'm using /etc/skel/.config/autostart/oneshot.desktop

[Desktop Entry]
Exec=oneshot
Terminal=true

and here the /usr/local/bin/oneshot

#!/bin/bash
passwd
rm -rfv ~/.config/autostart/oneshot.desktop

way easier than my previous solution big_smile

I just need to found a way to set the title of the terminal .

btw @HOAS why are you using #!/bin/sh ?

#138 Re: Other Issues » [SOLVED] Launching a terminal from a subshell ? » 2022-04-15 07:39:01

Thank you HOAS !

The XY Problem link I provided explains why it is always best to explain exactly what you're trying to do rather than just ask about a specific problem.

I've just read it and it totally make sens. I think also it's legitimate that if a "noob" took time on Y and believe he is that close to solve Y and therefore X. He is thinking that it will take less time to explain Y instead of the all X[Y].
For my part, If I would need help with Y I will included the X as much as possible 😅

You have edited the wrong section. Revert that change and instead add -e passwd to line 173 (ie, the Exec line without the --preferences option)...

That work ! I've tried also -->

Exec=xfce4-terminal -e passwd && rm -rf ~/.config/autostart/

But of course it's not working, that would have been too easy big_smile

EDIT: just read the OP again. To make this only run once per user we would have to call a script instead that checks for a marker file left after completion and only runs the terminal if the marker file is not present (and then creates the marker file afterwards ofc).

Would you have a solution that instead of create a marker file, just delete the ~/.config/autostart/xfce4-terminal.desktop ?

I will try now (base on your examples)  and post-it if I manage...

out of topics: Damn I spend my ~life to be a windows guru and the conversion is hard, but must ! just for ethic.

#139 Re: Other Issues » [SOLVED] Launching a terminal from a subshell ? » 2022-04-10 05:28:51

Thank you @HOAS,

unfortunately 

echo 'x-terminal-emulator &' >> ~/.xsessionrc

had no effect (visible, most probably it run in the background)

mkdir -p ~/.config/autostart
cp /usr/share/applications/xfce4-terminal.desktop ~/.config/autostart/

indeed start the terminal, but I would like it launch within -e 'passwd' is it possible ?

I edited the ~/.config/autostart/xfce4-terminal.desktop

was

...
Exec=xfce4-terminal --preferences

to

...
Exec=xfce4-terminal -e 'passwd' --preferences

but that's have no effect either

#140 Other Issues » [SOLVED] Launching a terminal from a subshell ? » 2022-04-02 05:11:49

SpongeBOB
Replies: 8

Hi everyone,

I've created a script that run only once after an user login for the first time.

I launch the script trough ~/.profile

Like this

.profile wrote:
./.OneTime.sh &
startxfce4

So I launch my script as a subshell with the & at the end of the command because I need xfce to have generated some files..
and If I do

.profile wrote:
startxfce4
./.OneTime.sh

My script will never be executed...

I would my script (.OneTime.sh) launch a terminal for the user

I've tried

xfce4-terminal -e 'passwd' 

But I don't see the terminal....

Any ideas ?

#141 Re: Other Issues » [SOLVED] Generate a sound / beep / tts from CLI ? » 2022-04-02 04:44:30

Oh ! I found already one method !

spd-say "The text to be TTS"

smile

#142 Other Issues » [SOLVED] Generate a sound / beep / tts from CLI ? » 2022-04-02 04:41:43

SpongeBOB
Replies: 3

Hi everyone,

I'm testing a script and a beep (or any sound would help in my debugging ) beep seem not to be installed by default.

is there any other command than can generate a sound from the CLI  ? (a beep, playing a file, speaking trough TTS..)

Thanks..

#143 Re: Other Issues » Secure /etc/passwd ? » 2022-03-11 14:25:17

Thank you HOAS,

I knew that the actual password are stored in /etc/shadow.

But I found curious that any user account can list the full list of user registered on the machine..

#144 Other Issues » Secure /etc/passwd ? » 2022-03-11 08:36:23

SpongeBOB
Replies: 3

Hi everyone,

I see that by default the file /etc/passwd is 644

Is it not insecure that Others have read permissions ? I'm not feeling comfortable with that...

I change it to 640 but of course when I log-in with a user that start startxfce4 it's won't launch the GUI and stay in CLI...

I would like to give the correct ACL permissions to make xcfe start, but I don't even know witch account should have read acces ??

Thanks

#145 Re: Other Issues » alternative search engine » 2022-02-27 07:50:56

@amaro , have a look on DuckDuckGo.com
Cheers.

#146 Re: Devuan » [SOLVED] Rsyslog alternative ? » 2022-02-26 08:29:46

Little update, with the man rsyslog.conf I could find more info and I got the output than I wanted...

Thanks @fsmithred

#147 Re: Devuan » [SOLVED] Rsyslog alternative ? » 2022-02-26 06:27:02

Thank you @fsmithred

I tried this method too, the output is indeed better than the default one, but still not exactly what I need (yes I'm picky tongue )

btw what mean the -05:00 ?  2022-02-25T15:55:46.893072-05:00

man rsyslogd or man rsyslog.conf for more info.

Thx I will !

#148 Devuan » [SOLVED] Rsyslog alternative ? » 2022-02-25 20:40:45

SpongeBOB
Replies: 4

Hi everyone,

I'm struggling with something that should normally be easy to fix. (see: https://github.com/rsyslog/rsyslog/issues/4809 )

But with the poor documentation (or I'm that stupid) and the non human friendly syntax of Rsyslog. It's all but easy...

Therefore, I was wondering if we could use another system log utility ? if yes do you have any recommendations ?

Also, do Devuan plan to use another system log utility in the futur ?

Thanks.

#149 Re: Other Issues » [SOLVED] nftables saving log with ulogd ? » 2022-02-25 10:03:49

I found !!! The file was needed a LF at the end !!! lol

#150 Other Issues » [SOLVED] nftables saving log with ulogd ? » 2022-02-24 07:16:13

SpongeBOB
Replies: 1

Hi everyone,

I followed this tutorial https://www.mybluelinux.com/how-nftable … rnal-file/

in order to save some nftable log into a different file than the default : /var/log/messages but It's not working hmm any ideas ?

here my ulogd.conf (all the # lines have been removed)

[global]
logfile="syslog"
loglevel=3
stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu2:LOGEMU

[ct1]

[ct2]
hash_enable=0

[log1]
group=0

[ulog1]
nlgroup=1

[nuauth1]
socket_path="/tmp/nuauth_ulogd2.sock"

[emu1]
file="/var/log/ulog/syslogemu.log"
sync=1

[op1]
file="/var/log/ulog/oprint.log"
sync=1

[gp1]
file="/var/log/ulog/gprint.log"
sync=1
timestamp=1

[xml1]
directory="/var/log/ulog/"
sync=1

[json1]
sync=1

[pcap1]
sync=1

[mysql1]
db="nulog"
host="localhost"
user="nupik"
table="ulog"
pass="changeme"
procedure="INSERT_PACKET_FULL"

[mysql2]
db="nulog"
host="localhost"
user="nupik"
table="conntrack"
pass="changeme"
procedure="INSERT_CT"

[pgsql1]
db="nulog"
host="localhost"
user="nupik"
table="ulog"
pass="changeme"
procedure="INSERT_PACKET_FULL"

[pgsql2]
db="nulog"
host="localhost"
user="nupik"
table="ulog2_ct"
pass="changeme"
procedure="INSERT_CT"

[pgsql3]
db="nulog"
host="localhost"
user="nupik"
table="ulog2_ct"
pass="changeme"
procedure="INSERT_OR_REPLACE_CT"

[pgsql4]
db="nulog"
host="localhost"
user="nupik"
table="nfacct"
pass="changeme"
procedure="INSERT_NFACCT"

[dbi1]
db="ulog2"
dbtype="pgsql"
host="localhost"
user="ulog2"
table="ulog"
pass="ulog2"
procedure="INSERT_PACKET_FULL"

[sqlite3_ct]
table="ulog_ct"
db="/var/log/ulog/ulogd.sqlite3db"

[sqlite3_pkt]
table="ulog_pkt"
db="/var/log/ulog/ulogd.sqlite3db"

[sys2]
facility=LOG_LOCAL2

[nacct1]
sync = 1

[mark1]
mark = 1

[acct1]
pollinterval = 2

[graphite1]
host="127.0.0.1"
port="2003"
prefix="netfilter.nfacct"

[log2]
group=2
[emu2]
file="/var/log/ulog/test.log"
sync=1

and here the nftable rule ->

	chain chIN {
		type filter hook input priority 0; policy drop;
		icmp type echo-request counter name cntECHO log prefix "echo: " group 2 accept
		ct state established,related accept
		iifname lo accept		
	}

When I remove the group 2 the log goes well into the default /var/log/messages .

With it, the log doesn't go into /var/log/ulog/test.log hmm (as specified in line 129 of ulogd.conf)

Any ideas ?

Thanks.

Board footer

Forum Software