You are not logged in.

#1 2014-07-13 15:36:29

dudakl
Member
From: Germany
Registered: 2014-04-24
Posts: 13

[SOLVED]tmux crashes for users, not on sudo

I have a probleme using tmux.
Trying to start tmux directly does not work and crashes my Xserver and dwm.

Using "sudo tmux" followed by my user password works perfectly fine, but i am instantly logged in to ROOT without even using my root-password. (Security issue?)

This seems strange in my opinion...

I have found this link about a similar problem:
https://bbs.archlinux.org/viewtopic.php?id=168666

But i do not have this /dev/pts line in my fstab and it seems this is not the problem.

The Xserver puts his messages right into tmux after starting it and dies afterwards...
It says, it is not able to load my "tamsyn"-font...

Any ideas?

Last edited by dudakl (2014-07-13 16:29:44)

Offline

#2 2014-07-13 15:49:50

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,373
Website

Re: [SOLVED]tmux crashes for users, not on sudo

dudakl wrote:

Trying to start tmux directly does not work and crashes my Xserver and dwm.

Using "sudo tmux" followed by my user password works perfectly fine, but i am instantly logged in to ROOT without even using my root-password. (Security issue?

It sounds like there is something either in your ~/.tmux.conf, or a shell rc file (e.g. ~/.bashrc) that is causing problems.  These are not read for the root account.

Logging in as root when you use sudo is not a security issue.  That is what sudo does.

EDIT:

dudak wrote:

The Xserver puts his messages right into tmux after starting it and dies afterwards...

So, I suspect you call startx/xinit from your shellrc file, right?

Last edited by Trilby (2014-07-13 15:53:28)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2014-07-13 15:59:46

dudakl
Member
From: Germany
Registered: 2014-04-24
Posts: 13

Re: [SOLVED]tmux crashes for users, not on sudo

I do not even have a .tmux.conf...so this should not be the problem (?)...
I am using the zsh with the grml-zsh-config without any configuration...
But i added the startx-command in my ".zprofile"-file.

Always thought "sudo" does something using root-privileges not doing things "as" root...

Offline

#4 2014-07-13 16:08:10

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,373
Website

Re: [SOLVED]tmux crashes for users, not on sudo

dudakl wrote:

But i added the startx-command in my ".zprofile"-file.

That's the problem.  Remove it, or put it in a conditional block that checks $TERM (as shown in the wiki).

dudak wrote:

Always thought "sudo" does something using root-privileges not doing things "as" root...

There is no difference.  If you `sudo bash` you are logged in as root - this is effectively what you are doing when you do `sudo tmux`.

If you give a sudoer access to run any and all commands, then you have given that user complete root access.  If you want a user to be able to run only some commands, but not get complete root access, then you need to speficy just those commands in the sudoers file and ensure that none of those commands can be used to spawn a new shell.  This latter point is not trivial, and realistically, if you don't want to allow a user the potential of full root access, then they should not be given any sudoers entries.

Last edited by Trilby (2014-07-13 16:08:48)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2014-07-13 16:21:36

dudakl
Member
From: Germany
Registered: 2014-04-24
Posts: 13

Re: [SOLVED]tmux crashes for users, not on sudo

Nice! Everything works fine by now smile

I added my "startx"-command as explained on this page:
https://wiki.archlinux.org/index.php/Start_X_at_Login

Don't know, how i could oversee that...
But why is it a problem by using only "startx" without that fancy stuff in front of it?

OK...got that! smile Thanks for your explanation!
Actually it's no problem, because it is my own laptop and noone will ever use it, instead of me.

Thanks for your help! :3

Offline

#6 2014-07-13 16:25:36

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,373
Website

Re: [SOLVED]tmux crashes for users, not on sudo

That "fancy" stuff checks whether X is already running and what the current vt number is and it will only start X from vt 1 and only if X is not already running (I also have a conditional to only do so if TERM=linux which indicates an actual tty).

Without these, every time your zshprofile, or whatever it was, is read, it will try to start X.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#7 2014-07-13 16:29:16

dudakl
Member
From: Germany
Registered: 2014-04-24
Posts: 13

Re: [SOLVED]tmux crashes for users, not on sudo

I should learn more about these system-variables...to understand that "fancy"-stuff ^^

But thanks! I really love those fast responses!

Offline

Board footer

Powered by FluxBB