Monday, July 2, 2012


How to reset SAP ddic & sap*  passowrds on client 000




I install sapr3 4.7 and on WIN 2003& orale Db and after installation I set the the passwords for SAP* & DDIC on client 000 then I forget it.  Pls help me how to reset them to login to the system by client 000& i in form u i can login with 001 & 066 
===== 
## Rest the password of 'sap*' in client 000 
## Log on to oracle database using sqlplus. 
sqlplus / nolog 
SQL>connect /as  sysdba 
SQL>update <SchemaOwner>.USR01 set bname='SAP*1' where bname='SAP*'  and MANDT=000;

## [ e.g.: update SAPR3.USR01 set bname='SAP*1' where bname='SAP*'  and MANDT=000; ] 
## [e.g. : update SAP<SID>.USR01 set bname='SAP*1' where bname='SAP*'  and MANDT=000;]

SQL>commit; 
SQL>exit

## This will reset the user SAP* in client 000 . After loggin in client with user SAP* change the passwords for other users.
## You can user client number of your respective client.
## Please note do not reset any other user than SAP* with this method.



SAP R/3 System Parameters 

This overview describes how security and controls can be implemented through system parameters.  System parameters are used to maintain configuration over the operation of the SAP system.  System parameters may define key settings for the whole system on which SAP runs, individual hosts systems (e.g. configuration for only one of many application servers) or the instances that are running on these servers.  The majority of system parameters ensure that SAP operates effectively on the customer’s preferred hardware, operating system and database platforms.  System parameters also control how SAP operates and provides system wide control over some aspects of Security.  System parameters are set using transaction RZ10. To make the parameters globally effective set them in the default profile, DEFAULT.PFL. To make them instance-specific, you must set them in the profiles of each application server in your R/3 System.  System parameters can be reviewed with transaction TU02 or from the standard SAP report RSPARAM using transaction SA38. 

Incorrect Logon, Default Clients and Default Start Menus

·         Login/fails_to_session_end (default value - 3)
        defines the number of times a user can enter an incorrect password before the system terminates the logon attempt.
·         Login/fails_to_user_lock (default value - 12)
        the number of times a user can enter an incorrect password before the system locks the user. If the system locks, an entry is written to the system log, and the lock is released at midnight.
·         Login/failed_user_auto_unlock (default value - 1)
        unlocks users who are locked by logging on incorrectly.  The locks remain if the parameter value is 0.
·         Login/system_client
        This parameter specifies the default client. This client is automatically filled in on the system logon screen. Users can enter a different client.
·         Login/ext_security
        Since release 3.0E, external security tools such as Kerberos or Secude have managed R/3 System access.  If this parameter is set, an additional identification can be specified for each user (in user maintenance) where users log on to their security system. To activate, set the value to X.
·         rdisp/gui_auto_logout (default value - 0)
        Maximum time allowed between input from the GUI before the frontend is automatically logged out.  The value is set in seconds and the value of zero is used when this facility is not active.
·         Start_menu
        This parameter specifies the default start menu for all users and can be overwritten with the user-specific start menu (transaction SU50). The default is S000, and this value can be set to any other area menu code.

Password Security

System profile parameters define the minimum length of a password and the frequency with which users must change passwords.

·         Login/min_password_lng
        minimum password length. The minimum is three characters and the maximum eight characters.
·         Login/password_expiration_time
        number of days after which a password must be changed. The parameter allows users to keep their passwords without time limit and leaves the value set to the default, 0.
·         To prevent use of a certain password, enter it in table USR40.  Maintain this table with transaction SM30. In USR40, you may also generically specify prohibited passwords.
        There are two wild-card characters:
      ? means a single character
      * means a sequence of any combination characters of any length
        Examples:
      123* in table USR40 prohibits any password that begins with the sequence 123.
      *123* prohibits any password that contains the sequence 123.
      AB? prohibits passwords that begin with AB and have an additional character, such as ABA, ABB, and ABC.

Securing SAP* user master record

