constantly – Starting Session 58576 of user root?

I see that my syslog is polluted by this type of message constantly. how is it done? Thank you

May 23 21:12:26 HOSTNAME systemd[1]: Starting Session 58576 of user root. May 23 21:12:26 HOSTNAME systemd[1]: Started Session 58576 of user root. May 23 21:12:26 HOSTNAME systemd[1]: Starting Session 58577 of user root. May 23 21:12:26 HOSTNAME systemd[1]: Started Session 58577 of user root. May 23 21:12:27 HOSTNAME systemd[1]: Starting Session 58578 of user root. May 23 21:12:27 HOSTNAME systemd[1]: Started Session 58578 of user root.

Problema al ejecutar `apt-get install` como root

Mi versiĆ³n de ubuntu es 16.04.6 lts. El error que me sale es el siguiente:

**Reading package lists... Error! E: Couldn't create temporary file to work with /var/lib/apt/lists/us-east-1.ec2.archive.ubuntu.com_ubuntu_dists_xenial_InRelease - mkstemp (2: No such file or directory) E: The package lists or status file could not be parsed or opened.**** 

espero puedan ayudarme, gracias.

Accesing Javascript files hosted in root from add-in

I’ve got a series of SharePoint hosted Add-Ins that I’m developing,they all use a certain group of common files like jQuery and such, that I’m trying to host on the site’s folder rather than keeping a copy on each individual add-in.

I’ve placed the files on the /_catalogs/masterpage/customFolder directory and have tried to reference them by their absolute URL (since the add-ins have their own domain with the -id); however I’m getting a CORS error:

Access to script at ‘[ABSOLUTE-URL-TO-FILE]’ from origin ‘https://[SITE-DOMAIN]-283a4c3b336885.sharepoint.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Is it possible to enable CORS so that I don’t need to keep multiple copies of these files and am able to, if needed, update one file and affect all add-ins at once?

No WiFi after trying to root Samsung Galaxy S10e with Magisk

I followed this tutorial: https://topjohnwu.github.io/Magisk/samsung

All went well until step 14 (so, right after flashing the ROM and rebooting).

At step 14, Magisk tried updating, but could not. I realized the problem was that Android can not connect to my WiFi.

How to fix the problem?

Notes:

  • The WiFi hotspot itself is OK, my desktop computer is using it right now to post this question.
  • Android was able to access the Internet up to step 5 at least.
  • This thread suggests it might be caused by modules, and suggest removing the modules then rebooting, but I installed no modules.

adb logcat

05-21 22:20:33.559  5207  5207 D WifiHAL : Start get packet fate command                                                                                                                             05-21 22:20:33.559  5207  5207 D WifiHAL : createRequest Get Tx packet fate request                                            05-21 22:20:33.559  5207  5207 D WifiHAL : error code -95 mapped to -3                                                                                                                               05-21 22:20:33.559  5207  5207 E WifiHAL : Failed to register get pkt fate response; result = -3                                                                                                     05-21 22:20:33.559  5608  5873 E WifiVendorHal: getTxPktFates(l.2241) failed {.code = ERROR_NOT_SUPPORTED, .description = }                                                                          05-21 22:20:33.560  5207  5207 D WifiHAL : Start get packet fate command                                                                                                                             05-21 22:20:33.560  5207  5207 D WifiHAL : createRequest Get Rx packet fate request                                                                                                                  05-21 22:20:33.560  5207  5207 D WifiHAL : error code -95 mapped to -3                                                                                                                               05-21 22:20:33.560  5207  5207 E WifiHAL : Failed to register get pkt fate response; result = -3                                                                                                   05-21 22:20:33.560  5608  5873 E WifiVendorHal: getRxPktFates(l.2283) failed {.code = ERROR_NOT_SUPPORTED, .description = } 

I also get:

