PDA

View Full Version : Expert user is changed fater upgraded to R75.40VS GAIA



archie100
2013-02-24, 02:20
Hi folks,
In splat, EXPERT user was considered as ROOT user.
When I upgraded it to GAIA, It is now showing up as admin.

When, I execute "whoami" in expert mode, it says its ADMIN.
Is this how its suppose to behave after upgrade?

When I am in EXPERT mode, my user is changed to ADMIN, but my group is still ROOT.

How can I change EXPERT back to ROOT and not admin?
Its important as my CRON JOBS and other scripts, all requires a ROOT user.

Regards, Archie :)

Jejerod
2013-02-27, 08:30
Hi folks,
How can I change EXPERT back to ROOT and not admin?
Its important as my CRON JOBS and other scripts, all requires a ROOT user.


You don't have to. While the username is admin, the uid/gid is still 0, so the user is effectively root. You shouldn't modify the root user on GAIA.
I configure cronjobs by creating a file in /etc/cron.d, e.g.

$ cat /etc/cron.d/jobs
#
# sample job
#
*/5 * * * * root /home/admin/bin/dosomething.sh >> /var/log/dosomething.log 2>&1

alienbaby
2013-02-27, 14:47
Fun stuff..

If you look at /etc/passwd in GAIA, the admin user is above the root user. So when resolving UID 0 (zero) to a username, admin is seen first. Also, the root user has been assigned the shell /bin/nologin.

This is much cleaner than SecurePlatform. So when you go to generate ssh keys and the like, SSH actually Gens the keys in /home/admin/.ssh instead of /root/.ssh.

Much cleaner.

This likely has other implications, such as for crontabs etc.
Under SecurePlatform, to test the scheduled backup, I would 'su -' and 'crontab -l' to verify the scheduled backup was setup. Then, still as root, execute 'backup_util sched' as shown in the crontab listing.
In GAIA, since root has a shell of /bin/nologin, you can't, by default, 'su -' to root.