·         login/no_automatic_user_sapstar
        By default SAP is installed with a user master record SAP*.  This user has the profile SAP_ALL with access to all transactions and programs in SAP.  By default if this user master record is deleted then SAP allows logon using SAP* and a password of ‘PASS’.  Although the user master record does not exist, SAP grants unrestricted system access privileges to SAP*.  By setting this parameter value to ‘1’ this ‘backdoor’ access is blocked in the event the SAP* user master record is deleted. Prior to version 4.0 this parameter was login/no_automatic_user_sap*.

Tracing Authorizations

       Auth/check_value_write_on (default value - 0)
        Authorization failures can be evaluated immediately they occur by running transaction SU53.  This functionality is only active if the parameter is set to a value greater than zero in the system profile parameter.
       Auth/authorization_trace (version 4.0B onwards - default value - ‘N’)
        When the parameter is set, any authorization checks performed are validated against existing entries in table USOBX.  If the table does not contain the transaction/authorization object combination, then a new entry is added to the SAP reference table (i.e. USOBT not USOBT_C).  Due to significant performance issues, SAP does not recommend this parameter being set in customer systems.
       Auth/test_mode (version 4.0B onwards - default value ‘N’)
        When activated every authority check starts report RSUSR400.  However SAP recommends not activating this parameter as the system is paralyzed if syntax errors occur in running the report and it has a significant performance impact .

Authority Check De-activation

       Auth/no_check_on_sucode (version 3.0E to version 3.1H - default value ‘N’), Auth/no_check_on_tcode (version 4.0 onwards - default value - ‘N’)
        From release 3.0E, the system checks on object S_TCODE. In upgrades from versions prior to 3.0E to set this flag to ‘Y’ to ensure that old profiles operate in the new system. By default, the function is inactive.
        The flag should not normally be switched on because of the degradation in security that results.
       Auth/no_check_in_some_cases (version 3.0F onwards -default value depends on release)
        This parameter needs to be set to ‘Y’ for installation of the profile generator.  It defines the use of table USOBT in the authority checks undertaken and allows authority checks to be disabled in individual transactions.  Whilst SAP recommends switching off unnecessary authority checks, the full impact of this should be considered carefully.
       Auth/object_disabling_active (default value -‘N’)
        Whilst_no_check_in_some_cases allows authority checks to be switched off in for individual transactions, this parameter allows checks on individual objects to be switched off globally within SAP.  It is recommended that this parameter is not set.

Number of Authorizations in User Buffers

       Auth/auth_number_in_userbuffer
        When a user logs onto SAP, the authorizations contained in the user’s profiles are copied to a user buffer in memory.  The maximum number of authorizations copied is set by this parameter.  The size of the buffer must always exceed the maximum number of authorizations as authorization checks are made only against those in the buffer.
        The default value is 800, but this can be set to between 1–2000. Refer to OSS notes 84209 and 75908 for more detailed information regarding changes to the size of the user buffer.
        Transaction SU56 shows the contents of the user’s user buffer and a total for all the authorizations in a user master record.

Table, ABAP and RFC system parameters

       Rec/client (default value - ‘N’)
        The parameter switches automatic table logging on.  Images of the table before and after are logged rather than just changes and so consideration to which tables are to be logged and log volumes must be made before using this as part of a control solution.
       Auth/rfc_authority_check (default value - ‘1’)
        The parameter determines how object S_RFC is checked during RFC calls.  The object has three fields, activity, the name of the function being called and the function group in which the function resides.  The parameter defines whether S_RFC object is checked and if so, whether the function group field is included in the validation.
        Value = 0, no check against S_RFC
        Value = 1, check active but no check for SRFC-FUGR
        Value = 2, check active and check against SRFC-FUGR
       Auth/system_access_check_off (default value - ‘0’ - check remains active)
        This parameter inactivates the automatic authorization check for particular ABAP/4 language elements (file operations, CPIC calls, and calls to kernel functions). This parameter ensures the downward compatibility of the R/3 kernel.

Useful Transactions

       TU02               Shows current parameters for all hosts and gives a history of changes to parameters
       RZ10               Maintain system parameters
       RZ11               View single system parameters and their functional area.
       SU56               Shows all authorizations a user has in their user master record and the total number.  This is useful to
identify apparent authorization failures caused by user buffer overflow.

Useful Reports

RSPARAM displays all system parameters set and applicable to the system and instance in which it is run. 

