sreda, 29. avgust 2012

JellyBean with multiple users

If you have a rooted Android phone running Jelly Bean, then you can have multiple users, just like on a regular Linux machine. :)
If you want to add a user then open terminal emulator and type:

  1. su
  2. pm create-user foo
Press and hold the power button and you'll be able to select your newly created user.
If you want to list all users on the system then open terminal emulator and tpe:
  1. su
  2. pm list-users
If you want to remove a user then open terminal emulator and type:
  1. su
  2. pm list-users and remember the number before user foo
  3. pm remove-user 1

pm list-users gives something like:
Users: 
                UserInfo{0:Primary:3}
                UserInfo{1:foo:3}

petek, 24. avgust 2012

Prevent user from running su

If you want to prevent user foo from running command su then do this:

  1. sudo grouadd nosu
  2. sudo usermod -a -G nosu foo
  3. sudo vi /etc/pam.d/su and uncomment
    auth required pam_wheel.so deny group=nosu

sobota, 18. avgust 2012

Required property "db.example.com" is unknown host. ERRORCODE=-4222, SQLSTATE=08001

If DB2 JCC driver throws mentioned error this means that it cannot resolve db.example.com. You should check your DNS settings.