WifiVendorHal: getRingBufferStatus(l.2059) failed {.code = ERROR_NOT_SUPPORTED, 

How to prevent a program from being uninstalled by a user with root permissions?

In order to solve my need to a website blocker software on Ubuntu to fight self-temptation, I’ve decided to take a compound approach:

  • Install a website blocker app
  • Put password on that app to access the setting or to uninstall

Is there a way to do so?
I have the root access and I’m the only user of the software. Can I prevent my self from uninstalling an app with a password?

sudo restrictions circumvention with pkexec: root shell

I had corrupted my sudo setup. With no possibility to login as root (locked root account, broken sudo), a search made it clear: use pkexec. It worked. So far, so good.

But that turns out to be a big security hole: a user that is part of the ‘sudo’ group can always gain root access, and start a shell as the root user. That is, at least on a default Ubuntu server installation with sudo.

This renders sudo useless as a means to restrict elevated privileges to certain commands for selected users. Unless some policykit policy is altered, apparently. That’s not mentioned in the man pages of ‘visudo’ or ‘sudo’. And I’ve never seen it mentioned in any tutorial on how to set up the sudoers file (probably I’ve been reading the wrong tutorials, then).

Can anyone point me into the right direction? What policykit, or sudo, configuration file needs to be changed (and how) in order to accommodate privilege escalation for one specific command, for one specific user?

As an example, I want the ‘sudotest’ user to only be able to run the command ‘cat /proc/tty/driver/serial’ which results in a ‘Permission denied’ error for non-privileged users.

Setup:

  • Ubuntu bionic
  • user ‘sudotest’, part of ‘sudo’ group
  • either: single sudo command for ‘sudotest’, or even none
me@some-server:~$   lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 18.04.2 LTS Release:    18.04 Codename:   bionic  me@some-server:~$   ls -l /home total 20 drwx------ 6 me  me   4096 May 17 15:17 me drwx------ 2 root root 16384 Nov 26 17:20 lost+found  me@some-server:~$   sudo cat /etc/sudoers | grep -v "^#\|^$  " Defaults    env_reset Defaults    mail_badpass Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" root    ALL=(ALL:ALL) ALL me  ALL=(ALL:ALL) ALL %admin ALL=(ALL) ALL  me@some-server:~$   sudo useradd -m -d /home/sudotest -s /bin/bash sudotest  me@some-server:~$   sudo gpasswd -a sudotest sudo Adding user sudotest to group sudo  me@some-server:~$   sudo passwd sudotest Enter new UNIX password:  Retype new UNIX password:  passwd: password updated successfully  me@some-server:~$   su - sudotest su - sudotest Password:  me@some-server:~$   $   groups sudotest sudo  sudotest@some-server:~$   sudo -l [sudo] password for sudotest:  Sorry, user sudotest may not run sudo on some-server. 

Hey, this user can not even do anything with sudo. Looks like an unprivileged user. Still, this user is perfectly capable of gaining a root shell using pkexec.

How can I prevent this? What configuration options do I have to allow this user to execute one single command of my choosing with elevated privileges?

try to use flags in Chrome command line without ROOT

I use guide Run Chromium with flags My phone is not ROOTed. With agreement of that guide with flags its can be done. May be, anyone try it? at that guide was said:For production build on a non-rooted device, you need to enable “Enable command line on non-rooted devices” in about:flags, then set command line in /data/local/tmp/chrome-command-line, finally manually restart …

Chrome version 74.0.3729.136

I successfully set up flag “Enable command line on non-rooted devices”. But then I need to copy data file to “/data/local/tmp/chrome-command-line” – and I ca not do that!

I tryed:

  1. recomendation from that question, # echo “chrome –sync-url whatever” > /data/local/tmp/chrome-command-line

  2. use different android OS (5-7).

  3. use construction like that for copy files: run-as com.example.app “cat /sdcard/temp_prefs.xml > shared_prefs/com.example.app_preferences.xml”

but nothing happend.