Can't sudo as non-root user

Support for your TonidoPlug
biomesh
Regular Tonidoid
Regular Tonidoid
Posts: 12
Joined: Fri Mar 19, 2010 12:17 pm

Re: Can't sudo as non-root user

Postby biomesh » Sun May 09, 2010 6:05 pm

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.

richard42
Rookie Tonidoid
Rookie Tonidoid
Posts: 9
Joined: Thu May 13, 2010 9:05 am

Re: Can't sudo as non-root user

Postby richard42 » Thu May 13, 2010 9:28 am

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

mikestaszel
Tonido MVP
Tonido MVP
Posts: 193
Joined: Sun Aug 23, 2009 9:04 pm

Re: Can't sudo as non-root user

Postby mikestaszel » Fri May 14, 2010 6:54 am

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.

rcrosser
Regular Tonidoid
Regular Tonidoid
Posts: 14
Joined: Tue May 11, 2010 5:56 pm
Location: Melbourne, Australia

Re: Can't sudo as non-root user

Postby rcrosser » Fri May 14, 2010 7:06 am

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.
Russell

biomesh
Regular Tonidoid
Regular Tonidoid
Posts: 12
Joined: Fri Mar 19, 2010 12:17 pm

Re: Can't sudo as non-root user

Postby biomesh » Fri May 14, 2010 8:28 am

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.

richard42
Rookie Tonidoid
Rookie Tonidoid
Posts: 9
Joined: Thu May 13, 2010 9:05 am

Re: Can't sudo as non-root user

Postby richard42 » Fri May 14, 2010 1:18 pm

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?

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Can't sudo as non-root user

Postby Tuxedo » Sat May 15, 2010 12:42 am

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

morganm
Rookie Tonidoid
Rookie Tonidoid
Posts: 4
Joined: Sat May 15, 2010 12:48 am

Re: Can't sudo as non-root user

Postby morganm » Sat May 15, 2010 12:53 am

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!

morganm
Rookie Tonidoid
Rookie Tonidoid
Posts: 4
Joined: Sat May 15, 2010 12:48 am

Re: Can't sudo as non-root user

Postby morganm » Sat May 15, 2010 12:59 am

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)

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Can't sudo as non-root user

Postby Tuxedo » Sat May 15, 2010 1:06 am

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.


Return to “TonidoPlug Support”

Who is online

Users browsing this forum: No registered users and 8 guests