Operation ---------- Post updated at 07:14 AM ---------- Previous update was at 07:00 AM ----------
I have attempted.
With cut
Good. You're learning how to use the tools.
Note that your output doesn't include the login names of the users whose entries are failing your tests. You might want to add that to your output.
If you'd like to get root's UID, GID, and login directory from the password file instead of assuming that they will be 0, 0, and /root, respectively, (and you're willing to live with the limitation that root's information must appear on the 1st line in the passwd file), you could consider something like:
which produces the output:
Note also that baduser3's login directory (root) is not identical to root's login directory (/root), so I'm not sure if that line should be included in your output or not. (However, all login directories in /etc/passwd should have absolute pathnames. Should you add a check to verify that each user's login directory starts with a /?)
If you don't want to print the entire line from the passwd file for lines that fail your tests, you've already shown that you know how to print just the fields you want.
All,
I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Hi,
I have a program with the following suid setup
-rwsr-sr-x 1 root other 653 Aug 16 17:00 restart_server
It basically starts up a service that has to be started by root. I just want the normal users to be able to restart the service using the script above.
But when the... (7 Replies)
Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in.
I'm using AIX 5L version 5.2... (2 Replies)
> id root
0(root) 1(other)
From CIS scanning result"it should make sure the root's gid is equal to 0", so I don't know what's the impact for that change to whole system? BTW, why is there a group named other under solaris? what does group "other" do ?
Thanks very much! (3 Replies)
Present
/home/dsadm# id dsadm
uid=0(root) gid=0(root)
----------------------------------
needs to be
/home/dsadm> id dsadm
uid=23186(dsadm) gid=16284(gdstage)
Please provide the command/steps for the above uid, gid value change
Thanks in advance for all your support .
... (3 Replies)
Hi All
After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Hi Unix Gurus .
I have requirement where in which - I would like create duplicate root equivalent account with all the privileges equal to root. Is it possible to create this duplicate account with different UID. ?
this id i would like give it to my teams - who does multiple activities using... (2 Replies)
Hi all
I have a strange problem on one my my AIX machines. We have created a user called testroot with the same UID as root (uid=0) by changing the uid of that user in the /etc/passwd file. I know that this is a security breach but this is a test system.
Now the strange thing that happens is that... (3 Replies)
I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made.
1. The problem statement, all variables and given/known data:
The task is to create a script which prints information about users whose names are specified in the... (2 Replies)