1837896 Members
3371 Online
110122 Solutions
New Discussion

useradd problem in sam

 
Umapathy S
Honored Contributor

useradd problem in sam

hi all
Back after a 4 day vacation. I was trying to add an user account to a hpux10.2 box through sam.

I got a strange error as
Failed to add user "temp1". There was an unknown error in "usr/sam/lbin/useradd.sam". The output from this command was: Permission Denied.
I am sure it was working fine before I left for the vacation. I thought someone would have done something nasty. I checked up the permissions.

#ll -d /usr/sam/lbin/useradd.sam
lrwxr-xr-x 1 root sys 17 Mar 1 2000 /usr/sam/lbin/useradd.sam -> /usr/sbin/useradd

#ll -d /usr/sbin/useradd
-r-xr-xr-x 1 bin bin 53248 Jan 7 1999 /usr/sbin/useradd

I think those are fine w.r.t permissions.

Am I missing something somewhere. Pointers and advices are greatly welcome

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
8 REPLIES 8
U.SivaKumar_2
Honored Contributor

Re: useradd problem in sam

Hi,
Try this.
chown root:sys /usr/sbin/useradd
and try sam again.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Umapathy S
Honored Contributor

Re: useradd problem in sam

when I tried like this
# /usr/sbin/useradd temp1 rm: /etc/group.tmp13650 not removed. Permission denied

I got the above error. I am not understanding what was happening behind the scenes.

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
T G Manikandan
Honored Contributor

Re: useradd problem in sam

Can you please check the samlog at
/var/adm/sam

for any messages.

Also check your syslog.log file at /var/adm/syslog.

Revert


Thanks
Michael Tully
Honored Contributor

Re: useradd problem in sam

Try and create a user from the command line first.

e.g.
# useradd -u 1150 -g users -d /home/testuser -s /usr/bin/ksh -c "test" -m testuser

You may need to set up the symbolic link again.
Anyone for a Mutiny ?
U.SivaKumar_2
Honored Contributor

Re: useradd problem in sam

Hi,
try renaming this file /etc/group.tmp13650
to something else. eg. test.u
#mv /etc/group.tmp13650 /etc/test.u
Also.
#cd /etc
#ls group.tmp*
how many such files exist?
regards,
U.SivaKumar
Innovations are made when conventions are broken
Umapathy S
Honored Contributor

Re: useradd problem in sam

hi
When I tried use sam to see the disk devices. I got the following error.

Sorry you must have superuser (root) privilege to access/enter this area of SAM.

I ran sam as root only. I think somewhere the permissions for sam are tweaked out.

# ll -d `which sam`
-rwxr-xr-x 1 bin bin 7219 Jun 7 1996 /usr/sbin/sam

any points on this

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Umapathy S
Honored Contributor

Re: useradd problem in sam

hi michael
when I tried your script

# useradd -u 1150 -g users -d /home/testuser -s /usr/bin/ksh -c "test" -m testuser rm: /etc/group.tmp18660 not removed. Permission denied mkdir: cannot access /home: Permission denied Cannot create home directory

# ll -d /home drwxr-xr-x 27 root root 1024 Aug 12 17:45 /home

# id uid=0(root) gid=3(sys) groups=0(root),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users),102(mqm)

# groups root bin sys adm daemon mail lp users mqm

any clues

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Michael Tully
Honored Contributor

Re: useradd problem in sam

For the sake of stupidity on my part, make /home with the permissions of 777 try the script again.
Anyone for a Mutiny ?