Page 3 of 4

Re: Can't sudo as non-root user

Posted: Sun May 09, 2010 6:05 pm
by biomesh
Just as an update, installing pure-ftpd and logging in as a non root user does work. Logging in with any type of interactive shell with a non root user fails however and the session is closed.

Re: Can't sudo as non-root user

Posted: Thu May 13, 2010 9:28 am
by richard42
I got the tonidoplug yesterday. The main reason I got it is to let it run as a low-power ubuntu server 24x7 so that I can ssh into it anytime, anywhere. But like many of you here I just realized that regular user accounts do not seem to work. This is not related with ssh. As root, I created local user via 'useradd', 'passwd' and just tried to 'su - <user>' and even that does not work -- I remain logged in as root. ssh connection seems to work but the connection immediately gets closed. 'ssh user@ip date' does not show date output.

Can someone confirm once and for all if tonido plug supports regular user accounts?
It appears that there are conflicting reports here. But my tonidoplug is brand new and I had not installed any software that may interfere with the original set up.

Thanks

Richard

Re: Can't sudo as non-root user

Posted: Fri May 14, 2010 6:54 am
by mikestaszel
I don't see why not. I just ran "useradd -m mikestaszel" and then "passwd mikestaszel" while SSHed in as root, then disconnected and SSHed in as mikestaszel and it's working fine. All I can really ask is whether or not a home directory exists for the user - the -m switch makes that.

Re: Can't sudo as non-root user

Posted: Fri May 14, 2010 7:06 am
by rcrosser
I bet everyone who can log in as added user (non-root) has an older version tonidoplug. I also can add a new user, a directory is created in the /home dir, and then I can't su to that new user, nor can I log in as the new user (using PuTTY on xp). My new plug arrived about 10 days ago.

Re: Can't sudo as non-root user

Posted: Fri May 14, 2010 8:28 am
by biomesh
rcrosser wrote:I bet everyone who can log in as added user (non-root) has an older version tonidoplug. I also can add a new user, a directory is created in the /home dir, and then I can't su to that new user, nor can I log in as the new user (using PuTTY on xp). My new plug arrived about 10 days ago.


I agree with you on this. Something has changed with the image that is used on the newer plugs.

Re: Can't sudo as non-root user

Posted: Fri May 14, 2010 1:18 pm
by richard42
biomesh wrote: I agree with you on this. Something has changed with the image that is used on the newer plugs.


Thanks for the confirmations that the new tonidoplug may not be working as expected. Is there an old image file somewhere I can download and make this thing working again?

Re: Can't sudo as non-root user

Posted: Sat May 15, 2010 12:42 am
by Tuxedo
No need to goto the old version. Was able to reproduce the problem finally and found the solution.
Check the solution here:
http://tonido.com/forum/viewtopic.php?f=37&t=1314

Re: Can't sudo as non-root user

Posted: Sat May 15, 2010 12:53 am
by morganm
I just got my brand new Tonido plug earlier today and this issue was driving me nuts.

I just found this thread and 8 minutes ago Tuxedo posted the solution. If I'd come 8 minutes earlier, I'd probably have given up searching the forums and gone on bashing my head for a few more days before circling back to check here again. Lucky me!

Posted solution works great - so happy now! Loving my TonidoPlug so far - Thank you!

Re: Can't sudo as non-root user

Posted: Sat May 15, 2010 12:59 am
by morganm
Update: though I could login non-root after the posted fix, sudo was broken in my image, giving a "sudo: must be setuid root" error. The fix:

chmod 4111 /usr/bin/sudo

(of course, you have to add your non-root account to /etc/sudoers as well)

Re: Can't sudo as non-root user

Posted: Sat May 15, 2010 1:06 am
by Tuxedo
Thanks morganm. We will include this fix in next image release.
Not sure if 4111 is the right permission to set. It may become very restrictive for some programs.
Better thing to do will be to use the command

Code: Select all

 # chmod u+s /usr/bin/sudo
The permissions after this change matches the permissions of the same file on any ubuntu desktop.