Comments (9)
How to create a user other than root
useradd
, then su
/sudo
for switching.
from proot-distro.
How to create a user other than root
useradd
, thensu
/sudo
for switching.
Is there any way to directly login to non root user?
from proot-distro.
It's simple. you need to add the login command inside .bashrc
file
eg:
echo "exec su - username" >> .bashrc
But I'm not sure there's a chance that if you type exit
it keeps logging in back
from proot-distro.
Is there any way to directly login to non root user?
I hope you have read the help information of proot-distro login
- this command allows to redefine login command and use something else instead of just root shell.
Try something like proot-distro login ubuntu -- su - username
from proot-distro.
Try something like
proot-distro login ubuntu -- su - username
This will result in tty errors, making it impossible to use programs like emacs and breaking things all around.
For example, trying to start emacs results in: emacs: Could not open file: /dev/tty
you need to add the login command inside .bashrc file
This works, but only when --termux-home is not specified.
Maybe adding a flag to login that switches --root-id to --change-id=uid:gid is a better option?
from proot-distro.
This will result in tty errors
On your device maybe. Never seen such issue on any of mine.
trying to start emacs results in: emacs: Could not open file: /dev/tty
I can't reproduce that. Emacs works perfectly as well as /dev/tty accessible. See below:
Maybe adding a flag to login that switches --root-id to --change-id=uid:gid is a better option?
su
handles things better.
from proot-distro.
Seems like it's specific to Ubuntu-18.04.
Worked fine in Ubuntu 20.04. Haven't tried other distros.
I also tried to add a --user flag to login as described before and it worked fine in Ubuntu-18.04. Will upload a fork to Github soon.
Why is su
preferred, if I may ask?
from proot-distro.
Why is su preferred, if I may ask?
Because su
is alternate implementation of /bin/login
, transparently configures appropriate environment vars for user and handles PAM modules.
from proot-distro.
proot-distro login --user username distro
example username eric, distro ubuntu-20.04
proot-distro login --user eric ubuntu-20.04
from proot-distro.
Related Issues (20)
- Sorry, I was having a hard time getting the error message again. HOT 1
- [Feature]: accept argument to set working directory through `--cwd` HOT 2
- [Feature]: argument `--env` to set environment variable HOT 2
- [Bug]: proot-distro not updated in termux repository ? HOT 1
- [Distribution]:freebsd HOT 1
- [Bug]: the xfce pulseaudio plugin not working in Debian HOT 6
- arm 32bit: incorrect warning HOT 6
- [Feature]: Ability to set proot's built in qemu flag HOT 5
- [Feature]: termux distro and rootfs HOT 3
- [Distribution]: sparky linux HOT 1
- [Bug]: set -xu clears input arguments HOT 1
- [Bug]: the xfce pulseaudio plugin not working in Debian HOT 6
- [Bug]: Bus error when running rqiner HOT 1
- [Bug]: Manjaro image gone stale HOT 1
- [Distribution]: Rhel and fedora 40 HOT 5
- [Bug]: Ubuntu in Termux Proot-Distro can't connect to Internet HOT 1
- [Bug]: ubuntu xfce4 crashes after 2mins HOT 1
- [Distribution]: postmarketOS HOT 1
- [Distribution]: mount ext4 partiton 2nd from sdcard for distro HOT 1
- [Feature]: My phone has root permissions. How can I make the Debian installed through proroot-distro in termux listen to port 443? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proot-distro.