Active Topics

 


Reply
Thread Tools
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#11
Originally Posted by SubCore View Post
strange, /usr/sbin should be in $PATH for root...
did you do something naughty with your device?
could be the difference between "root" and "sudo gainroot" ??

One loads a full root profile and the other doesn't.. to my understanding..
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#12
Originally Posted by fatalsaint View Post
could be the difference between "root" and "sudo gainroot" ??

One loads a full root profile and the other doesn't.. to my understanding..
you're right, $PATH is different when using sudo gainroot as opposed to root.
but still, /usr/sbin is present in both, at least on my device.
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 

The Following User Says Thank You to SubCore For This Useful Post:
PMaff's Avatar
Posts: 361 | Thanked: 219 times | Joined on Sep 2010
#13
Originally Posted by Laughingstok View Post
Yep.

Just checked which useradd though and found it /usr/sbin/useradd.

Will use that.
Just to resurrect this thread.

I'd like to have 2 users on my N900, the default one for me
and the the 2nd for my wife.

Is it possible that if the N900 is locked and my wife uses her
lock code that she is connected to her profile and her user account so that she can make calls?

I do not care that she will then use my SIM card, since I have too many free minutes, SMS and MBs.
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#14
AFAIK Maemo is not really designed to be used by multiple users. I bet there are many places where either the username "user" or the user id is hard-coded.

There could be a way if you create two additional users (say "me" and "wife"), initially cloning the /home/user directory.

Then you make a boot menu where you choose one or the other user. The boot menu would symlink /home/user to /home/chosen-user and, for safety, edit the /etc/passwd file on-the-fly to create a "user" user identical to the chosen-user.

In theory, if this is done early in /sbin/preinit, the whole system would not notice that the real user "user" is changing between two (or, obviously, more) real users.

I am NOT going to try this, so take it as an idea if you, or somebody else, wants to go ahead and do it.

Note: this would require a full reboot to switch users. In theory you could avoid this as long as you do the user mapping at any point before the user is logged in (e.g. after the init scripts have run, I suppose X runs as user already).

So, again in theory, if you kill every single process started by or having euid = user, then do the mapping, and then restart them (in the correct order, etc.) then the switch could be done more or less "on-the-fly".

Plus, you might also run two instances of X in different virtual terminals, so that you could swap among them (using chvt).
 
PMaff's Avatar
Posts: 361 | Thanked: 219 times | Joined on Sep 2010
#15
Originally Posted by reinob View Post
...

So, again in theory, if you kill every single process started by or having euid = user, then do the mapping, and then restart them (in the correct order, etc.) then the switch could be done more or less "on-the-fly".

Plus, you might also run two instances of X in different virtual terminals, so that you could swap among them (using chvt).
Thanks for your answer.

Does the CSSU offer more possibilities for more than one user?
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#16
Originally Posted by PMaff View Post
Does the CSSU offer more possibilities for more than one user?
Not that I'm aware of...
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#17
Originally Posted by Laughingstok View Post
My idea is for creating mobile proxy servers with the N900's. Create a basic user account to allow SSH onto it. Then allow people to create ssh tunnels to the N900's and surf wherever they normally couldn't get to. For our China users.

Unfortunately I dropped my phone while installing the OpenSSH server and knocked the battery out. Upon reboot I can no longer install the server. Trying to figure out why.
I've though about something like this for a long time - to allow ssh'ing into device with very limited/specific privileges, not only for mobile proxy, but also other fun stuff that ssh offers (without security risk of messing with user things on N900, not to mention root ones).

Considering actual knowledge about this topic, any special notices that one should take, while using adduser to do achieve it (things like hardcoded 'user' references etc)?

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:43.