From version 4.0 the RSUSR003 report also shows the settings for some of the critical password parameters.  The report also shows identifies whether SAP*, DDIC or CPIC have insecure passwords by comparing value of the encrypted password field with the encrypted values of the standard shipped passwords.  It also shows whether the SAP* user master record is absent from any clients.

Kernel Parameters for Installation of SAP on Redhat Linux 5 

Add the following lines to the "/etc/sysctl.conf" file.
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

SAP Transaction SU24

SU24 gives you the list of authorization objects that are checked when an tocde is executed. For example when you enter tcode mbo2 there are many authorization objectschecked for the transaction to be executed successfully. This tcode gives all of the authorization objexts that are checked or included for checking during the execution of this tcode. A security consultant will have acces to su24 transaction. This is helpful when dealing with su53 dumps.
Goto transaction Su24 you will end up with a screen as shown below


Then enter transaction like ME28 ( int the figure different Tcode is used)
and press F8 key. Then you will see the following screen.
Here you can see list of objects that has will be checked during execution of the tcode. The objects with proposal values (last column) set to YS will be checked and are added to the profile when the tcode is entered in role menu.
Click on the image to see full view.
And the color indicator (first column) green === globally active
light gray OR DIAMOND shape == globally inactive objects which are not checked in any case.

The objects with proposal YS are checked definitely. The objects with proposal NO will not be checked normally. They will be checked based on the input entered in the tcode.

as you can see the last but one column is global check indicator which indicates whether the object is disabled globally or not.






Re-Creating PSAPTEMP on Oracle


Re-Creating PSAPTEMP on Oracle

Bottom of Form
Following procedure helps you to re-create Temporary Tablespace PSAPTEMP while system is running.
SQL> CREATE TEMPORARY TABLESPACE temp2
  2  TEMPFILE '/oracle/<SID>/sapdata<n>/temp2_1/temp2.data1' SIZE 5M REUSE
  3  AUTOEXTEND ON NEXT 1M MAXSIZE unlimited
  4  EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

Tablespace created.


SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;

Database altered.


SQL> DROP TABLESPACE PSAPTEMP INCLUDING CONTENTS AND DATAFILES;

Tablespace dropped.

SQL> CREATE TEMPORARY TABLESPACE PSAPTEMP
  
2  TEMPFILE '/oracle/<SID>/sapdata<n>/temp_1/temp.data1' SIZE 500M REUSE
  
3  AUTOEXTEND ON NEXT 100M MAXSIZE unlimited
  
 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

Tablespace created.


SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE PSAPTEMP;

Database altered.


SQL> DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES;

Tablespace dropped.


Installation and configuration of SquirrelMail on a RedHat/CentOS/Fedora Linux based mail server with Sendmail mail server and Apache web server.
Scenario:
Primary Mail Server: linuxbox4 (192.168.0.14)
Domain Name: abc.com
Trusted IP Pool: 192.168.0.0/24
Note: Replace 
domain name and system name and IP according to your scenario.
Prerequisites:
1. DNS is configured with proper MX record.
2. All necessary packages/ softwares are installed.
Step 1:
Configure all service to start at boot time.
chkconfig sendmail on
chkconfig httpd on
chkconfig dovecot on
Step 2:
Configure /etc/hosts file. In this scenario /etc/hosts file should look like this:
192.168.0.14 linuxbox4 www.abc.com
Step 3:
Outgoing Mail Server Configuration (Sendmail):
Open /etc/mail/sendmail.mc file and change the following two lines.
From:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)dnl
FEATURE(`accept_unresolvable_domains’)dnl
To:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)dnl
dnl FEATURE(`accept_unresolvable_domains’)dnl
Save and exit.
- First line here enables sendmail to receive incoming emails on all installed the NICs. Otherwise mail 
server would only be able to
- Second line here tells sendmail, do not receive emails from mail servers whose PTR record is not configured in DNS server. This is a basic level SPAM control settings in sendmail.
Generate sendmail.cf file from sendmail.mc file.
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Step 4:
Allow RELAY for trusts (organization’s) IP addresses that you want to permit sending emails using this mail server. Open /etc/mail/access in this file we specify all those addresses that will be sending emails through this mail server. At the end of this file add the following line:
192.168.0 RELAY
Save and exit and convert this text database into DB format by following command.
makemap hash access.db < access
Step 5:
Tell sendmail that it will be acting as a primary mail server for “abc.com” domain. We do this by adding domain name in /etc/mail/local-host-names. If this server is acting as a mail server for more then one domains then add names of all of the domains in this file on separate line. Open /etc/mail/local-host-names and add “abc.com” at the end of this file.
Note: A mail server can act as a primary mail server for more then one domains at the same time and as well as can act as a primary and secondary mail server for more than one domain at the same time.
Step 6:
All system users are mail users as well. Now create mail only users.
useradd -s /usr/sbin/smrsh mailuser1
useradd -s /usr/s2n/smrsh mailuser1
Also set their passwords:
passwd mailuser1
passwd mailuser2
Step 7:
Finally restart sendmail service.
service sendmail restart
Step 8:
Incoming Mail Server Configuration (Dovecot):
Open /etc/dovecot.conf and change the following lines.
From:
#protocols = imap 
pop3
To:
protocols = imap imaps pop3 pop3s
Save and exit and restart dovecot service.
service dovecot restart
Step 9:
Webserver Configuration (Apache):
Apache comes pre-configured, you just have to change the ServerName parameter in /etc/httpd/conf/httpd.conf file and restart the service, that’s all. Open /etc/httpd/conf/httpd.conf and set the ServerName parameter.
ServerName www.abc.com
Save and exit and restart httpd service.
service httpd restart
Installation & Configuration of Squirrelmail
• Check that Squirrelmail is installed on the system.
# rpm –q squirrelmail
• If squirrelmail is not installed on the system then install it through rpm:
# rpm –ivh squirrelmail
• Now go to the squirrelmail directory, located in /usr/share.
# cd /usr/share/squirrelmail
• Then go to the config directory:
# cd config
• Now run one of the following commands to configure squirrelmail.
# ./conf.pl
OR
perl conf.pl
• Now select option 1 (Organization Preferences).
Organization Name : YOUR_ORG_NAME
Organization Title : YOUR_ORG_NAME 
Webmail
Provider link : http://YOUR_ORG_SITE_ADDRESS
Provider name : YOUR_ORG_NAME
• Now select option 2 (Server Settings).
Domain : abc.com
Sendmail or SMTP : Sendmail
IMAP Server : localhost
IMAP Port : 143
Server software : uw
Delimiter : /
• Now select option 3 (Folder Settings).
Default Folder Prefix : mail/
Show Folder Prefix Option : true
Trash Folder : Trash
Sent Folder : Sent
Drafts Folder : Drafts
By default, move to trash : true
By default, move to sent : true
By default, save as draft : true
List Special Folders First : true
Show Special Folders Color : true
Auto Expunge : true
Default Sub. of INBOX : false
Show ‘Contain Sub.’ Option : true
Default Unseen Notify : 2
Default Unseen Type : 1
Auto Create Special Folders : true
Folder Delete Bypasses Trash : false
Enable /NoSelect folder fix : false
• Now select option 4 (General Settings).
Data Directory : /var/lib/squirrelmail/prefs/
Attachment Directory : /var/spool/squirrelmail/attach/
Directory Hash Level : 0
Default Left Size : 150
Usernames in Lowercase : false
Allow use of priority : true
Hide SM attributions : false
Allow use of receipts : true
Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
Allow server thread sort : true
Allow server-side sorting : true
Allow server charset search : true
Enable UID support : true
PHP session name : SQMSESSID
Location base :
• Now choose option 8 (Plugins) and select the plugins that you wish to provide to your webmail users.
• Now open the browser with the following link:
http://YOUR_SITE_ADDRESS/webmail
OR
http://192.168.0.14/webmail

SAP Specific Movement Type Blocking



How you can block specific movement type in SAP


MOVEMENT TYPE BLOCK METHOD

You can restrict Transfer posting using Transaction Code: OMJJ>> double click on allowed Transaction> then you can remove T-code: MB1B which is assign to 309 Movement Type. 

SPRO>>Materials management>>Inventory Management and Physical Inventory>>Movement Types>>Copy, Change Movement Types Execute

Now select Movement type.
Enter movement type 311

In left hand side tree structure Go to allowed transcation folder and double click

Delete all the transaction code by which you want to avoid goods issue